Make docstrings pass numpydoc validation
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ó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả 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 traceback identifies threadpool_info and threadpool_limits in sklearn/utils/fixes.py and shows RT01 errors for both. Read the linked scikit-learn pull request (#21338) and the reported docstrings; the work is done when both pass numpydoc validation with a Returns section. The issue was opened years ago and has no comments, so check whether the linked work or newer project changes have superseded it.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
See: https://github.com/scikit-learn/scikit-learn/pull/21338
________________________________________________ test_function_docstring[sklearn.utils.fixes.threadpool_info] ________________________________________________
function_name = 'sklearn.utils.fixes.threadpool_info', request = <FixtureRequest for <Function test_function_docstring[sklearn.utils.fixes.threadpool_info]>>
@pytest.mark.parametrize("function_name", get_all_functions_names())
def test_function_docstring(function_name, request):
"""Check function docstrings using numpydoc."""
if function_name in FUNCTION_DOCSTRING_IGNORE_LIST:
request.applymarker(
pytest.mark.xfail(run=False, reason="TODO pass numpydoc validation")
)
res = numpydoc_validation.validate(function_name)
res["errors"] = list(filter_errors(res["errors"], method="function"))
if res["errors"]:
msg = repr_errors(res, method=f"Tested function: {function_name}")
> raise ValueError(msg)
E ValueError:
E
E /Users/ogrisel/code/scikit-learn/sklearn/utils/fixes.py
E
E Tested function: sklearn.utils.fixes.threadpool_info
E
E Return the maximal number of threads for each detected library.
E
E Return a list with all the supported libraries that have been found. Each
E library is represented by a dict with the following information:
E
E - "user_api" : user API. Possible values are ['blas', 'openmp'].
E - "internal_api": internal API. Possible values are ['openmp', 'openblas', 'mkl', 'blis'].
E - "prefix" : filename prefix of the specific implementation.
E - "filepath": path to the loaded library.
E - "version": version of the library (if available).
E - "num_threads": the current thread limit.
E
E In addition, each library may contain internal_api specific entries.
E
E # Errors
E
E - RT01: No Returns section found
maint_tools/test_docstrings.py:442: ValueError
_______________________________________________ test_function_docstring[sklearn.utils.fixes.threadpool_limits] _______________________________________________
function_name = 'sklearn.utils.fixes.threadpool_limits'
request = <FixtureRequest for <Function test_function_docstring[sklearn.utils.fixes.threadpool_limits]>>
@pytest.mark.parametrize("function_name", get_all_functions_names())
def test_function_docstring(function_name, request):
"""Check function docstrings using numpydoc."""
if function_name in FUNCTION_DOCSTRING_IGNORE_LIST:
request.applymarker(
pytest.mark.xfail(run=False, reason="TODO pass numpydoc validation")
)
res = numpydoc_validation.validate(function_name)
res["errors"] = list(filter_errors(res["errors"], method="function"))
if res["errors"]:
msg = repr_errors(res, method=f"Tested function: {function_name}")
> raise ValueError(msg)
E ValueError:
E
E /Users/ogrisel/code/scikit-learn/sklearn/utils/fixes.py
E
E Tested function: sklearn.utils.fixes.threadpool_limits
E
E Change the maximal number of threads that can be used in thread pools.
E
E This object can be used either as a callable (the construction of this object
E limits the number of threads), as a context manager in a `with` block to
E automatically restore the original state of the controlled libraries when exiting
E the block, or as a decorator through its `wrap` method.
E
E Set the maximal number of threads that can be used in thread pools used in
E the supported libraries to `limit`. This function works for libraries that
E are already loaded in the interpreter and can be changed dynamically.
E
E This effect is global and impacts the whole Python process. There is no thread level
E isolation as these libraries do not offer thread-local APIs to configure the number
E of threads to use in nested parallel calls.
E
E Parameters
E ----------
E limits : int, dict or None (default=None)
E The maximal number of threads that can be used in thread pools
E
E - If int, sets the maximum number of threads to `limits` for each
E library selected by `user_api`.
E
E - If it is a dictionary `{key: max_threads}`, this function sets a
E custom maximum number of threads for each `key` which can be either a
E `user_api` or a `prefix` for a specific library.
E
E - If None, this function does not do anything.
E
E user_api : "blas", "openmp" or None (default=None)
E APIs of libraries to limit. Used only if `limits` is an int.
E
E - If "blas", it will only limit BLAS supported libraries (openblas, mkl, blis).
E
E - If "openmp", it will only limit OpenMP supported libraries
E (libiomp, libgomp, libomp, vcomp). Note that it can affect the number of threads used
E by the BLAS libraries if they rely on OpenMP.
E
E - If None, this function will apply to all supported libraries.
E
E # Errors
E
E - RT01: No Returns section found
maint_tools/test_docstrings.py:442: ValueError
- Ngôn ngữ chính
- Python
- Star
- 434
- Fork
- 38
- Merge trung bình
- 2 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 joblib/threadpoolctl
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
joblib/threadpoolctl#272 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make it possible to set active/spin wait behavior of LLVM/Intel OpenMP via `kmp_set_blocktime`Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
joblib/threadpoolctl#271 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make it possible to inspect active/spin wait behavior of LLVM/Intel OpenMP via `kmp_get_blocktime`Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
joblib/threadpoolctl#270 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 32/100
joblib/threadpoolctl#264 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
joblib/threadpoolctl#261 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của joblib/threadpoolctl
Issue tương tự
-
bug documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
awslabs/visual-asset-management-system#514 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend bug spec:REQ-053
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
nolte/kamerplanter#2547 ·
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 75/100
EleutherAI/lm-evaluation-harness#4425 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Gemini: respect PLANNING_DISABLED=1 in lifecycle context hooksCó thể đã có người làm @AmariAugustin đã nhận hôm nay. Đang mởbug good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
OthmanAdi/planning-with-files#329 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
wr.dynamodb.read_items returns [{}] for a single partition value that does not existCó thể đã có người làm @auraseb đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
aws/aws-sdk-pandas#3520 ·
Maintainer thường phản hồi trong vòng 2 ngày