Fix the pip requirements setup#176
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
PiotrKorkus
left a comment
There was a problem hiding this comment.
The current solution was partially correct. The only thing that needs fixing is that compile_pip_requirements generates file requirements.lock that this PR is removing and in your MODULE pip is parsing requirements_lock.txt which is incorrect.
- Keep
requirements.lock - update
tests/integration/requirements.txtwith current deps - Run
bazel run //tests/integration:requirements.update - Remove
requirements_lock.txtfrom repo root - Replace in MODULE file in pip.parse command:
requirements_lock = "//tests/integration:requirements.lock",
|
Thanks for the review @PiotrKorkus . I am not sure I understand your comment. All the parts you mentioned seem to be already available in the lifecycle repo: MODULE.bazel contains pip.parse of the requirements lockfile BUILD contains compile_pip_requirements requirements.in file assembles two requirements.txt files requirements lockfile exists at requirements_lock.txt The lockfile moved to the repo root because it also covers the file scripts/config_mapping/requirements.txt and not only the tests/integration/requirements.txt Is your comment about suggesting we shall keep independent lockfiles for the two requirements.txt files instead collecting them in a single requirements.in file? |
Oh, wait a second. Now I understand what is happening here. I didn't know its possible to extract specific packages from parsed pip. This makes sense to me now. |
Thank you, no worries! Could you please approve again, I just rebased to latest main. |
Cleanup the way that python requirements are used:
bazel run //:requirements.updateto update the lockfile