Skip to content

the extension should primarly resolve the srcdir. - #73

Closed
maurerle wants to merge 1 commit into
sphinx-doc:mainfrom
maurerle:resolve_srcdir
Closed

maurerle wants to merge 1 commit into
sphinx-doc:mainfrom
maurerle:resolve_srcdir

Conversation

@maurerle

Copy link
Copy Markdown

This is required when building using
python -m sphinx docs/source docs/build

from the root of the project.

I would like to refactor this section to use pathlib though.

This is required when building using
python -m sphinx docs/source docs/build
from the root of the project
@codecov

codecov Bot commented Nov 18, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@2a2a202). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #73   +/-   ##
=======================================
  Coverage        ?   47.18%           
=======================================
  Files           ?       12           
  Lines           ?      960           
  Branches        ?      204           
=======================================
  Hits            ?      453           
  Misses          ?      467           
  Partials        ?       40           
Flag Coverage Δ
unittests 47.18% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maurerle

Copy link
Copy Markdown
Author

@AA-Turner do you have time to review this PR please?

@maurerle

maurerle commented Dec 5, 2025

Copy link
Copy Markdown
Author

Hi @AA-Turner, is there anything I can do here?

The paths are currently always resolved from the CWD instead of the sphinx build dir.

This makes building the docs dependent on being in the correct folder when calling sphinx :(

@RobertoRoos

RobertoRoos commented Jan 26, 2026 •

Copy link
Copy Markdown
Collaborator

@maurerle you are absolutely right here. This would resolve #87 (I just created it).

However, I don't agree in trying multiple path-resolves until one succeeds. Although maybe convenient in some cases, it could technically result in the wrong file being used without the developer ever knowing. Instead I would say we only use the path relative to the source dir, since this would provide a stable result. What do you think?

EDIT: See new PR, #88

@maurerle

Copy link
Copy Markdown
Author

Sure, if you mark your PR as ready, I will close this. I think it is better to clean this up. I just added the sane case in front, as there were already a few.
However I either do not think these are necessary.

@RobertoRoos

Copy link
Copy Markdown
Collaborator

I merged #88 - thanks again @maurerle , for pointing this out!

@maurerle
maurerle deleted the resolve_srcdir branch January 26, 2026 09:17
@maurerle

Copy link
Copy Markdown
Author

@RobertoRoos could we please get a new release with this fix?

@RobertoRoos

Copy link
Copy Markdown
Collaborator

Yeah, that was well overdue. New release v0.6.0 is out: https://pypi.org/project/sphinx-argparse/0.6.0/

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.

2 participants