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

Fix test failure from updated MUPS model #230

Merged
merged 1 commit into from
May 18, 2022
Merged

Fix test failure from updated MUPS model #230

merged 1 commit into from
May 18, 2022

Conversation

taldcroft
Copy link
Member

Description

This fixes the failure below, which is due to a change in the number of "bad" samples after the underlying MUPS thermal model was changed in chandra_models master since the test was written. The original test was badly designed and susceptible to this failure.

_______________________________ test_mups_valve ________________________________

    def test_mups_valve():
        colnames = ['vals', 'times', 'bads', 'vals_raw',
                    'vals_nan', 'vals_corr', 'vals_model', 'source']
    
        # Use the chandra_models 6854df4d commit for testing. This is a commit of
        # chandra_models that has the epoch dates changes to fully-qualified values
        # like 2017:123:12:00:00 (instead of 2017:123). This allows these regression
        # tests to pass with Chandra.Time 3.x or 4.0+.
        dat = fetch_eng.MSID('PM2THV1T_clean_6854df4d', '2020:001:12:00:00', '2020:010:12:00:00')
        assert dat.unit == 'DEGF'
        assert len(dat.vals) == 36661
...
        # Check using default master branch
        dat = fetch_eng.Msid('pm1thv2t_clean', '2020:001:12:00:00', '2020:010:12:00:00')
>       assert len(dat.vals) == 36240  # Some bad values
E       assert 36639 == 36240
E         +36639
E         -36240

Interface impacts

None

Testing

Unit tests

  • Mac

Functional tests

No functional testing.

@taldcroft taldcroft requested a review from javierggt May 18, 2022 13:31
@javierggt
Copy link
Contributor

I ran the tests manually with the current release and with this branch and can confirm this PR fixes it.

@javierggt javierggt merged commit b08148c into master May 18, 2022
@javierggt javierggt mentioned this pull request May 31, 2022
@javierggt javierggt mentioned this pull request Aug 3, 2022
@taldcroft taldcroft deleted the fix-mups-test branch August 9, 2022 13:09
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