nsidc / earthaccess

Python Library for NASA Earthdata APIs
https://earthaccess.readthedocs.io/
MIT License
370 stars 69 forks source link

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

Open mfisher87 opened 5 days ago

mfisher87 commented 5 days ago

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

Sherwin-14 commented 5 days ago

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

mfisher87 commented 5 days ago

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 commented 5 days ago

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

Sherwin-14 commented 5 days ago

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

mfisher87 commented 5 days ago

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.