Skip to content

Further improvements to kadi observations#387

Merged
taldcroft merged 7 commits intomasterfrom
obs-filter-tweaks
May 6, 2026
Merged

Further improvements to kadi observations#387
taldcroft merged 7 commits intomasterfrom
obs-filter-tweaks

Conversation

@taldcroft
Copy link
Copy Markdown
Member

@taldcroft taldcroft commented May 5, 2026

Description

This makes a number of improvements to the kadi observations code for both users and developers.

User

  • Add function get_observation to get a single observation.
  • Make obsid_sched available before APR1420B.
  • Make None value for obs_filter be a pass-thru instead of matching None.

Developer

  • Add tests.
  • Factor out observations/starcats tests to a new test file.
  • Ignore .eggs dir for ruff.
  • Refactor to move 3 kwargs into obs_filter dict

Interface impacts

Adds a new function get_observation() that raises an exception unless exactly on matching observation is found.

Testing

Unit tests

  • Mac (new unit tests)
(ska3) ➜  kadi git:(obs-filter-tweaks) git rev-parse --short HEAD                            
66be8c63
(ska3) ➜  kadi git:(obs-filter-tweaks) pytest
========================================= test session starts ==========================================
platform darwin -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/aldcroft/git
configfile: pytest.ini
plugins: anyio-4.12.1, timeout-2.4.0
collected 316 items                                                                                    

kadi/commands/tests/test_commands.py .......................s..............................      [ 17%]
kadi/commands/tests/test_commands_v2.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 34%]
ssssssssssssssssssssssssssssssss                                                                 [ 44%]
kadi/commands/tests/test_filter_events.py ..                                                     [ 45%]
kadi/commands/tests/test_observations.py ...........................................             [ 59%]
kadi/commands/tests/test_states.py ...............................................x............. [ 78%]
.............                                                                                    [ 82%]
kadi/commands/tests/test_validate.py ......................                                      [ 89%]
kadi/tests/test_events.py ..........                                                             [ 92%]
kadi/tests/test_occweb.py .......................                                                [100%]

======================== 226 passed, 89 skipped, 1 xfailed in 114.59s (0:01:54) ========================

Independent check of unit tests by Jean

  • Linux in ska3/aca env
jeanconn-kady> git rev-parse HEAD
66be8c631b3a466f2920a97ab48f59733f98bb21
jeanconn-kady> pytest
============================================================== test session starts ==============================================================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /proj/sot/ska/jeanproj/git
configfile: pytest.ini
plugins: anyio-4.12.1, timeout-2.4.0
collected 316 items                                                                                                                             

kadi/commands/tests/test_commands.py .......................s..............................                                               [ 17%]
kadi/commands/tests/test_commands_v2.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss          [ 44%]
kadi/commands/tests/test_filter_events.py ..                                                                                              [ 45%]
kadi/commands/tests/test_observations.py ...........................................                                                      [ 59%]
kadi/commands/tests/test_states.py ...............................................x..........................                             [ 82%]
kadi/commands/tests/test_validate.py ......................                                                                               [ 89%]
kadi/tests/test_events.py ..........                                                                                                      [ 92%]
kadi/tests/test_occweb.py .......................                                                                                         [100%]

============================================ 226 passed, 89 skipped, 1 xfailed in 241.52s (0:04:01)

Functional tests

No functional testing.

@taldcroft taldcroft merged commit cae9f92 into master May 6, 2026
5 checks passed
@taldcroft taldcroft deleted the obs-filter-tweaks branch May 6, 2026 16:01
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.

2 participants