Skip to content

remove dev and docs requirement locks, opting for constraints instead #294

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

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

joshuadavidthomas
Copy link
Member

No description provided.

@joshuadavidthomas joshuadavidthomas requested a review from a team as a code owner August 8, 2024 16:53
@@ -17,6 +17,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

### Changed

- Instead of generating a separate requirements file for both the `dev` and `docs` extras, we now only generate a requirements file for the primary production dependencies and use the ability of `uv pip install` to install directly from a `pyproject.toml` file in development. The production requirements are used as a constraint, so there should be no version mismatches.
Copy link
Contributor

Choose a reason for hiding this comment

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

YES!!!

@@ -82,7 +82,7 @@ jobs:

- name: Install dependencies
run: |
python -m uv pip install --system -r requirements.txt -r requirements.dev.txt
python -m uv pip install --system --constraint requirements.txt --requirement pyproject.toml --extra dev
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL constraint

Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that this installs everything plus everything in dev?

Asking because there used to be the opposite behavior where pip would only install dev (or so I thought).

Copy link
Member Author

@joshuadavidthomas joshuadavidthomas Aug 9, 2024

Choose a reason for hiding this comment

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

Yup, AFAIK it installs all the deps listed as primary and as well as the extras specified. Since the majority of them aren't pinned in the list in pyproject.toml, the constraint on the versions listed in requirements.txt helps specify what to install.

Copy link
Contributor

@jefftriplett jefftriplett left a comment

Choose a reason for hiding this comment

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

Looks good. I asked a few questions but nothing that should hold anything up.

@joshuadavidthomas joshuadavidthomas merged commit 3535282 into main Aug 9, 2024
6 checks passed
@joshuadavidthomas joshuadavidthomas deleted the remove-dev-lock branch August 9, 2024 14:07
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.

2 participants