Consider using computed docstrings
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 18/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- documentation
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- Python
- Star
- 1.7k
- Fork
- 1.2k
- Merge trung bình
- 3 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pvlib/pvlib-python
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pvlib/pvlib-python#2903 · 5 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
pvlib/pvlib-python#2902 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add an example or documentation on using 'bhi' from ERA5Có thể làm lại được @anshurajbisoyi98-ctrl đã nhận 14 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
pvlib/pvlib-python#2880 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Use "long-wave" rather than "infra-red" to refer to thermal radiation.Có thể làm lại được @Rahi-padwal đã nhận 252 ngày trước và không có pull request nào đang mở. Đang mởapi easy
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
pvlib/pvlib-python#2653 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
question
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
pvlib/pvlib-python#2637 · 10 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của pvlib/pvlib-python
Issue tương tự
-
bug Size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
oposs/repo-infra#93 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Graphify-Labs/graphify#4546 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
521xueweihan/HelloGitHub#4025 ·