Closed jeanconn closed 2 months ago
I suppose technically @taldcroft the test_get_starcat_only_agasc1p8 test should have kept its warning from getting out, but it seems fine to just add it to the list of expected warnings at this point.
Why is this warning showing up? why can't it be fixed? and why is it ignorable?
Ugh, don't know what is going on here but it wasn't the intent to have a warning getting through. I'll have a look.
It looked to me like this was just a case of an expected warning not being appropriately handled by the test. So I'd recommend a kadi fix. But I'd also just like to shut up ska_testr until the next kadi release as I like to maintain awareness of real changes and errors.
I can't reproduce the warning. Am I doing something wrong?
(ska3) ➜ find_attitude git:(normal-sun-attitude-constraints) ska_version
2024.7-e61aad8
(ska3) ➜ find_attitude git:(normal-sun-attitude-constraints) ipython
Python 3.11.8 | packaged by conda-forge | (main, Feb 16 2024, 20:49:36) [Clang 16.0.6 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.22.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import agasc
In [2]: agasc.get_agasc_filename()
Out[2]: '/Users/aldcroft/ska/data/agasc/proseco_agasc_1p8.h5'
In [3]: agasc.get_agasc_filename("agasc*")
Out[3]: '/Users/aldcroft/ska/data/agasc/agasc1p8.h5'
In [4]: import kadi
In [5]: kadi.test("-v")
===================================================== test session starts =====================================================
platform darwin -- Python 3.11.8, pytest-7.4.4, pluggy-1.4.0 -- /Users/aldcroft/miniconda3-arm/envs/ska3/bin/python3.11
rootdir: /Users/aldcroft/miniconda3-arm/envs/ska3/lib/python3.11/site-packages
plugins: timeout-2.2.0, anyio-4.3.0
collecting ... collected 182 items
kadi/commands/tests/test_commands.py::test_find PASSED [ 0%]
kadi/commands/tests/test_commands.py::test_get_cmds PASSED [ 1%]
kadi/commands/tests/test_commands.py::test_get_cmds_zero_length_result PASSED [ 1%]
kadi/commands/tests/test_commands.py::test_get_cmds_inclusive_stop PASSED [ 2%]
kadi/commands/tests/test_commands.py::test_cmds_as_list_of_dict PASSED [ 2%]
kadi/commands/tests/test_commands.py::test_cmds_as_list_of_dict_ska_parsecm PASSED [ 3%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_backstop_and_add_cmds PASSED [ 3%]
kadi/commands/tests/test_commands.py::test_commands_create_archive_regress PASSED [ 4%]
kadi/commands/tests/test_commands.py::test_get_cmds_v2_arch_only PASSED [ 4%]
kadi/commands/tests/test_commands.py::test_get_cmds_v2_arch_recent PASSED [ 5%]
kadi/commands/tests/test_commands.py::test_get_cmds_v2_recent_only PASSED [ 6%]
kadi/commands/tests/test_commands.py::test_get_cmds_nsm_2021 PASSED [ 6%]
kadi/commands/tests/test_commands.py::test_cmds_scenario PASSED [ 7%]
kadi/commands/tests/test_commands.py::test_nsm_offset_pitch_rasl_command_events PASSED [ 7%]
kadi/commands/tests/test_commands.py::test_command_set_bsh PASSED [ 8%]
kadi/commands/tests/test_commands.py::test_command_set_safe_mode PASSED [ 8%]
kadi/commands/tests/test_commands.py::test_bright_star_hold_event PASSED [ 9%]
kadi/commands/tests/test_commands.py::test_get_observations_by_obsid_single PASSED [ 9%]
kadi/commands/tests/test_commands.py::test_get_observations_by_obsid_multi PASSED [ 10%]
kadi/commands/tests/test_commands.py::test_get_observations_by_start_date PASSED [ 10%]
kadi/commands/tests/test_commands.py::test_get_observations_by_start_stop_date_with_scenario PASSED [ 11%]
kadi/commands/tests/test_commands.py::test_get_observations_no_match PASSED [ 12%]
kadi/commands/tests/test_commands.py::test_get_observations_start_stop_inclusion PASSED [ 12%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year0] PASSED [ 13%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year1] PASSED [ 13%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year2] PASSED [ 14%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year3] PASSED [ 14%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year4] PASSED [ 15%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year5] PASSED [ 15%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year6] PASSED [ 16%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year7] PASSED [ 17%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year8] PASSED [ 17%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year9] PASSED [ 18%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year10] PASSED [ 18%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year11] PASSED [ 19%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year12] PASSED [ 19%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year13] PASSED [ 20%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year14] PASSED [ 20%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year15] PASSED [ 21%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year16] PASSED [ 21%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year17] PASSED [ 22%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year18] PASSED [ 23%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year19] PASSED [ 23%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year20] PASSED [ 24%]
kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year21] PASSED [ 24%]
kadi/commands/tests/test_commands.py::test_get_starcat_agasc1p8_then_1p7 PASSED [ 25%]
kadi/commands/tests/test_commands.py::test_get_starcat_only_agasc1p8 PASSED [ 25%]
kadi/commands/tests/test_commands.py::test_get_starcats_with_cmds PASSED [ 26%]
kadi/commands/tests/test_commands.py::test_get_starcats_obsid PASSED [ 26%]
kadi/commands/tests/test_commands.py::test_get_starcats_date PASSED [ 27%]
kadi/commands/tests/test_commands.py::test_get_starcats_by_date PASSED [ 28%]
kadi/commands/tests/test_commands.py::test_get_starcats_as_table PASSED [ 28%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_case[ACISPKT| TLmSID= aa0000000, par1 = 1 , par2=-1.0] PASSED [ 29%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_case[AcisPKT|TLmSID=AA0000000 ,par1=1, par2=-1.0] PASSED [ 29%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_case[ACISPKT| TLmSID = aa0000000 , par1 =1, par2 = -1.0] PASSED [ 30%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_all[0] PASSED [ 30%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_all[1] PASSED [ 31%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_all[2] PASSED [ 31%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_all[3] PASSED [ 32%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_all[4] PASSED [ 32%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_all[5] PASSED [ 33%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_all[6] PASSED [ 34%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_all[7] PASSED [ 34%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_all[8] PASSED [ 35%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_all[9] PASSED [ 35%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_all[10] PASSED [ 36%]
kadi/commands/tests/test_commands.py::test_get_cmds_from_event_all[11] PASSED [ 36%]
kadi/commands/tests/test_commands.py::test_scenario_with_rts PASSED [ 37%]
kadi/commands/tests/test_commands.py::test_no_rltt_for_not_run_load PASSED [ 37%]
kadi/commands/tests/test_commands.py::test_30_day_lookback_issue PASSED [ 38%]
kadi/commands/tests/test_commands.py::test_fill_gaps PASSED [ 39%]
kadi/commands/tests/test_commands.py::test_get_rltt_scheduled_stop_time PASSED [ 39%]
kadi/commands/tests/test_commands.py::test_hrc_not_run_scenario PASSED [ 40%]
kadi/commands/tests/test_commands.py::test_command_not_run[case0] PASSED [ 40%]
kadi/commands/tests/test_commands.py::test_command_not_run[case1] PASSED [ 41%]
kadi/commands/tests/test_commands.py::test_command_not_run[case2] PASSED [ 41%]
kadi/commands/tests/test_commands.py::test_command_not_run[case3] PASSED [ 42%]
kadi/commands/tests/test_commands.py::test_command_not_run[case4] PASSED [ 42%]
kadi/commands/tests/test_commands.py::test_command_not_run[case5] PASSED [ 43%]
kadi/commands/tests/test_commands.py::test_add_cmds PASSED [ 43%]
kadi/commands/tests/test_commands.py::test_read_backstop_with_observations PASSED [ 44%]
kadi/commands/tests/test_states.py::test_acis_vidboard PASSED [ 45%]
kadi/commands/tests/test_states.py::test_acis_simode PASSED [ 45%]
kadi/commands/tests/test_states.py::test_cmd_line_interface PASSED [ 46%]
kadi/commands/tests/test_states.py::test_quick PASSED [ 46%]
kadi/commands/tests/test_states.py::test_states_2017 PASSED [ 47%]
kadi/commands/tests/test_states.py::test_pitch_2017 PASSED [ 47%]
kadi/commands/tests/test_states.py::test_sun_vec_versus_telemetry PASSED [ 48%]
kadi/commands/tests/test_states.py::test_dither PASSED [ 48%]
kadi/commands/tests/test_states.py::test_fids_state PASSED [ 49%]
kadi/commands/tests/test_states.py::test_get_continuity_regress PASSED [ 50%]
kadi/commands/tests/test_states.py::test_get_continuity_vs_states PASSED [ 50%]
kadi/commands/tests/test_states.py::test_get_states_with_cmds_and_start_stop PASSED [ 51%]
kadi/commands/tests/test_states.py::test_get_continuity_keys PASSED [ 51%]
kadi/commands/tests/test_states.py::test_get_continuity_fail PASSED [ 52%]
kadi/commands/tests/test_states.py::test_reduce_states_merge_identical[True] PASSED [ 52%]
kadi/commands/tests/test_states.py::test_reduce_states_merge_identical[False] PASSED [ 53%]
kadi/commands/tests/test_states.py::test_reduce_states_cmd_states PASSED [ 53%]
kadi/commands/tests/test_states.py::test_backstop_format PASSED [ 54%]
kadi/commands/tests/test_states.py::test_backstop_subformat PASSED [ 54%]
kadi/commands/tests/test_states.py::test_backstop_sun_pos_mon PASSED [ 55%]
kadi/commands/tests/test_states.py::test_backstop_sun_pos_mon_lunar PASSED [ 56%]
kadi/commands/tests/test_states.py::test_backstop_ephem_update PASSED [ 56%]
kadi/commands/tests/test_states.py::test_backstop_radmon_no_scs107 PASSED [ 57%]
kadi/commands/tests/test_states.py::test_backstop_radmon_with_scs107 XFAIL [ 57%]
kadi/commands/tests/test_states.py::test_backstop_scs98 PASSED [ 58%]
kadi/commands/tests/test_states.py::test_backstop_scs84 PASSED [ 58%]
kadi/commands/tests/test_states.py::test_backstop_simpos PASSED [ 59%]
kadi/commands/tests/test_states.py::test_backstop_simfa_pos PASSED [ 59%]
kadi/commands/tests/test_states.py::test_backstop_grating PASSED [ 60%]
kadi/commands/tests/test_states.py::test_backstop_eclipse_entry PASSED [ 60%]
kadi/commands/tests/test_states.py::test_regress_eclipse PASSED [ 61%]
kadi/commands/tests/test_states.py::test_continuity_just_after_command PASSED [ 62%]
kadi/commands/tests/test_states.py::test_continuity_far_future PASSED [ 62%]
kadi/commands/tests/test_states.py::test_acis_power_cmds PASSED [ 63%]
kadi/commands/tests/test_states.py::test_continuity_with_transitions_SPM PASSED [ 63%]
kadi/commands/tests/test_states.py::test_continuity_with_no_transitions_SPM PASSED [ 64%]
kadi/commands/tests/test_states.py::test_get_pitch_from_mid_maneuver PASSED [ 64%]
kadi/commands/tests/test_states.py::test_get_states_start_between_aouptarg_aomanuvr_cmds PASSED [ 65%]
kadi/commands/tests/test_states.py::test_get_continuity_and_pitch_from_mid_maneuver PASSED [ 65%]
kadi/commands/tests/test_states.py::test_acisfp_setpoint_state PASSED [ 66%]
kadi/commands/tests/test_states.py::test_grating_motion_states PASSED [ 67%]
kadi/commands/tests/test_states.py::test_hrc_states PASSED [ 67%]
kadi/commands/tests/test_states.py::test_hrc_states_with_scs_commanding PASSED [ 68%]
kadi/commands/tests/test_states.py::test_early_start_exception PASSED [ 68%]
kadi/commands/tests/test_states.py::test_nsm_continuity PASSED [ 69%]
kadi/commands/tests/test_states.py::test_sun_pos_mon_within_eclipse PASSED [ 69%]
kadi/commands/tests/test_states.py::test_sun_pos_mon_within_eclipse_no_spm_enab PASSED [ 70%]
kadi/commands/tests/test_states.py::test_get_continuity_acis_cmd_requires_obsid PASSED [ 70%]
kadi/commands/tests/test_states.py::test_get_continuity_spm_eclipse PASSED [ 71%]
kadi/commands/tests/test_validate.py::test_validate_subclasses PASSED [ 71%]
kadi/commands/tests/test_validate.py::test_validate_regression[False-ValidatePitch] PASSED [ 72%]
kadi/commands/tests/test_validate.py::test_validate_regression[False-ValidateRoll] PASSED [ 73%]
kadi/commands/tests/test_validate.py::test_validate_regression[False-ValidateDither] PASSED [ 73%]
kadi/commands/tests/test_validate.py::test_validate_regression[False-ValidatePcadMode] PASSED [ 74%]
kadi/commands/tests/test_validate.py::test_validate_regression[False-ValidateSimpos] PASSED [ 74%]
kadi/commands/tests/test_validate.py::test_validate_regression[False-ValidateObsid] PASSED [ 75%]
kadi/commands/tests/test_validate.py::test_validate_regression[False-ValidateLETG] PASSED [ 75%]
kadi/commands/tests/test_validate.py::test_validate_regression[False-ValidateHETG] PASSED [ 76%]
kadi/commands/tests/test_validate.py::test_validate_regression[False-ValidateSunPosMon] PASSED [ 76%]
kadi/commands/tests/test_validate.py::test_validate_regression[True-ValidatePitch] PASSED [ 77%]
kadi/commands/tests/test_validate.py::test_validate_regression[True-ValidateRoll] PASSED [ 78%]
kadi/commands/tests/test_validate.py::test_validate_regression[True-ValidateDither] PASSED [ 78%]
kadi/commands/tests/test_validate.py::test_validate_regression[True-ValidatePcadMode] PASSED [ 79%]
kadi/commands/tests/test_validate.py::test_validate_regression[True-ValidateSimpos] PASSED [ 79%]
kadi/commands/tests/test_validate.py::test_validate_regression[True-ValidateObsid] PASSED [ 80%]
kadi/commands/tests/test_validate.py::test_validate_regression[True-ValidateLETG] PASSED [ 80%]
kadi/commands/tests/test_validate.py::test_validate_regression[True-ValidateHETG] PASSED [ 81%]
kadi/commands/tests/test_validate.py::test_validate_regression[True-ValidateSunPosMon] PASSED [ 81%]
kadi/commands/tests/test_validate.py::test_off_nominal_roll_violations PASSED [ 82%]
kadi/tests/test_events.py::test_xdg_config_home_env_var PASSED [ 82%]
kadi/tests/test_events.py::test_overlapping_intervals PASSED [ 83%]
kadi/tests/test_events.py::test_interval_pads PASSED [ 84%]
kadi/tests/test_events.py::test_query_event_intervals PASSED [ 84%]
kadi/tests/test_events.py::test_basic_query PASSED [ 85%]
kadi/tests/test_events.py::test_short_query PASSED [ 85%]
kadi/tests/test_events.py::test_get_obsid PASSED [ 86%]
kadi/tests/test_events.py::test_intervals_filter PASSED [ 86%]
kadi/tests/test_events.py::test_get_overlaps PASSED [ 87%]
kadi/tests/test_events.py::test_select_overlapping PASSED [ 87%]
kadi/tests/test_occweb.py::test_put_get_user_none PASSED [ 88%]
kadi/tests/test_occweb.py::test_ifot_fetch PASSED [ 89%]
kadi/tests/test_occweb.py::test_get_fdb_major_events PASSED [ 89%]
kadi/tests/test_occweb.py::test_get_fot_major_events PASSED [ 90%]
kadi/tests/test_occweb.py::test_get_occweb_dir[False-str] PASSED [ 90%]
kadi/tests/test_occweb.py::test_get_occweb_dir[False-Path] PASSED [ 91%]
kadi/tests/test_occweb.py::test_get_occweb_dir[update-str] PASSED [ 91%]
kadi/tests/test_occweb.py::test_get_occweb_dir[update-Path] PASSED [ 92%]
kadi/tests/test_occweb.py::test_get_occweb_dir[True-str] PASSED [ 92%]
kadi/tests/test_occweb.py::test_get_occweb_dir[True-Path] PASSED [ 93%]
kadi/tests/test_occweb.py::test_get_occweb_noodle[True-False] PASSED [ 93%]
kadi/tests/test_occweb.py::test_get_occweb_noodle[True-True] PASSED [ 94%]
kadi/tests/test_occweb.py::test_get_occweb_noodle[False-False] PASSED [ 95%]
kadi/tests/test_occweb.py::test_get_occweb_noodle[False-True] PASSED [ 95%]
kadi/tests/test_occweb.py::test_all_get_occweb_noodle[FOT] PASSED [ 96%]
kadi/tests/test_occweb.py::test_all_get_occweb_noodle[GRETA/mission/Backstop] PASSED [ 96%]
kadi/tests/test_occweb.py::test_all_get_occweb_noodle[vweb] PASSED [ 97%]
kadi/tests/test_occweb.py::test_get_occweb_dir_fail[False] PASSED [ 97%]
kadi/tests/test_occweb.py::test_get_occweb_dir_fail[True] PASSED [ 98%]
kadi/tests/test_occweb.py::test_get_occweb_page_binary[False] PASSED [ 98%]
kadi/tests/test_occweb.py::test_get_occweb_page_binary[update] PASSED [ 99%]
kadi/tests/test_occweb.py::test_get_occweb_page_binary[True] PASSED [100%]
====================================================== warnings summary =======================================================
jupyter_client/connect.py:27
/Users/aldcroft/miniconda3-arm/envs/ska3/lib/python3.11/site-packages/jupyter_client/connect.py:27: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
given by the platformdirs library. To remove this warning and
see the appropriate new directories, set the environment variable
`JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
The use of platformdirs will be the default in `jupyter_core` v6
from jupyter_core.paths import jupyter_data_dir
kadi/commands/tests/test_commands.py: 14 warnings
/Users/aldcroft/miniconda3-arm/envs/ska3/lib/python3.11/site-packages/tables/node.py:251: DeprecationWarning: `alltrue` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `all` instead.
self._v_objectid = self._g_open()
kadi/tests/test_events.py::test_overlapping_intervals
/Users/aldcroft/miniconda3-arm/envs/ska3/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'
kadi/tests/test_events.py::test_overlapping_intervals
/Users/aldcroft/miniconda3-arm/envs/ska3/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
=================================== 181 passed, 1 xfailed, 17 warnings in 68.15s (0:01:08) ====================================
Out[5]: False
In [6]: agasc.__version__
Out[6]: '4.21.0'
In [7]: kadi.__version__
Out[7]: '7.11.0'
The warning is reproducible with ska_testr. It looks like ska_testr / run_testr calls pytest
with the "-s" flag in our default use of it, which looks to show "output" in the ... output.
ska3-jeanconn-fido> pytest -v -k test_get_starcat_only_agasc1p8 -s
=============================================================== test session starts ================================================================
platform linux -- Python 3.11.8, pytest-7.4.4, pluggy-1.4.0 -- /proj/sot/ska3/flight/bin/python3.11
cachedir: .pytest_cache
rootdir: /proj/sot/ska/jeanproj/git
configfile: pytest.ini
plugins: anyio-4.3.0, timeout-2.2.0
collected 182 items / 181 deselected / 1 selected
kadi/commands/tests/test_commands.py::test_get_starcat_only_agasc1p8 2024-07-29 19:31:04,606 set_star_ids: WARNING: star idx 11 not found in obsid 2576 at 2002:365:17:06:40.050
PASSED
======================================================== 1 passed, 181 deselected in 16.96s
I think this ska_testr change might still be the easiest thing...
Here is a fix for kadi:
Description
Handle kadi warning from 7.11.0 agasc test
Testing
Fixes