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

[tooling] Add make targets to generate requirements.txt #917

Merged
merged 3 commits into from
Feb 3, 2025

Conversation

BenjaminPelletier
Copy link
Member

Currently, discovering how to handle changes to requirements can be tricky -- someone who has not read the repository intro closely would likely go to requirements.txt and see:

# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
#    pip-compile --generate-hashes --output-file=requirements.txt requirements.in

And, when following these instructions, a user must discover that they need their own Python environment set up in an appropriate way, perhaps with a specific Python version, in order to run this command successfully if they did not discover make update-pinned-dependencies.

This PR attempts to standardize requirements specification by:

  1. Adding a make target to generate requirements.txt from requirements.in using the standard interuss/monitoring image
  2. Adding a make target to upgrade dependencies
  3. Documenting these make targets in requirements.in
  4. Modifying requirements.txt in the make recipe to refer users to requirements.in
  5. Updating documentation to use make requirements.txt
  6. Removing separate Docker image so that requirements.txt is built in the same environment it will be controlling

To do this, one additional dependency (pip-tools) is added to the monitoring requirements, and the changes to requirements.txt in this PR are generated by running the new make requirements.txt command after bootstrapping the image build beforehand.

@BenjaminPelletier BenjaminPelletier marked this pull request as ready for review January 30, 2025 23:26
Copy link
Contributor

@mickmis mickmis left a comment

Choose a reason for hiding this comment

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

Nice!

@mickmis mickmis merged commit bdf8bf2 into interuss:main Feb 3, 2025
20 checks passed
@BenjaminPelletier BenjaminPelletier deleted the autogenerate-requirements branch March 3, 2025 16:33
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