BrownDwarf / gollum

A microservice for programmatic access to precomputed synthetic spectral model grids in astronomy
https://gollum-astro.readthedocs.io/
MIT License
21 stars 5 forks source link

Issues with "python setup.py develop" #103

Closed rhdtownsend closed 6 months ago

rhdtownsend commented 6 months ago

During the final step of the (developer) installation instructions (https://gollum-astro.readthedocs.io/en/latest/install.html), I run into some deprecation warnings and then an error:

running develop
/Users/townsend/miniconda3/envs/gollum_dev/lib/python3.8/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
/Users/townsend/miniconda3/envs/gollum_dev/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
running egg_info
creating src/gollum.egg-info
writing src/gollum.egg-info/PKG-INFO
writing dependency_links to src/gollum.egg-info/dependency_links.txt
writing requirements to src/gollum.egg-info/requires.txt
writing top-level names to src/gollum.egg-info/top_level.txt
writing manifest file 'src/gollum.egg-info/SOURCES.txt'
reading manifest file 'src/gollum.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'src/gollum.egg-info/SOURCES.txt'
running build_ext
Creating /Users/townsend/miniconda3/envs/gollum_dev/lib/python3.8/site-packages/gollum.egg-link (link to src)
Adding gollum 0.3.0 to easy-install.pth file

Installed /Users/townsend/devel/gollum/src
Processing dependencies for gollum==0.3.0
error: astropy 5.1 is installed but astropy!=5.1.0,>=5.0.6 is required by {'ndcube'}

Suggest migration away from setup.py and easy_install. For the dependency error, why isn't a compatible astropy installed into the environment?

Review link: https://github.com/openjournals/joss-reviews/issues/6601

Sujay-Shankar commented 6 months ago

Hi @rhdtownsend ! Thanks for your feedback on the setup process! The environment.yml file seems to have flown under the radar; it seems to be a little outdated, as is the setup.py, I'll look into updating the setup to use something newer as soon as possible. The astropy errors are a bit cryptic, I'd assume astropy 5.1 is the same as 5.1.0, but gollum doesn't enforce astropy to be 5.1.0 anywhere as far as I know. And any 5.1 version should be greater than 5.0.6 so ndcube shouldn't be throwing any errors either. This could be some weirdness with Python 3.8, or hopefully just the setup process in general causing these odd errors. Either way, I'll test these things out and get back to you as soon as I can with the update/fix. Thanks again!

Sujay-Shankar commented 6 months ago

Small update on this: The documentation has been updated to switch to using pip instead of setup.py to create a development environment for gollum. I'm waiting on some things with @gully and readthedocs for the changes to be rendered on the online documentation, but the errors you've brought up have successfully been fixed! I'll close this issue once the new documentation goes live.

Sujay-Shankar commented 6 months ago

@rhdtownsend The documentation is now live on readthedocs and the revamped setup process is now available! I'll close the issue as completed now. Thanks again for bringing this to our attention!