Skip to content
This repository was archived by the owner on Jul 31, 2024. It is now read-only.

Switch to pip-compile#1427

Merged
jwhitlock merged 4 commits intomozilla:mainfrom
jwhitlock:switch-to-pip-compile-1407
Nov 30, 2020
Merged

Switch to pip-compile#1427
jwhitlock merged 4 commits intomozilla:mainfrom
jwhitlock:switch-to-pip-compile-1407

Conversation

@jwhitlock
Copy link
Copy Markdown
Contributor

@jwhitlock jwhitlock commented Nov 21, 2020

pip-compile, part of pip-tools, provides a new process for maintaining Python dependencies. The top-level dependencies are defined in a requirements.in file, and pip-compile will determine the dependencies-of-dependencies and calculate hashes, writing them to requirements.txt.

This places the dependencies in four files, shared.in, docs.in, prod.in, and dev.in. After running make update-reqs, these generate docs.txt (for ReadTheDocs) and dev.txt (for the Docker image).

Other changes:

  • Adds some documentation that lives in the requirements folder.
  • Rewords some development documentation. This was where I was going to put the requirements docs, but these seemed to be the "new developer" docs, and the requirements doc was long enough for its own page. Still, it seemed awkward to me
  • Removes setup.py, which we haven't used in a while.

Update 1: Changed from make reqs-regen to make update-requirements, removed CI check, added new docs page.

Update 2: make update-reqs is shorter, doesn't break formatting of make help. Also, added in --use-feature=2020-resolver, so now this fixes the issue.

Fixes #1407

Ichnaea is no longer built as a package as part of test or deployment.
pip-compile, from pip-tools, takes a .in file, adds the hashes and
the requirements-of-requirements, and outputs a requirements.txt file.
Change the command to `make update-reqs`, and rename the Docker shell
script to match other scripts.

Remove the --verify option and related CI build step, since it will fail
when a requirement-of-a-requirement is updated.

Convert the document to RST and include in the documentation.
Copy link
Copy Markdown
Contributor Author

@jwhitlock jwhitlock left a comment

Choose a reason for hiding this comment

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

Works locally and in CI. I used pip freeze to compare the installed requirements before and after. To keep requirements from changing, I added the section #TODO: Unpin these with the December update.

I'm merging now, so I can see how Dependabot works with this workflow.

@jwhitlock jwhitlock merged commit f576fca into mozilla:main Nov 30, 2020
@jwhitlock jwhitlock deleted the switch-to-pip-compile-1407 branch November 30, 2020 16:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use the pip 2020 resolver (default in 20.3.x)

1 participant