Skip to content

Use uv in favour of pip (attempt 2)#345

Merged
james-d-mitchell merged 13 commits intolibsemigroups:mainfrom
Joseph-Edwards:uv
Nov 6, 2025
Merged

Use uv in favour of pip (attempt 2)#345
james-d-mitchell merged 13 commits intolibsemigroups:mainfrom
Joseph-Edwards:uv

Conversation

@Joseph-Edwards
Copy link
Copy Markdown
Collaborator

Supersedes #343 because apparently you can't reopen a pr after you force push to a branch.

Original description

Before this PR, we used requirements.txt to try and create reproducible environments for our CI to run in. These files are non-standardized, awkward to maintain, and give different behaviour on different systems.

This PR adds uv to our workflow to address these issues. The uv.lock file does the work of the old requirements.txt file, and is automatically generated (by running uv lock) using the information we already specify in pyproject.toml. We now use uv instead of pip in our CI.

I haven't purged requirements.txt and its associated scripts from the project yet, in case there are any users that use them, but I'm happy to do so if we don't think that's an issue.

@Joseph-Edwards
Copy link
Copy Markdown
Collaborator Author

I think everything should be working with the pip job now. It turns our that running pip install .[tests,doc] will install the local package and the optional dependencies we define in the pyproject.toml. This means that we can build the doc and run pytest and other things like that.

This might make the pip CI job slightly less stable, because we aren't using the pinned version of our dependencies that are specified by the uv.lock file. However, this is perhaps more similar to how an end user will install the project, so it will reveal to us if any of our dependencies introduce a breaking change.

@Joseph-Edwards Joseph-Edwards added documentation Improvements or additions to documentation packaging Issues or PRs related to packaging ci Label for PRs and issues related to the CI dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels Nov 5, 2025
@james-d-mitchell james-d-mitchell merged commit 224eb6f into libsemigroups:main Nov 6, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Label for PRs and issues related to the CI dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code packaging Issues or PRs related to packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants