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

chore: update poetry to version 2 #969

Merged
merged 10 commits into from
Jan 14, 2025
Merged

chore: update poetry to version 2 #969

merged 10 commits into from
Jan 14, 2025

Conversation

ireneisdoomed
Copy link
Contributor

@ireneisdoomed ireneisdoomed commented Jan 8, 2025

✨ Context

Poetry 2.0 has been released with breaking changes that caused our tests to fail because the TOML wasn't following the new structure.
Changes are described here: https://python-poetry.org/blog/announcing-poetry-2.0.0

I've migrated the config to the new structure, interestingly you can now pin the Poetry version to use.

🛠 What does this PR implement

  • Project TOML adherence to Poetry 2.0
  • Poetry version pinned to 2.0
  • Minor fixes in various places to deprecate using typing's modules

🙈 Missing

🚦 Before submitting

  • Do these changes cover one single feature (one change at a time)?
  • Did you read the contributor guideline?
  • Did you make sure to update the documentation with your changes?
  • Did you make sure there is no commented out code in this PR?
  • Did you follow conventional commits standards in PR title and commit messages?
  • Did you make sure the branch is up-to-date with the dev branch?
  • Did you write any new necessary tests?
  • Did you make sure the changes pass local tests (make test)?
  • Did you make sure the changes pass pre-commit rules (e.g poetry run pre-commit run --all-files)?

@github-actions github-actions bot added the Method label Jan 8, 2025
@ireneisdoomed
Copy link
Contributor Author

This PR is blocked because the deptry tests are failing. This tool checks that we don't use any dependency in the code that is not defined in the TOML.
They have an open PR to parse Poetry's new dependencies definition in the TOML fpgmaas/deptry#1003

Tests should pass once deptry is updated.

@ireneisdoomed ireneisdoomed marked this pull request as ready for review January 14, 2025 11:01
license = "Apache-2.0"
readme = "README.md"
documentation = "https://opentargets.github.io/gentropy/"
repository = "https://github.com/opentargets/gentropy"
packages = [{ include = "gentropy", from = "src" }]
Copy link
Contributor

@project-defiant project-defiant Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The packages and requres-poetry are not available at the project, by the looks of the documentation https://python-poetry.org/docs/pyproject/#packages and https://python-poetry.org/docs/pyproject/#requires-poetry

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed the structure in https://github.com/python-poetry/poetry/blob/main/pyproject.toml

I guess both ways are correct

@ireneisdoomed ireneisdoomed merged commit 0a958f8 into dev Jan 14, 2025
5 checks passed
@ireneisdoomed ireneisdoomed deleted the il-update-poetry-2 branch January 14, 2025 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants