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

Remove redundant specs from pyproject.toml #134

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

dalito
Copy link
Member

@dalito dalito commented Feb 9, 2025

After the upgrade to poetry 2, the Python and linkml-runtime dependencies are declared at two places in pyproject.toml. This removes the redundancy.

It was just an oversight in #128. poetry check does not complain and the project setup and installation works fine even with the redundant spec as long as there is no contradiction.

This also fixes the installation in the docs-related gh-actions (#133):

  • mkdocs-related packages are installed as dev-dependencies and not as extras.

Closes #133

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@dalito dalito marked this pull request as ready for review February 9, 2025 11:57
@dalito dalito requested a review from amc-corey-cox February 9, 2025 11:59
@matentzn
Copy link
Contributor

matentzn commented Feb 9, 2025

@dalito do you think it is prudent to fix #133 as well as part of this PR (piggybagging)? I am not sure this belongs in the wider problem zone onf poetry 2?

@dalito
Copy link
Member Author

dalito commented Feb 9, 2025

Yes, I will add the fix. It should just be poetry install because the mkdocs-related packages are installed as dev-dependencies and are installed by default.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@dalito
Copy link
Member Author

dalito commented Feb 9, 2025

@matentzn I have seen the same in nfdi4cat/pid4cat-model but forgot to submit the fix also here.

@@ -29,7 +29,7 @@ jobs:
run: pipx install poetry

- name: Install dependencies.
run: poetry install -E docs
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you!


dynamic = ["version"]

dependencies = [
"linkml-runtime >=1.8.0",
"linkml-runtime >=1.1.24",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it really necessary to support such an ancient version of linkml runtime?

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably not. I just kept what was there.

]

[tool.poetry]
requires-poetry = ">=2.0"
version = "0.0.0"

[tool.poetry.dependencies]
python = "^3.9"
Copy link
Contributor

Choose a reason for hiding this comment

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

How does poetry determine now which version to use during poetry install?

Copy link
Member Author

Choose a reason for hiding this comment

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

poetry env info tells what Poetry will use. Poetry will try first the version it was installed with but offers more control if needed (see managing evironments).

]

[tool.poetry]
requires-poetry = ">=2.0"
version = "0.0.0"

[tool.poetry.dependencies]
Copy link
Contributor

Choose a reason for hiding this comment

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

Removing this essentially removes poetry < 2 support, right?

Copy link
Member Author

@dalito dalito Feb 10, 2025

Choose a reason for hiding this comment

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

Yes. Did you see the tip in #129 to have both versions installed side by side?

Copy link
Contributor

Choose a reason for hiding this comment

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

@matentzn Do you think this is something we're ready to do as a community?

Copy link
Contributor

Choose a reason for hiding this comment

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

@amc-corey-cox i have no helpful opinion on the matter. ;)

Copy link
Contributor

@amc-corey-cox amc-corey-cox left a comment

Choose a reason for hiding this comment

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

Once we have a community decision on a Poetry 1/2 support I think this is ready and I will approve. I have also made a comment in LinkML dev so feel free to share your thoughts there. I'll plan to give at least a couple days for community response.

]

[tool.poetry]
requires-poetry = ">=2.0"
version = "0.0.0"

[tool.poetry.dependencies]
Copy link
Contributor

Choose a reason for hiding this comment

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

@matentzn Do you think this is something we're ready to do as a community?

Copy link
Contributor

@amc-corey-cox amc-corey-cox left a comment

Choose a reason for hiding this comment

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

I noticed no community objections to this and we are already going ahead with other changes that indicate Poetry 2 requirement. It's good to go!

@amc-corey-cox amc-corey-cox merged commit 0e732d2 into linkml:main Feb 12, 2025
1 check passed
@dalito dalito deleted the redundant-python-spec branch February 12, 2025 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

workflows/test_pages_build.yaml does not work in default setup
3 participants