tsherwen / AC_tools

Module for working with global/regional Chemical Transport Model (CTM) output and observations
MIT License
13 stars 10 forks source link

install_requires in setup.py does not correctly capture project dependencies #90

Closed kilicomu closed 4 years ago

kilicomu commented 4 years ago

The install_requires argument to setup in setup.py doesn't appear to correctly capture the minimal dependencies required for the package to be used.

In addition to the packages listed as requirements in setup.py, I needed to install the following packages into my Python environment in order to allow the AC_tools package to be successfully imported:

Compounding the issue, installation of Cartopy requires the installation of both GEOS and Proj4, dependencies which aren't satisfied when installing Cartopy from PyPI through a call to pip install. This could potentially be alienating for new users of the package, depending on how straightforward the installation process for these libraries is on their operating system.

Although the above dependencies allow AC_tools to be imported, the user is still presented with warnings about the following packages not being present in the environment:

I assume that, since these aren't causing failures in the importing of AC_tools, these modules aren't critical to package functionality, and provide optional features.

I think a simple solution to the above would be to provide a Condaenvironment.yaml file at the top level of this repository, which specifies the Python and non-Python dependencies for the project (all available fromconda-forge). It would seem that PyPI is not necessarily a sensible target for an eventual home for this package, due to the poor handling of non-Python dependencies there.

Apologies I've missed something obvious here!

tsherwen commented 4 years ago

As discussed offline, you are right the first packages you list should be included in install_requires.

As for the warning statements about other packages, they are mostly historical baggage from python2 times (iris, basemap, ephem). These warning messages should be muted/only be showen in python2 environments, which can be simply added as a caveat to the print statements.

geopandas and rasterio are used for a few functions for shape file mapping etc. These should be included in the yaml file. However, the main AC_Tools functionality doesn't require them, so hadn't included them up until this point.