CCSDSPy / ccsdspy

I/O interface and utilities for CCSDS binary spacecraft data in Python. Library used in flight missions at NASA, NOAA, and SWRI
https://ccsdspy.org
BSD 3-Clause "New" or "Revised" License
75 stars 18 forks source link

Poetry packaging #45

Closed ehsteve closed 1 year ago

ehsteve commented 1 year ago

Not yet ready but wanted to show progress.

ehsteve commented 1 year ago

Using poetry has already found a dependency problem. I tried to add numpydoc as a dependency for the docs but turns out it is not compatible with Python 3.7.

Using version ^1.5.0 for numpydoc

Updating dependencies
Resolving dependencies... (0.1s)

The current project's Python requirement (>=3.6,<=3.10) is not compatible with some of the required packages Python requirement:
  - numpydoc requires Python >=3.7, so it will not be satisfied for Python >=3.6,<3.7

Because no versions of numpydoc match >1.5.0,<2.0.0
 and numpydoc (1.5.0) requires Python >=3.7, numpydoc is forbidden.
So, because ccsdpy depends on numpydoc (^1.5.0), version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties

    For numpydoc, a possible solution would be to set the `python` property to ">=3.7,<=3.10"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers

How do you want to proceed? Bump to requiring 3.7 at least?

ddasilva commented 1 year ago

Looks great so far! I don't think we need to list the doc dependencies (currently in docs/requirements.txt) for the default package install.... the docs/ directory isn't shipped by default when you install the package through pip. Forcing those dependencies would just be unnecessary fluff.

I think you can add "development dependencies" through [tool.poetry.dev-dependencies], where we you can force a higher python version and add the contents of docs/requirements.txt.

https://pythonbiellagroup.it/en/gestire-dipendenze/poetry-advance/#:~:text=and%20your%20application.-,%5Btool.,is%20%E2%80%9Cbuilt%E2%80%9D%20by%20default.

ehsteve commented 1 year ago

I've figured out how to do this packaging in a simpler way without using poetry. Since your dependencies are so simple it probably does not make sense to use poetry at this time. Closing this merge request to create a new one.