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

feat/pip-compile-make-command #1294

Closed
badGarnet opened this issue Sep 4, 2023 · 0 comments · Fixed by #1295
Closed

feat/pip-compile-make-command #1294

badGarnet opened this issue Sep 4, 2023 · 0 comments · Fixed by #1295
Assignees
Labels
enhancement New feature or request

Comments

@badGarnet
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Currently when bumping dependencies it is up to the developer to ensure all .txt requirement files are updated as needed and this can be error prune.

Describe the solution you'd like
An automated make pip-compile make command that:

  • sets the dependencies between different .in files
  • provides command to run to compile affected .txt files (via the dependencies)
  • also set up a CI step that runs pip-compile when changes in requirements folder is detected

Describe alternatives you've considered
Currently way is the alternative: human checking and it is error prune.

Additional context

example of makefile

PIP = pip-compile -q -o $@ $<

extra-csv.txt: extra-csv.in constraints.in base.txt
	$(PIP)

dev.txt: dev.in constraints.in base.txt test.txt
	$(PIP)

test.txt: test.in base.txt
	$(PIP)

base.txt: base.in constraints.in
	$(PIP)
@badGarnet badGarnet added the enhancement New feature or request label Sep 4, 2023
@badGarnet badGarnet self-assigned this Sep 4, 2023
@qued qued closed this as completed in #1295 Nov 2, 2023
qued added a commit that referenced this issue Nov 2, 2023
This PR resolves #1294 by adding a Makefile to compile requirements.
This makefile respects the dependencies between file and will compile
them in order. E.g., extra-*.txt will be compiled __after__ base.txt is
updated.

Test locally by simply running `make pip-compile` or `cd requirements &&
make clean && make all`

---------

Co-authored-by: qued <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant