sot / kadi

Chandra commands and events
https://sot.github.io/kadi
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Deprecate kadi load_ska_dir() in favor of parse_cm load_dir_from_load_name #310

Closed taldcroft closed 5 months ago

taldcroft commented 5 months ago

Description

The kadi.commands.core function load_ska_dir() has been superceded by parse_cm.paths.load_dir_from_load_name(). This PR re-implements the kadi load_ska_dir() function as a call to load_dir_from_load_name() and issues a deprecation FutureWarning.

Interface impacts

This function is now deprecated and using it will cause unit tests to fail or issue warnings to the console. From https://github.com/search?q=org%3Asot%20ska_load_dir&type=code it seems that only mica was using this (fixed in https://github.com/sot/mica/pull/288).

Testing

Unit tests

kadi/commands/tests/test_commands.py ...................................................................................... [ 37%] kadi/commands/tests/test_states.py ......................x.............................................x....................... [ 77%] kadi/commands/tests/test_validate.py .................... [ 86%] kadi/tests/test_events.py .......... [ 90%] kadi/tests/test_occweb.py ...................... [100%]

================================================================== 228 passed, 2 xfailed in 98.30s (0:01:38) ===================================================================


Independent check of unit tests by [REVIEWER NAME]
- [ ] [PLATFORM]:

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

I think you've used FutureWarning in recent work (like https://github.com/sot/chandra_cmd_states/blob/efd4c947c6508c63df232344d58696fa9d11a6eb/chandra_cmd_states/__init__.py#L17) so maybe that's our convention?