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

[tools.poetry.dev-dependencies] is deprecated / add hydra multirun log directory to .gitignore / poetry shell not bundled with poetry >=2.0.0 anymore. #24

Open
Ronimsenn opened this issue Jan 14, 2025 · 3 comments · May be fixed by #26

Comments

@Ronimsenn
Copy link

Ronimsenn commented Jan 14, 2025

A deprecation warning appears when using the latest version of Poetry (2.0.1) with the following message:

D:\Development\test-project-ml> poetry install --no-root
The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead.
Creating virtualenv test-project-ml-IJSV8PYK-py3.13 in D:\Development\.poetry\cache\virtualenvs
...

Replacing [tools.poetry.dev-dependencies] with [tools.poetry.group.dev.dependencies] works just fine.
On that note, Poetry advises to use the project property instead for normal dependencies, as it is PEP 508 complient:

[project]
# ...
dependencies = [
    "requests (>=2.23.0,<3.0.0)"
]

However, I found it way more clear to just use [tools.poetry. ...] for all dependency groups and poetry also doesn't activly advise against doing so, so maybe no need to change it in the template.

Also, I suggest adding multirun into .gitignore to prevent pushes of hydra logs when using the multirun (-m) option.

Copy link

dagshub bot commented Jan 14, 2025

@Ronimsenn
Copy link
Author

Ronimsenn commented Jan 14, 2025

Related, in your article about this template, you use the command poetry shell, which by now is not bundled with poetry anymore, but instead is an own plugin which as to be installed beforehand.

Could be worth adding that step to make, as an optional step in the cookiecutter interactive config phase or giving a hit somewhere.

@Ronimsenn Ronimsenn changed the title [tools.poetry.dev-dependencies] is deprecated / add hydra multirun log directory to .gitignore [tools.poetry.dev-dependencies] is deprecated / add hydra multirun log directory to .gitignore / poetry shell not bundled with poetry >=2.0.0 anymore. Jan 15, 2025
@Ronimsenn
Copy link
Author

Created a pull request with these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant