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

Generate requirements.txt using pip-tools #907

Merged
merged 1 commit into from
Oct 14, 2019
Merged

Generate requirements.txt using pip-tools #907

merged 1 commit into from
Oct 14, 2019

Conversation

capsulecorplab
Copy link
Contributor

Description

Renames previous requirements.txt as requirements.in and generates
new requirements.txt file using pip-tools. This version of
requirements.txt serves as a flattened "lockfile" that is better
suited for reproducing deterministic builds. See example usage in
https://github.com/jazzband/pip-tools/#example-usage-for-pip-compile

To update, run:

pip-compile requirements.in

Related Issue

#828

How Has This Been Tested?

Ran and passed CI on forked repo.
See https://travis-ci.com/capsulecorplab/POCS/builds/131753503

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

Renames previous requirements.txt as requirements.in and generates
new requirements.txt file using pip-tools. This version of
requirements.txt serves as a flattened "lockfile" that is better
suited for reproducing deterministic builds. See example usage in
https://github.com/jazzband/pip-tools/#example-usage-for-pip-compile

To update, run:

    pip-compile requirements.in
@codecov
Copy link

codecov bot commented Oct 14, 2019

Codecov Report

Merging #907 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           develop    #907   +/-   ##
=======================================
  Coverage     82.8%   82.8%           
=======================================
  Files           79      79           
  Lines         6270    6270           
  Branches       827     827           
=======================================
  Hits          5192    5192           
  Misses         862     862           
  Partials       216     216

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c0af87...711d0f2. Read the comment docs.

Copy link
Member

@wtgee wtgee left a comment

Choose a reason for hiding this comment

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

Awesome, thanks @capsulecorplab! Looks like this could also solve my long-standing problem with maintaining the list in both setup.py (which we don't do in this branch) and requirements.txt. I'll make an issue to get things converted over to setup.py, which is more in keeping with our other repositories.

Note that much of the work will be doing into what is currently the docker branch, so I will probably implement the setup.py changes there.

Thanks again for the PR!

@wtgee wtgee merged commit 609c37e into panoptes:develop Oct 14, 2019
@capsulecorplab
Copy link
Contributor Author

@wtgee Happy to contribute 🙂

It's also worth noting there's an additional flag for pip-compile that enables hash checking. The tradeoff is it takes a bit longer to generate or install packages from requirements.txt.

There's also pipenv, which is its own package manager, dependency resolver, and virtual environment, but that's perhaps a separate discussion jazzband/pip-tools#679.

@capsulecorplab capsulecorplab deleted the create-lockfile-828 branch October 14, 2019 21: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