sot / xija

Thermal modeling framework for Chandra X-ray Observatory
https://sot.github.io/xija
BSD 3-Clause "New" or "Revised" License
9 stars 5 forks source link

Add xija.component.heat to installed packages in setup.py #131

Closed javierggt closed 2 years ago

javierggt commented 2 years ago

Description

This PR fixes the following error.

When trying to run tests on an installed environment, I get this:

_______________________________________ ERROR collecting xija/tests/test_models.py _______________________________________
ImportError while importing test module '/export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2022.11rc1/lib/python3.8/site-packages/xija/tests/test_models.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
xija/__init__.py:4: in <module>
    from .model import *
xija/model.py:19: in <module>
    from . import component
xija/component/__init__.py:4: in <module>
    from .heat import *
E   ModuleNotFoundError: No module named 'xija.component.heat'

The reason why this issue did not appear in the radar is that the build of xija was broken, so the nightly tests did not use the latest master. I fixed the build today when planning the ska3-flight release.

After that was fixed, there was another error in test_model_from_chandra_models:

E       FileNotFoundError: [Errno 2] No such file or directory: '/export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2022.11rc1/lib/python3.8/site-packages/xija/component/heat/earth_vis_grid_nside32.fits.gz'

Interface impacts

None

Testing

Unit tests

Independent check of unit tests by [REVIEWER NAME]

Functional tests

No functional testing.