-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Fix plugin get directory from poetry #211
Conversation
Hey @worldworm, thanks for contributing this fix! It looks good. It might be a good idea to add a test case for this to make sure it stays fixed: https://github.com/nat-n/poethepoet/blob/main/tests/test_poetry_plugin.py What do you think? |
Oh, that's an excellent idea. I totally forgot about those. 😄 Unfortunately, after several attempts, I still haven't managed to get the test cases green. The Line 257 in 7fecb34
I'll take a closer look tomorrow and get back to you. |
Indeed, hopefully it's easy to update the poetry version for testing! |
So, it seems to me that the attribute from which I organised the path ( I have now simply downloaded a new poetry version (the wheel directly from here). If I understand correctly, this is only used for the test cases and should therefore have no effect on other things. However, this shows that my changes are not breaking changes, as in the case of an older poetry version my except statement applies and the cwd is calculated as before. 😃 |
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. Thanks for the contribution!
#209
With a bit of tinkering, I found
application.poetry.pyproject_path
. This contains the path to pyproject.tomlUsing the example of #209:
Running
poetry --directory backend install
from the dirproject/
the attributeapplication.poetry.pyproject_path
has the valuebackend/pyproject.toml
Running
poetry install
from the dirproject/backend/
the attributeapplication.poetry.pyproject_path
has the value/project/backend/pyproject.toml
I hope I haven't missed anything essential 😃