Skip to content

Conversation

@jeanconn
Copy link
Contributor

@jeanconn jeanconn commented Jan 22, 2026

Description

Add the ArchiveMCC dir to stk local search. Older files are manually archived into the ArchiveMCC directory.

Note that a test fix was also required for test_stk_ephem_timeout as with the fix to add ArchiveMCC to the search path, the lookup was was finding the file locally and never running occweb queries (which are forced to timeout in that test).

Fixes #287

Interface impacts

Testing

Unit tests

  • Linux chimchim
135-jconnelly@chimchim=> pytest
=================================================== test session starts ====================================================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /home/jconnelly/git/cheta
plugins: anyio-4.12.1, timeout-2.4.0
collected 194 items                                                                                                        

cheta/tests/test_comps.py .............s........................................................                     [ 36%]
cheta/tests/test_data_source.py ...........                                                                          [ 41%]
cheta/tests/test_fetch.py ........................................                                                   [ 62%]
cheta/tests/test_intervals.py .........................                                                              [ 75%]
cheta/tests/test_orbit.py .                                                                                          [ 75%]
cheta/tests/test_remote_access.py ......                                                                             [ 78%]
cheta/tests/test_sync.py ........                                                                                    [ 82%]
cheta/tests/test_units.py ...........                                                                                [ 88%]
cheta/tests/test_units_reversed.py ...........                                                                       [ 94%]
cheta/tests/test_utils.py ...........                                                                                [100%]

===================================================== warnings summary =====================================================
cheta/tests/test_comps.py::test_cmd_states
  /proj/sot/ska3/matlab/test/lib/python3.13/site-packages/setuptools_scm/git.py:427: UserWarning: git archive did not support describe output
    warnings.warn("git archive did not support describe output")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================== 193 passed, 1 skipped, 1 warning in 132.98s (0:02:12) ===================================
136-jconnelly@chimchim=> git rev-parse HEAD
909373d5aa5743d4a19ebbf100e4601f134eab87
  • Linux cheru
108-jconnelly@cheru=> git rev-parse HEAD
909373d5aa5743d4a19ebbf100e4601f134eab87
109-jconnelly@cheru=> pytest
===================================== test session starts =====================================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /home/jconnelly/git/cheta
plugins: anyio-4.12.1, timeout-2.4.0
collected 194 items                                                                           

cheta/tests/test_comps.py .............s............................................... [ 31%]
.........                                                                               [ 36%]
cheta/tests/test_data_source.py ...........                                             [ 41%]
cheta/tests/test_fetch.py ........................................                      [ 62%]
cheta/tests/test_intervals.py .........................                                 [ 75%]
cheta/tests/test_orbit.py .                                                             [ 75%]
cheta/tests/test_remote_access.py ......                                                [ 78%]
cheta/tests/test_sync.py ........                                                       [ 82%]
cheta/tests/test_units.py ...........                                                   [ 88%]
cheta/tests/test_units_reversed.py ...........                                          [ 94%]
cheta/tests/test_utils.py ...........                                                   [100%]

====================================== warnings summary =======================================
cheta/tests/test_comps.py::test_cmd_states
  /proj/sot/ska3/matlab/test/lib/python3.13/site-packages/setuptools_scm/git.py:427: UserWarning: git archive did not support describe output
    warnings.warn("git archive did not support describe output")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
==================== 193 passed, 1 skipped, 1 warning in 129.53s (0:02:09)

Independent check of unit tests by Javier

  • GRETA Linux (chimchim, and checked that test fails with master):
bash-4.4$ git rev-parse HEAD
909373d5aa5743d4a19ebbf100e4601f134eab87
bash-4.4$ pytest cheta
===================================================================== test session starts =====================================================================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /home/jgonzalez
configfile: pytest.ini
plugins: anyio-4.12.1, timeout-2.4.0
collected 194 items                                                                                                                                           

cheta/tests/test_comps.py .............s........................................................                                                        [ 36%]
cheta/tests/test_data_source.py ...........                                                                                                             [ 41%]
cheta/tests/test_fetch.py ........................................                                                                                      [ 62%]
cheta/tests/test_intervals.py .........................                                                                                                 [ 75%]
cheta/tests/test_orbit.py .                                                                                                                             [ 75%]
cheta/tests/test_remote_access.py ......                                                                                                                [ 78%]
cheta/tests/test_sync.py ........                                                                                                                       [ 82%]
cheta/tests/test_units.py ...........                                                                                                                   [ 88%]
cheta/tests/test_units_reversed.py ...........                                                                                                          [ 94%]
cheta/tests/test_utils.py ...........                                                                                                                   [100%]

====================================================================== warnings summary =======================================================================
git/cheta/cheta/tests/test_comps.py::test_cmd_states
  /proj/sot/ska3/matlab/test/lib/python3.13/site-packages/setuptools_scm/git.py:427: UserWarning: git archive did not support describe output
    warnings.warn("git archive did not support describe output")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
==================================================== 193 passed, 1 skipped, 1 warning in 134.19s (0:02:14) ====================================================

Functional tests

I did initial development functional testing by directly controlling the content in my local ArchiveMCC dir

ls ~/Documents/MATLAB/FOT_Tools/Ephemeris/ArchiveMCC/
Chandra_22359_23206.stk	Chandra_25187_26037.stk

Copy link
Contributor

@javierggt javierggt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Maybe we should tell FOT that we are using this directory so they don't change things?

@jeanconn
Copy link
Contributor Author

I think this is their standard configuration and we're just using it "if available" so we don't really have requirements on it.
I actually don't know if /home/mission/Backstop/Ephemeris and the occweb version point to the same directory or copies.

@jeanconn jeanconn merged commit 27fdfc1 into master Jan 22, 2026
2 checks passed
@jeanconn jeanconn deleted the stk-archive-mcc branch January 22, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_get_ephem_stk_paths_local_defaults[stk_path1] fails on GRETA

3 participants