-
-
Notifications
You must be signed in to change notification settings - Fork 20
Migrate to pyproject.toml and fix docs build #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
On the lines of other MeB python projects, migrate SIR build from setup.py to pyproject.toml. Most of the metadata is static, and hence copied from setup.py to pyproject.toml file and remains the same. versioning is the major change. It is now handled automatically by `setuptools_scm`. The other change is the addition of a `.flake8` file because `flake8` doesn't support configuration by pyproject.toml. References: - https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ - https://setuptools-scm.readthedocs.io/en/latest/usage/ - PyCQA/flake8#234
The __version__ is dynamically written by setuptools_scm at project build time, hence build and install the project during docs build to access it without errors in sphinx configuration.
readthedocs has started to obey the theme specified in the project's sphinx configuration since a while. The current sphinx theme configuration of sir docs predates RTD and was not actually not being used for as long as the docs have been on RTD. Update the documentation to explicitly use the RTD theme for docs.
Build succeeds https://app.readthedocs.org/projects/sir/builds/28256467/ and documentation at https://sir.readthedocs.io/en/pyproject/. Once the PR/docs are reviewed, I'll delete the build from RTD. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, the code changes look good, the commit messages are very helpful, and you mentioned having tested it in the chat.
Please just keep crediting the original author when adding our credits to it, see the suggested changes.
Co-authored-by: yvanzo <yvanzo@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
On the lines of other MeB python projects, migrate SIR build from setup.py to pyproject.toml. Most of the metadata is static, and hence copied from setup.py to pyproject.toml file and remains the same.
versioning is the major change. It is now handled automatically by
setuptools_scm
. The version is dynamically written by setuptools_scm at project build time, hence the project must also be built and installed during docs build to access the version without errors in sphinx configuration.A
.flake8
file is added becauseflake8
doesn't support configuration by pyproject.toml yet.References: