-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Adopt PEP 735 dependency groups (#530)
## Description This PR updates the project to use the dependency groups feature that was proposed in [PEP 735](https://peps.python.org/pep-0735/) and is available in `uv` since `0.4.27` in favour of optional dependencies. It adds three explicit dependency groups: - `build`, containing the build time dependencies, - `test`, containing the test dependencies (including coverage), and - `docs`, containing the docs dependencies. In addition, - enables testing on Python 3.13 (after some dependency adjustments), - updates lower bounds for many development dependencies, and - refactors the nox sessions as well as the RtD script to take advantage of the new dependency groups. ## Checklist: <!--- This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly. --> - [x] The pull request only contains commits that are related to it. - [x] I have added appropriate tests and documentation. - [x] I have made sure that all CI jobs on GitHub pass. - [x] The pull request introduces no new warnings and follows the project's style guidelines.
- Loading branch information
Showing
8 changed files
with
1,150 additions
and
582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,39 @@ | ||
version: 2 | ||
|
||
submodules: | ||
include: all | ||
recursive: true | ||
formats: | ||
- htmlzip | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
jobs: | ||
post_checkout: | ||
# Skip docs build if the commit message contains "skip ci" | ||
- (git --no-pager log --pretty="tformat:%s -- %b" -1 | grep -viq "skip ci") || exit 183 | ||
# Skip docs build if there are no changes related to docs | ||
- | | ||
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml src/mqt/ src/python include/python .github/contributing* .github/workflows/support*; | ||
then | ||
exit 183; | ||
fi | ||
# Unshallow the git clone and fetch tags to get proper version information | ||
- git fetch --unshallow --tags | ||
python: "3.12" | ||
commands: | ||
# Skip docs build if the commit message contains "skip ci" | ||
- (git --no-pager log --pretty="tformat:%s -- %b" -1 | grep -viq "skip ci") || exit 183 | ||
# Skip docs build if there are no changes related to docs | ||
- | | ||
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml src/mqt/ src/python include/*/python .github/contributing* .github/support*; | ||
then | ||
exit 183; | ||
fi | ||
# Set up uv and a virtual environment | ||
- asdf plugin add uv | ||
- asdf install uv latest | ||
- asdf global uv latest | ||
# Unshallow the git clone and fetch tags to get proper version information | ||
- git fetch --unshallow --tags | ||
# Run the html builder | ||
- uv run --frozen --no-dev --group docs -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs/source $READTHEDOCS_OUTPUT/html | ||
# Run the htmlzip builder and create a zip file | ||
- uv run --frozen --no-dev --group docs -m sphinx -T -b dirhtml -d docs/_build/doctrees -D language=en docs/source docs/_build/dirhtml | ||
- mkdir -p $READTHEDOCS_OUTPUT/htmlzip | ||
- zip -r $READTHEDOCS_OUTPUT/htmlzip/html.zip docs/_build/dirhtml/* | ||
# Run the latex builder and create a pdf file | ||
# - uv run --frozen --no-dev --group docs -m sphinx -T -b latex -d docs/_build/doctrees -D language=en docs/source docs/_build/latex | ||
# - cd docs/_build/latex && latexmk -pdf -f -dvi- -ps- -interaction=nonstopmode -jobname=$READTHEDOCS_PROJECT | ||
# - mkdir -p $READTHEDOCS_OUTPUT/pdf | ||
# - cp docs/_build/latex/$READTHEDOCS_PROJECT.pdf $READTHEDOCS_OUTPUT/pdf/$READTHEDOCS_PROJECT.pdf | ||
|
||
sphinx: | ||
configuration: docs/source/conf.py | ||
|
||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs | ||
configuration: docs/conf.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.