Consider using computed docstrings
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 18/100
- Type d'issue
- Refactorisation
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- python
- Domaine
- documentation
Piste de recherche
The duplicated text lives in the new pvlib.iotools.psm4 functions, so start by comparing their docstrings to see which parts are shared. The thread leaves open whether docstrings are built at import time or at package build, and that choice is a design decision for maintainers. Done would mean one agreed approach, applied to psm4 with rendered docs and tests unchanged.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
As mentioned by @wholmgren in https://github.com/pvlib/pvlib-python/issues/2326#issuecomment-2685685954, the new pvlib.iotools.psm4 functions have long, very similar docstrings, which may be improved by using computed docstrings:
If we go with the separate functions then I think we should venture into computed docstrings. Computed docstrings are now common in the pydata world but haven't yet been used in pvlib. The module is 800 lines and about half of those are minor permutations of a 100 line docstring - and this will only get worse if we mirror more of the NSRDB API.
Here are some breadcrumbs I found with a brief investigation:
- Some PyPI packages exist for this sort of thing: https://pypi.org/search/?q=docstring
- pandas uses this: https://github.com/pandas-dev/pandas/blob/main/pandas/util/_decorators.py#L342
- scipy uses this: https://github.com/scipy/scipy/blob/main/scipy/_lib/doccer.py
- but not everyone likes it: https://github.com/scientific-python/summit-2024/issues/27
Some additional food for thought: do the docstrings have to be generated at import time (may not work with some IDEs as linked above, plus adds import overhead), or can we find some way to generate them once during package build or installation?
- Langage dominant
- Python
- Étoiles
- 1.7k
- Forks
- 1.2k
- Merge moyen
- 3 j 18 h
- PR mergées (30 j)
- 13
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de pvlib/pvlib-python
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
pvlib/pvlib-python#2903 · 5 commentaires · 2 réactions ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
pvlib/pvlib-python#2902 ·
Les mainteneurs répondent en général sous 1 jour
-
Add an example or documentation on using 'bhi' from ERA5Peut-être à nouveau libre @anshurajbisoyi98-ctrl l’a pris il y a 14 jours, et aucune pull request n’est ouverte. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
pvlib/pvlib-python#2880 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Use "long-wave" rather than "infra-red" to refer to thermal radiation.Peut-être à nouveau libre @Rahi-padwal l’a pris il y a 252 jours, et aucune pull request n’est ouverte. Ouverteapi easy
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
pvlib/pvlib-python#2653 · 6 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
question
Difficulté 1/5 1-3 heures Accessibilité débutants 72/100
pvlib/pvlib-python#2637 · 10 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de pvlib/pvlib-python
Issues similaires
-
tunneld on Windows: Wi-Fi devices are not discovered because uvicorn runs on a ProactorEventLoopOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
doronz88/pymobiledevice3#2051 ·
Les mainteneurs répondent en général sous 1 jour
-
Remove DatacircleOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
collabnix/awesome-mcp-lists#230 ·
Les mainteneurs répondent en général sous 9 jours
-
Groc schedules with out of range values pass config validation and fail later when the scheduler is builtPeut-être pris @auraseb l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
autowarefoundation/autoware_carla_scenario#342 ·
Les mainteneurs répondent en général sous 1 jour
-
documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
ianktoo/project-monitor#14 ·