ENH: Define all dependencies in pyproject.toml#132
Conversation
| "sample-files/*" = ["D100", "INP001", "FA102", "I001"] | ||
| "make_release.py" = ["T201", "S603", "S607"] | ||
|
|
||
| [dependency-groups] |
There was a problem hiding this comment.
We should not duplicate dependency information in both this file and the requirements/ directory.
I'm OK to make the switch from requirements/ to [dependency-groups], but then:
- the
requirements/directory should be removed .github/workflows/github-ci.yamlshould be updated to use[dependency-groups]and notrequirements/.readthedocs.yamlshould be updated to use[dependency-groups]and notrequirements/Makefileshould be updated to use[dependency-groups]and notrequirements/docs/dev/intro.md&docs/dev/testing.mdshould be updated to use[dependency-groups]and notrequirements/
Either we perform all those changes at once in this PR, or else the changes related to [dependency-groups] & uv.lock should be dropped
There was a problem hiding this comment.
Hi @Lucas-C, thank you for your review. In my opinion, it would be a good idea to switch from requirements/ to [dependency-groups], since pip 25.1 started supporting [dependency-groups] in pyproject.toml. This would provide a seamless experience for developers using both pip and uv.
There was a problem hiding this comment.
Hi @Lucas-C. I'm tracking down references to requirements/ and I found some in the Makefile. I'm not entirely sure how to deal with them:
Lines 1 to 5 in 05b4fee
Some options:
- simply remove the
pip-compilecommands:
maint:
pre-commit autoupdate- add references to
pyproject.toml:
maint:
pre-commit autoupdate
pip-compile --extra=ci pyproject.toml
pip-compile --extra=dev pyproject.toml
pip-compile --extra=docs pyproject.toml- use uv:
maint:
pre-commit autoupdate
uv lockWhich one aligns the best with the project?
There was a problem hiding this comment.
I think I'm getting ahead of myself. Here I'm dealing with possibly using uv for this project, instead of solving the issue with the python version. I'll update the PR and open another one to solve only #130.
There was a problem hiding this comment.
I created another, more concise PR here: #133
There was a problem hiding this comment.
Sorry for the delay in answering.
I merged your other PR, thank you.
Regarding those pip-compile commands, I think could get rid of them in favour of [dependency-groups] in pyproject.toml
There was a problem hiding this comment.
Hi @Lucas-C, I finally managed to work on this PR again.
As far as I tested, all references to requirements/* are gone and replaced with the uv/pip25.1 equivalent.
Note: last time I checked, github actions didn't support pip25.1 yet, thus I use the command uv pip, which support the <command> ... --group ... syntax.
There is one cody styling check failling, but it seems to be due to issues out of the scope of the current PR.
pyproject.toml
- `pdfly`'s dependencies are now managed in `pyproject.toml`.
pip 25.1 does not support python 3.8. That means, the `pip --group` options is not available. We can replace pip usage with `uv pip` as a drop-in replacement with minor changes.
|
I finally moved all dependencies to |
requirements/*.intopyproject.tomlrequirements/directory (avoid duplication)uv.lockfor better reproducibilityrequirements/*:github/workflows/github-ci.yaml.readthedocs.yamlMakefiledocs/dev/intro.mddocs/dev/testing.md