-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
refactor(python): support multiple requirements.in #56
Conversation
29ac674
to
cdf7d39
Compare
@jab FYI, does this meet your expectations? Note that I don't bother pinning Also LMK if you're interested in being a collaborator on this repo! |
07078ee
to
dd48064
Compare
This allows the non-Bazel workflow to still pin or install test dependencies in isolation
dd48064
to
bb9c537
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Only blocker is a surviving reference to //requirements:requirements.update
which now needs to change to //requirements:runtime.update
.
My hunch is that starting with just runtime.txt and all.txt (as you've done here) sufficiently covers the main goal here, and it's nice to avoid the complexity of an additional test.txt. Not unreasonable to expect a user who needs that intermediate lockfile to figure out how to generate it based on what's now generated out-of-the-box, IMO.
Sure, thanks! |
Co-authored-by: Joshua Bronson <jabronson@gmail.com>
Co-authored-by: Joshua Bronson <jabronson@gmail.com>
Co-authored-by: Joshua Bronson <jabronson@gmail.com>
requirements_in = "pyproject.toml", | ||
requirements_txt = "requirements_lock.txt", | ||
) | ||
|
||
# Fetches metadata for python packages we depend on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexeagle, were these changes missing
+exports_files(["pyproject.toml"])
?
I just tried aspect init
for the first time since this PR was merged. Immediately running ./repin.sh
(making no changes to what was generated) resulted in
ERROR: /private/var/folders/_t/xpfjyxwx727_zrtwcrhyfyjm0000gn/T/tmp.uBVmFZpqkL/foo/BUILD.bazel: no such target '//:pyproject.toml': target 'pyproject.toml' not declared in package '' defined by /private/var/folders/_t/xpfjyxwx727_zrtwcrhyfyjm0000gn/T/tmp.uBVmFZpqkL/foo/BUILD.bazel; however, a source file of this name exists. (Perhaps add 'exports_files(["pyproject.toml"])' to /BUILD?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, some missing tests then. PR should have been red. I'll try to add this week
This allows the non-Bazel workflow to still pin or install test dependencies in isolation.
Note that install of
pytest
is intentional to prepare for adding somepy_test
workflow next.Now that there's yet another
update
command required when dependencies change, I've introduced arepin.sh
script. This can be the cheap version of aspect-build/aspect-cli#687 - when we like the DX I can bake the result into Aspect CLI.