Consider using computed docstrings
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 18/100
- Issue-Typ
- Refactoring
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- documentation
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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?
- Vorherrschende Sprache
- Python
- Sterne
- 1.7k
- Forks
- 1.2k
- Ø Merge
- 3 T. 18 Std.
- Gemergte PRs (30 T.)
- 16
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus pvlib/pvlib-python
-
Possibility of beam irradiance from behind plane of arrayEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
pvlib/pvlib-python#2903 · 5 Kommentare · 2 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
use offset parameter instead of calculating bday in cdromEvtl. vergeben @chenyi6758-source hat das vor 2 Tagen übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
pvlib/pvlib-python#2902 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add an example or documentation on using 'bhi' from ERA5Evtl. wieder frei @anshurajbisoyi98-ctrl hat das vor 17 Tagen übernommen, und es ist kein Pull Request offen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
pvlib/pvlib-python#2880 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Use "long-wave" rather than "infra-red" to refer to thermal radiation.Evtl. wieder frei @Rahi-padwal hat das vor 255 Tagen übernommen, und es ist kein Pull Request offen. Offenapi easy
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
pvlib/pvlib-python#2653 · 6 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
question
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 72/100
pvlib/pvlib-python#2637 · 10 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in pvlib/pvlib-python
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
-
[Bug]: Queen's own Ollama model loses num_ctx when a running session switches to itEvtl. vergeben @anasamin26 hat das heute übernommen. Offenbug enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
aden-hive/hive#7508 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
llm translation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
BerriAI/litellm#47884 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug 🐛
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
netalertx/NetAlertX#1856 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag