-
-
Notifications
You must be signed in to change notification settings - Fork 693
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: Allow defining direct path to pyproject.toml #525
feat: Allow defining direct path to pyproject.toml #525
Conversation
Hello module devs. Can we have this reviewed and merged? I'm facing issue which this one will solve |
@pdecat Could you please take a look at this one? |
Hi, I left some comments in the issue. Right now, I believe changes should not be needed to make this work. |
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.
I guess I understand the changes, looks good overall. Left a few comments, PTAL.
I'll test this ASAP.
poetry_lock_target_file = copy_file_to_target(poetry_lock_file, temp_dir) | ||
else: | ||
poetry_lock_target_file = None | ||
|
||
if os.path.isfile(poetry_toml_file): | ||
log.info("Using poetry configuration file: %s", poetry_lock_file) | ||
log.info("Using poetry.toml configuration file: %s", poetry_toml_file) |
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.
This kind of duplicates the poetry.toml
in the output, doesn't it?
log.info("Using poetry.toml configuration file: %s", poetry_toml_file) | |
log.info("Using poetry toml configuration file: %s", poetry_toml_file) |
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.
This was to be consistent with the poetry.lock
file output above, so if neither are desired, it can be removed.
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.
The larger change and bug fix was having the output point to poetry_toml_file
instead of poetry_lock_file
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.
The larger change and bug fix was having the output point to
poetry_toml_file
instead ofpoetry_lock_file
Yeah, noticed that part 👍
Co-authored-by: Patrick Decat <[email protected]>
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.
While trying the new examples, it failed because python3.9-app-src-poetry
does not exist.
Did you mean python3.9-app-poetry
, or did you forget to add that directory?
Edit: I guess it is the latter, and it should contain an src/
sub-directory.
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.
Please add the missing python3.9-app-src-poetry
test fixture, and use different values for artifacts_dir
.
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.
A few issues with the examples remain.
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.
Finally tested this against some existing stacks, does not break anything.
LGTM
🎉 Thank you for working through this PR with me, I appreciate the timely back and forth to get things answered and resolved. 🙇 @antonbabenko - I believe this is ready for your review. |
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.
LGTM
## [6.8.0](v6.7.1...v6.8.0) (2024-01-17) ### Features * Allow defining direct path to pyproject.toml ([#525](#525)) ([d33b722](d33b722))
This PR is included in version 6.8.0 🎉 |
Awesome! Thanks to both of you for the cooperation & review! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
This change allows you to define the location of a
pyproject.toml
file, rather than relying on the discovery of the file in a given directory.Example 1
Example 2
Motivation and Context
Previously, discovery and execution of poetry related commands required discovery of the
pyproject.toml
,poetry.lock
, andpoetry.toml
in a given directory, which required the entire directory to be included in the resulting Zip file, which is not always desired. This PR allows you to define the direct path to thepyproject.toml
without needing to rely on it being discovered.Addition context in #524
Breaking Changes
In my testing, this does not cause any breaking changes with existing poetry deployments.
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectsI have also validated these changes against the existing
package_dir_poetry
module.pre-commit run -a
on my pull requestFixes #524