Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set min_violation_duration to 180s for pcad validation #338

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

jeanconn
Copy link
Contributor

@jeanconn jeanconn commented Oct 10, 2024

Description

Set min_violation_duration to 180s for pcad validation.

Fixes validation violation day 2024:281 - pitch attitude error delaying NPNT transition.

Requires

  • ska_sun master @646785e
  • ska_helpers master@8692a46

Interface impacts

None

Testing

Unit tests

  • Mac
(ska3) ➜  kadi git:(pcad-cebr-pad) git rev-parse HEAD
be9da8110f52aabedff67190097836b27440172d
(ska3) ➜  kadi git:(pcad-cebr-pad) env PYTHONPATH=/Users/aldcroft/git/ska_sun:/Users/aldcroft/git/ska_helpers 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 182 items                                                                                            

kadi/commands/tests/test_commands.py ................................................................... [ 36%]
...............                                                                                                                                    [ 45%]
kadi/commands/tests/test_states.py .......................x.........................                     [ 71%]
kadi/commands/tests/test_validate.py ...................                                                 [ 82%]
kadi/tests/test_events.py ..........                                                                     [ 87%]
kadi/tests/test_occweb.py ......................                                                         [100%]

================================== 181 passed, 1 xfailed in 71.31s (0:01:11) ===================================

Independent check of unit tests by Jean

  • Mac arm64
be9da8110f52aabedff67190097836b27440172d
(ska3-flight-latest) flame:kadi 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 182 items                                                                                                                                                                     

kadi/commands/tests/test_commands.py .......s.........................................................................s                                                           [ 45%]
kadi/commands/tests/test_states.py .......................x.........................                                                                                              [ 71%]
kadi/commands/tests/test_validate.py ...................                                                                                                                          [ 82%]
kadi/tests/test_events.py ..........                                                                                                                                              [ 87%]
kadi/tests/test_occweb.py ......................                                                                                                                                  [100%]

=================================================================================== warnings summary ====================================================================================
kadi/kadi/tests/test_events.py::test_overlapping_intervals
  /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'

kadi/kadi/tests/test_events.py::test_overlapping_intervals
  /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
=========================================================== 179 passed, 2 skipped, 1 xfailed, 2 warnings in 78.57s (0:01:18)

Functional tests using be9da81

This removes the violation near 2024:281:18:46:49.

In [12]: pcad = ValidatePcadMode("2024:283", days=3, no_exclude=True)

In [13]: pcad.violations
Out[13]: 
<Table length=1>
        start                  stop        
        str21                 str21        
--------------------- ---------------------
2024:281:11:44:08.786 2024:281:11:51:20.311  # This is an SRDC and normally is auto-excluded

@taldcroft taldcroft changed the base branch from master to better-validation-regression-data October 26, 2024 10:17
@taldcroft
Copy link
Member

taldcroft commented Oct 26, 2024

@jeanconn - I rebased this off of #340 and then ran the new command to update the regression data for the failed test:

env KADI_VALIDATE_WRITE_REGRESSION=1 pytest -k True-ValidatePcadMode -s -v

This is now based off of #340 and should be good to go.

@taldcroft taldcroft changed the base branch from better-validation-regression-data to better-transitions October 29, 2024 09:37
@taldcroft taldcroft marked this pull request as ready for review October 29, 2024 09:52
@taldcroft taldcroft force-pushed the better-transitions branch 2 times, most recently from 29aa3d7 to c40f3b4 Compare November 2, 2024 14:49
Base automatically changed from better-transitions to master November 5, 2024 16:40
@taldcroft
Copy link
Member

Ugh, these chained PR's don't always work out, especially since #340 got squash/merged. I just cherry-picked the two original commits onto master and that seems to have worked out.

@jeanconn jeanconn merged commit cf1d90d into master Nov 5, 2024
4 checks passed
@jeanconn jeanconn deleted the pcad-cebr-pad branch November 5, 2024 22:05
@javierggt javierggt mentioned this pull request Dec 9, 2024
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