Skip to content

docs: Fix docstrings of xcp/net/ifrename for Sphinx-autodoc generation#21

Closed
bernhardkaindl wants to merge 2 commits intomasterfrom
fix-docstrings-of-xcp-net-files-for-Sphinx-autodoc
Closed

docs: Fix docstrings of xcp/net/ifrename for Sphinx-autodoc generation#21
bernhardkaindl wants to merge 2 commits intomasterfrom
fix-docstrings-of-xcp-net-files-for-Sphinx-autodoc

Conversation

@bernhardkaindl
Copy link
Copy Markdown

docs: Fix docstrings of xcp/net/ifrename for Sphinx-autodoc generation

Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 @param to proper Parameters sections
  • 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):
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +122 to 123
coverage html -d {envlogdir}/htmlcov-tests --fail-under {env:TESTS_COVERAGE_MIN:95} \
--include="tests/*"
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines 119 to 123
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/*"
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 17942070098

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+83.4%) to 83.358%

Totals Coverage Status
Change from base Build 17930510268: 83.4%
Covered Lines: 2790
Relevant Lines: 3347

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants