BrownDwarf / gollum

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

Warnings in test_precomputed.py #104

Closed rhdtownsend closed 4 months ago

rhdtownsend commented 4 months ago

When running py.test -vs test_precomputed.py, I encounter a number of warnings:

================================================================================== test session starts ===================================================================================
platform darwin -- Python 3.8.19, pytest-7.4.0, pluggy-1.0.0 -- /Users/townsend/miniconda3/envs/gollum_dev/bin/python
cachedir: .pytest_cache
rootdir: /Users/townsend/devel/gollum
plugins: asdf-2.15.0, anyio-4.2.0
collected 2 items                                                                                                                                                                        

test_precomputed.py::test_basic Downloading ftp://phoenix.astro.physik.uni-goettingen.de/v2.0/HiResFITS/WAVE_PHOENIX-ACES-AGSS-COND-2011.fits
|====================================================================================================================================================|  12M/ 12M (100.00%)         1s
Downloading ftp://phoenix.astro.physik.uni-goettingen.de/v2.0/HiResFITS/PHOENIX-ACES-AGSS-COND-2011//Z+0.5/lte07000-4.00+0.5.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits
|====================================================================================================================================================| 6.2M/6.2M (100.00%)         1s
Downloading ftp://phoenix.astro.physik.uni-goettingen.de/v2.0/HiResFITS/PHOENIX-ACES-AGSS-COND-2011//Z+0.5/lte03000-4.00+0.5.PHOENIX-ACES-AGSS-COND-2011-HiRes.fits
|====================================================================================================================================================| 6.2M/6.2M (100.00%)         1s
PASSED
test_precomputed.py::test_resampling PASSED

==================================================================================== warnings summary ====================================================================================
../../../miniconda3/envs/gollum_dev/lib/python3.8/site-packages/gwcs/__init__.py:61
  /Users/townsend/miniconda3/envs/gollum_dev/lib/python3.8/site-packages/gwcs/__init__.py:61: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import get_distribution, DistributionNotFound

../../../miniconda3/envs/gollum_dev/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
  /Users/townsend/miniconda3/envs/gollum_dev/lib/python3.8/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

../../../miniconda3/envs/gollum_dev/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
../../../miniconda3/envs/gollum_dev/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
../../../miniconda3/envs/gollum_dev/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
../../../miniconda3/envs/gollum_dev/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
../../../miniconda3/envs/gollum_dev/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
../../../miniconda3/envs/gollum_dev/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
  /Users/townsend/miniconda3/envs/gollum_dev/lib/python3.8/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

tests/test_precomputed.py::test_basic
  /Users/townsend/miniconda3/envs/gollum_dev/lib/python3.8/site-packages/astropy/modeling/fitting.py:1970: AstropyUserWarning: Model is linear in parameters; consider using linear fitting methods.
    warnings.warn('Model is linear in parameters; '

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================= 2 passed, 9 warnings in 21.75s =============================================================================

Suggest these are resolved, as tests shouldn't generate warnings.

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