Skip to content
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

Implement uv as an optional python package management backend #384

Merged
merged 13 commits into from
Feb 28, 2025

Conversation

max-moser
Copy link
Contributor

@max-moser max-moser commented Feb 28, 2025

Context

This is a variant of #383 with the pnpm/rspack stuff stripped out, and some squashed commits.
It only touches uv, since that's quite uncontroversial and works well enough already.

How to set the Python package manager

If you have a Pipfile in your project, then pipenv will be used by default.
If you have pyproject.toml and no Pipfile, then uv will be used by default.
If your use case is not satisfied by this auto-magic, then you can explicitly configure the package manager to use in .invenio:

[cli]
flavour = RDM
python_package_manager = uv

Note the lack of quotes around the value uv.
Currently, only uv and pipenv are supported as values.

slint and others added 10 commits February 28, 2025 14:31
* Explicitly makes the celery worker listen to the "default" and "low"
  queues.
* also, reword some help texts and clean up some strings
* implement `uv` as alternative for `pipenv` as python package
  management backend - to be configured in the file `.invenio`
* handle the detection of the python package manager to be used and the
  generation of its commands in a central spot to lower the maintenance
  burden
* make some commands (like translations) aware of the CLI config
  (and thus the configured python package manager)
* implement commands for activating and removing the venv as shell
  scripts for `uv` as it doesn't implement such utilities
* we got a warning that marks on fixtures don't have an effect
* the private config (`.invenio.private`) is not supposed to be added to
  version control and thus suited better for developer preferences than
  the public config (`.invenio`)
Copy link
Member

@slint slint left a comment

Choose a reason for hiding this comment

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

:shipit:

Copy link
Member

@slint slint left a comment

Choose a reason for hiding this comment

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

:shipit:

@max-moser max-moser merged commit 79de4ce into inveniosoftware:master Feb 28, 2025
2 checks passed
@max-moser max-moser deleted the mm/uv branch February 28, 2025 16:35
Samk13 added a commit to Samk13/invenio-dev-latest that referenced this pull request Mar 1, 2025
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.

4 participants