earthaccess icon indicating copy to clipboard operation
earthaccess copied to clipboard

Make `pyproject.toml` use PEP621 conventions to specify dependencies

Open mfisher87 opened this issue 1 year ago • 5 comments

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 avatar Jun 26 '24 01:06 mfisher87

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

Sherwin-14 avatar Jun 26 '24 07:06 Sherwin-14

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 avatar Jun 26 '24 13:06 mfisher87

Maybe this isn't startable without switching away from Poetry? https://github.com/nsidc/earthaccess/issues/614#issuecomment-2191988446

mfisher87 avatar Jun 26 '24 15:06 mfisher87

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

Sherwin-14 avatar Jun 26 '24 15:06 Sherwin-14

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 avatar Jun 26 '24 17:06 mfisher87

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

itcarroll avatar Sep 17 '24 23:09 itcarroll