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

Use explicit time units in time delta #61

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

taldcroft
Copy link
Contributor

@taldcroft taldcroft commented Feb 1, 2023

Description

In ska3-prime with astropy 5.2, doing something like CxoTime("2020:001") + 7 generates a warning. The 7 should now be explicitly labeled as days via 7 * u.day with import astropy.units as u.

See sot/skare3#1055.

This fixes the warning in this package by using an explicit unit for a time arithmetic operation.

Interface impacts

None

Testing

Unit tests

  • Mac (on HEAD kady using ska3-prime Python 3.10)

Independent check of unit tests by [REVIEWER NAME]

  • [PLATFORM]:

Functional tests

Just to be sure, I ran tests to raise an exception for the warning in question.

env PYTHONWARNINGS=error:Numerical pytest acis_thermal_check -v

@taldcroft taldcroft marked this pull request as draft February 2, 2023 11:06
@taldcroft taldcroft marked this pull request as ready for review February 2, 2023 13:40
@taldcroft
Copy link
Contributor Author

Ping @jzuhone - we'd like to get this into ska3-prime so we get clean pytest runs.

@taldcroft
Copy link
Contributor Author

And beyond just testing, this warning will show up on console every time you run an ACIS thermal checker.

Copy link
Member

@jzuhone jzuhone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on my end.

@jzuhone jzuhone merged commit 3234bd6 into acisops:master Feb 6, 2023
@javierggt javierggt mentioned this pull request Mar 13, 2023
@javierggt javierggt mentioned this pull request May 17, 2023
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.

None yet

2 participants