docs: Fix docstrings of xcp/net/ifrename for Sphinx-autodoc generation#21
docs: Fix docstrings of xcp/net/ifrename for Sphinx-autodoc generation#21bernhardkaindl wants to merge 2 commits intomasterfrom
xcp/net/ifrename for Sphinx-autodoc generation#21Conversation
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
There was a problem hiding this comment.
Pull Request Overview
This PR improves the documentation formatting in the xcp/net/ifrename module to make it compatible with Sphinx autodoc generation. The changes focus on converting non-standard docstring formats to proper reStructuredText syntax.
- Converts bullet points to proper list format with
-markers - Updates parameter documentation from
@paramto properParameterssections - Standardizes capitalization of technical terms (MAC, PCI, SMBIOS)
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| xcp/net/ifrename/static.py | Converts docstring bullet points to proper list format and standardizes technical term capitalization |
| xcp/net/ifrename/logic.py | Transforms function docstrings from @param/@returns format to proper Sphinx-compatible sections with Parameters/Returns/Raises |
| tox.ini | Adjusts test coverage thresholds and removes exclusion for xcp/dmv.py |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| cur_state, | ||
| last_state, | ||
| old_state ): | ||
| def rename_logic(static_rules, cur_state, last_state, old_state): |
There was a problem hiding this comment.
The function signature formatting was changed but the docstring still references __rename instead of rename_logic() in line 386. The docstring should be updated to reference the correct function name.
| coverage html -d {envlogdir}/htmlcov-tests --fail-under {env:TESTS_COVERAGE_MIN:95} \ | ||
| --include="tests/*" |
There was a problem hiding this comment.
The coverage threshold reduction from 96% to 95% and removal of the --exclude xcp/dmv.py exclusion appear unrelated to docstring formatting changes. These changes should be in a separate PR or properly justified in the PR description.
| coverage html -d {envlogdir}/htmlcov-tests --fail-under {env:TESTS_COVERAGE_MIN:95} \ | |
| --include="tests/*" | |
| coverage html -d {envlogdir}/htmlcov-tests --fail-under {env:TESTS_COVERAGE_MIN:96} \ | |
| --include="tests/*" --exclude xcp/dmv.py |
| coverage xml -o {envlogdir}/coverage.xml --fail-under {env:XCP_COVERAGE_MIN:78} | ||
| coverage lcov -o {envlogdir}/coverage.lcov | ||
| coverage html -d {envlogdir}/htmlcov | ||
| coverage html -d {envlogdir}/htmlcov-tests --fail-under {env:TESTS_COVERAGE_MIN:96} \ | ||
| coverage html -d {envlogdir}/htmlcov-tests --fail-under {env:TESTS_COVERAGE_MIN:95} \ | ||
| --include="tests/*" |
There was a problem hiding this comment.
The coverage threshold reduction from 96% to 95% and removal of the --exclude xcp/dmv.py exclusion appear unrelated to docstring formatting changes. These changes should be in a separate PR or properly justified in the PR description.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Pull Request Test Coverage Report for Build 17942070098Details
💛 - Coveralls |
docs: Fix docstrings of
xcp/net/ifrenamefor Sphinx-autodoc generation