From 16b0e421a4ff994b4d0aa9d71e98bb91961c9df6 Mon Sep 17 00:00:00 2001 From: "Michael S. P. Kelley" Date: Mon, 27 Apr 2020 08:26:21 -0400 Subject: [PATCH 1/4] Fix requirements and setup.py install_requirements in setup.cfg should be a dangling list or a semicolon separated list. setup.py was treating it as a comma separated list but the comma is needed to specify version ranges, such as astropy>=3.0<4.0 --- setup.cfg | 2 +- setup.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8581ae3c9..f869e1bbb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,7 +34,7 @@ edit_on_github = False github_project = NASA-Planetary-Science/sbpy install_requires = numpy>=1.13.0 - astropy>=3.0<4.0 + astropy>=3.0,<4.0 astropy-helpers matplotlib ads diff --git a/setup.py b/setup.py index 972cc8e92..371e48429 100755 --- a/setup.py +++ b/setup.py @@ -140,8 +140,7 @@ version=VERSION, description=DESCRIPTION, scripts=scripts, - install_requires=metadata.get( - 'install_requires', 'astropy').strip().split(','), + install_requires=metadata.get('install_requires'), python_requires='>=3.6', include_package_data=True, author=AUTHOR, From 871b03440f83bab62a1f41aa4122c307cba033c5 Mon Sep 17 00:00:00 2001 From: "Michael S. P. Kelley" Date: Mon, 27 Apr 2020 09:04:01 -0400 Subject: [PATCH 2/4] Make requirements consistent within package and documentation. Remove requirements.txt and provide new pip-requirements which provides instructions for installation of requirements via setup.py. --- docs/install.rst | 2 +- pip-requirements | 10 ++++++++++ requirements.txt | 6 ------ setup.cfg | 6 +++++- 4 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 pip-requirements delete mode 100644 requirements.txt diff --git a/docs/install.rst b/docs/install.rst index dd799cfd3..255f324e6 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -17,7 +17,7 @@ care of with installation using pip: * `numpy `__ 1.13.0 or later * pytest 3.1 or later * `astropy `__ -* `astroquery `__ 0.3.9.dev5089 or later: For retrieval of online data, e.g., ephemerides and orbits. +* `astroquery `__ 0.4.1.dev5892 or later: For retrieval of online data, e.g., ephemerides and orbits. * `scipy `__: For numerical integrations in `sbpy.activity.gas` and `sbpy.photometry`, among others. * `synphot `__ 0.1.3 or later: For calibration with respect to the Sun and Vega, filtering spectra through bandpasses. * `ginga `__ and `photutils `__: To interactively enhance images of comets with the `~sbpy.imageanalysis.CometaryEnhancement` Ginga plugin. diff --git a/pip-requirements b/pip-requirements new file mode 100644 index 000000000..3b046aa6d --- /dev/null +++ b/pip-requirements @@ -0,0 +1,10 @@ +# The pip-requirements file should no longer be used. Instead, to install +# sbpy along with its dependencies, you can use: +# +# pip install . +# +# to install only the minimal dependencies, or e.g.: +# +# pip install .[all] +# +# to install all optional dependencies. diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index f1032b728..000000000 --- a/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -numpy>=1.4.0 -astropy>=3.0<4.0 -matplotlib -ads -synphot<0.2 -git+git://github.com/astropy/astroquery.git@master#egg=astroquery diff --git a/setup.cfg b/setup.cfg index f869e1bbb..a08af58d4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -39,7 +39,11 @@ install_requires = matplotlib ads synphot<0.2 - astroquery>=0.4 + astroquery>0.4.1.dev5892 +extra_requires = + scipy + ginga + photutils [pycodestyle] select = E101,E111,E112,E113,E124,E201,E202,E203,E211,E221,E225,E231,E241,E251,E261,E265,E271,E272,E301,E302,E303,E305,E502,E703,E711,E712,E714,E722,E901,E902,W191,W291,W292,W293,W391 From 4e142e7376c938f97019236bade84a1036b27b88 Mon Sep 17 00:00:00 2001 From: "Michael S. P. Kelley" Date: Mon, 27 Apr 2020 09:25:02 -0400 Subject: [PATCH 3/4] Move requirements to correct section, fix astroquery --- setup.cfg | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index a08af58d4..7467fc0fd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,6 +32,8 @@ license = BSD 3-Clause url = https://sbpy.org edit_on_github = False github_project = NASA-Planetary-Science/sbpy + +[options] install_requires = numpy>=1.13.0 astropy>=3.0,<4.0 @@ -39,8 +41,10 @@ install_requires = matplotlib ads synphot<0.2 - astroquery>0.4.1.dev5892 -extra_requires = + astroquery>=0.4.1.dev5892 + +[options.extras_require] = +all = scipy ginga photutils From ffd86f2d21194c2a4fbe34801fcb536228d13191 Mon Sep 17 00:00:00 2001 From: "Michael S. P. Kelley" Date: Mon, 27 Apr 2020 10:19:31 -0400 Subject: [PATCH 4/4] Set min astroquery dev version to 0.4.1.dev0 to avoid error. First version on pip is dev5892, which is the actual minimum we want. --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 7467fc0fd..1065384ba 100644 --- a/setup.cfg +++ b/setup.cfg @@ -41,7 +41,7 @@ install_requires = matplotlib ads synphot<0.2 - astroquery>=0.4.1.dev5892 + astroquery>=0.4.1.dev0 [options.extras_require] = all =