Skip to content

Conversation

@lwasser
Copy link
Member

@lwasser lwasser commented Nov 1, 2025

This pr closes #126 . It fixes

✅ rtd configuration needed a few tweaks
✅ move dependency groups to optional.dependencies. This offers more flexibility and also allows us to migrate more easily if needed to another tool in the future, as this is standard practice for packages.
✅ then we call the deps as a feature element in the hatch envt!

it seems to work really well.
I tested this config over in pyosPackage and it works great. I opened #129 because we will need to test this with mkdocs as well. I am not sure that trying to add flags to a hatch run docs:build command works (i could be wrong!!). I just couldn't get it to work.

@lwasser
Copy link
Member Author

lwasser commented Nov 1, 2025

Thank goodness for the tests here - they caught my mistake!

@@ -1,17 +1,3 @@
{% if documentation == "mkdocs" -%}
Copy link
Member Author

Choose a reason for hiding this comment

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

Rather than having dependencies defined differently - i think we should always just use optional.dependency groups. and call them in hatch - that simplifies a lot!

{%- endif %}
]

docs = [
Copy link
Member Author

Choose a reason for hiding this comment

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

That way - this section doesn't change if we use hatch envs or not!

"Sphinx ~=8.0",
"sphinx-autobuild ==2024.10.3"
# Install optional dependency test for docs
features = [
Copy link
Member Author

Choose a reason for hiding this comment

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

This is how you call optional deps in a hatch envt!

- pip install --upgrade pip setuptools wheel
- pip install hatch
{%- if documentation == "mkdocs" %}
- pip install --upgrade pip
Copy link
Member Author

Choose a reason for hiding this comment

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

This fixes RTD

@lwasser
Copy link
Member Author

lwasser commented Nov 1, 2025

Looks like something isn't running on python 3.10. open to any suggestions as the tests run locally!

@lwasser
Copy link
Member Author

lwasser commented Nov 1, 2025

I might actually understand this ... seems like sphinx 8.2 isn't supported by python 3.10 so... back to 8.0 we go.. thank you diffs for helping my pea brain figure this out. 🤞🏻 it works.

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.

Double check dependency groups for build tools & rtd isn't quite setup correctly to work

1 participant