-
Notifications
You must be signed in to change notification settings - Fork 45
versions: add support for version checks via pyproject.toml #386
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
versions: add support for version checks via pyproject.toml #386
Conversation
48957ea to
b555eb2
Compare
invenio_cli/helpers/versions.py
Outdated
| import os | ||
| import re | ||
|
|
||
| import tomli |
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.
tomllib is part of the standard lib starting with python 3.11, but until then we can use tomli which is a dependency from somewhere (pipfile?)
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.
Maybe we add a direct dependency to tomllib with a Python version specifier? On my machine I get just a toml dependency when e.g. running on Python 3.9:
toml v0.10.2
└── pipfile v0.0.2 [requires: toml *]
└── invenio-cli v1.6.0 [requires: pipfile >=0.0.2]
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.
right, i actually forgot that you can add dependencies for specific python versions only
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.
leaving this here for now: https://github.com/hukkin/tomli?tab=readme-ov-file#building-a-tomlitomllib-compatibility-layer
* previously, only `Pipfile` was considered, which only supports `pipenv` but not `uv`
b555eb2 to
454b480
Compare
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.
merged ils.py and rdm.py into this one
|
briefly discussed with @ntarocco ✔️ |
This PR should've been part of #384 but was overlooked.
It adds support for parsing the
App-{RDM,ILS}dependency version frompyproject.toml.