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

Make pyproject.toml use PEP621 conventions to specify dependencies #617

Closed
Tracked by #614
mfisher87 opened this issue Jun 26, 2024 · 6 comments
Closed
Tracked by #614
Labels
enhancement New feature or request good first issue Good for newcomers hackathon An issue we'd like to visit during a hackathon event

Comments

@mfisher87
Copy link
Collaborator

mfisher87 commented Jun 26, 2024

For example, we have [tools.poetry.dependencies] instead of a dependencies key under [project]. I think we should use PEP621-compliant configuration here regardless of whether we use Poetry or not.

Related: #374

@mfisher87 mfisher87 changed the title Poetry-specific configuration: e.g. [tools.poetry.dependencies] instead of a dependencies key under [project]. I think we should use PEP621-compliant configuration here regardless of whether we use Poetry or not. Make pyproject.toml use PEP621 conventions to specify dependencies Jun 26, 2024
@mfisher87 mfisher87 added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers and removed help wanted Extra attention is needed labels Jun 26, 2024
@Sherwin-14
Copy link
Contributor

Sherwin-14 commented Jun 26, 2024

@mfisher87 Hey I think poetry uses PEP-621 convention by default. isn't that the case or am I missing something?

@mfisher87
Copy link
Collaborator Author

mfisher87 commented Jun 26, 2024

All of this config is poetry-specific: https://github.com/nsidc/earthaccess/blob/main/pyproject.toml#L37-L103 Although technically compliant with the spec by using poetry's aliases, it's more readable and portable to use the primary field names.

Instead, we should be using the plan dependencies and optional-dependencies data structures (https://peps.python.org/pep-0621/#dependencies-optional-dependencies). Like the example in the PEP621 doc, almost everything should be under the project top-level key. The poetry "extras" section is just another way of expressing an optional dependency group. So we can take all 3 of the poetry-specific sections and combine them to PEP621-standard dependencies and optional-dependencies sections.

@mfisher87
Copy link
Collaborator Author

Maybe this isn't startable without switching away from Poetry? #614 (comment)

@Sherwin-14
Copy link
Contributor

Sherwin-14 commented Jun 26, 2024

So are we switching to setuptools? What do you think about this?

@mfisher87
Copy link
Collaborator Author

I'm personally for this, but I think we need more input from the rest of the team. Our next hack day may be a good time to chat in real-time to make a decision.

@mfisher87 mfisher87 added the hackathon An issue we'd like to visit during a hackathon event label Jun 30, 2024
@itcarroll
Copy link
Collaborator

Another one fixed by #733! (And I'm not through yet.)

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in earthaccess project Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hackathon An issue we'd like to visit during a hackathon event
Projects
Status: Done
Development

No branches or pull requests

3 participants