sot / chandra_aca

Chandra Aspect Camera Tools
https://sot.github.io/chandra_aca
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Migrate maude_decom to CxoTime #183

Closed taldcroft closed 1 week ago

taldcroft commented 2 weeks ago

Description

Migrate maude_decom.py to use CxoTime throughout and use recommended idioms for time delta arithmetic.

This also makes some improvements in docstrings. It accidentally includes an update that was intended for #181.

Requires

Interface impacts

Testing

Unit tests

======================================================== no tests ran in 0.03s ========================================================= (ska3) ➜ docs git:(maude-use-cxotime) cd .. (ska3) ➜ chandra_aca git:(maude-use-cxotime) env PYTHONPATH=/Users/aldcroft/git/cxotime pytest ========================================================= test session starts ========================================================== platform darwin -- Python 3.11.8, pytest-7.4.4, pluggy-1.4.0 rootdir: /Users/aldcroft/git configfile: pytest.ini plugins: cov-5.0.0, timeout-2.2.0, anyio-4.3.0 collected 216 items

chandra_aca/tests/test_aca_image.py ................. [ 7%] chandra_aca/tests/test_all.py ........................ [ 18%] chandra_aca/tests/test_attitude.py ............................................................. [ 47%] chandra_aca/tests/test_dark_model.py ............ [ 52%] chandra_aca/tests/test_drift.py .......................... [ 64%] chandra_aca/tests/test_maude_decom.py .................... [ 74%] chandra_aca/tests/test_planets.py ............... [ 81%] chandra_aca/tests/test_psf.py ... [ 82%] chandra_aca/tests/test_residuals.py ss... [ 84%] chandra_aca/tests/test_star_probs.py ................................. [100%]

============================================== 214 passed, 2 skipped, 1 warning in 34.40s ==============================================


Independent check of unit tests by Jean
- [x] OSX arm64

(ska3-flight-latest) flame:chandra_aca jean$ pytest ============================= test session starts ============================== platform darwin -- Python 3.11.8, pytest-8.0.2, pluggy-1.4.0 PyQt5 5.15.9 -- Qt runtime 5.15.8 -- Qt compiled 5.15.8 rootdir: /Users/jean/git configfile: pytest.ini plugins: astropy-0.11.0, qt-4.4.0, cov-5.0.0, timeout-2.2.0, remotedata-0.4.1, anyio-4.3.0, filter-subpackage-0.2.0, doctestplus-1.2.1, astropy-header-0.2.2, hypothesis-6.112.0, arraydiff-0.6.1, mock-3.14.0 collected 216 items

chandra_aca/tests/test_aca_image.py ................. [ 7%] chandra_aca/tests/test_all.py ........................ [ 18%] chandra_aca/tests/test_attitude.py ..................................... [ 36%] ........................ [ 47%] chandra_aca/tests/test_dark_model.py ............ [ 52%] chandra_aca/tests/test_drift.py .......................... [ 64%] chandra_aca/tests/test_maude_decom.py .................... [ 74%] chandra_aca/tests/test_planets.py ............... [ 81%] chandra_aca/tests/test_psf.py ... [ 82%] chandra_aca/tests/test_residuals.py ss... [ 84%] chandra_aca/tests/test_star_probs.py ................................. [100%]

================================================== warnings summary ================================================== chandra_aca/chandra_aca/tests/test_residuals.py::test_obc /Users/jean/miniforge3/envs/ska3-flight-latest/lib/python3.11/site-packages/django/utils/encoding.py:266: DeprecationWarning: 'locale.getdefaultlocale' is deprecated and slated for removal in Python 3.15. Use setlocale(), getencoding() and getlocale() instead. encoding = locale.getdefaultlocale()[1] or 'ascii'

chandra_aca/chandra_aca/tests/test_residuals.py::test_obc /Users/jean/miniforge3/envs/ska3-flight-latest/lib/python3.11/site-packages/django/http/request.py:1: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13 import cgi

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ==================================== 214 passed, 2 skipped, 2 warnings in 44.06


### Functional tests
<!-- Describe and document results of any functional tests, otherwise leave the text below -->
No functional testing.