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 roll optimize deepcopy issue and fix warning in tests #220

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

taldcroft
Copy link
Member

@taldcroft taldcroft commented Jan 4, 2025

Description

This fixes a problem seen in testing of 2025.1rc2, with the root cause being a changed introduced by astropy/astropy#15871.

It also makes a non-impacting change in tests to use Table.pformat() instead of Table.pformat_all(), since they are equivalent in astropy >= 7.0.

Interface impacts

None

Testing

Unit tests

  • Mac
ska3-flight-2025.0rc2) ➜  sparkles git:(fix-roll-optimize-deepcopy-issue) git rev-parse --short HEAD
c003f24
(ska3-flight-2025.0rc2) ➜  sparkles git:(fix-roll-optimize-deepcopy-issue) pytest                    
================================================= test session starts =================================================
platform darwin -- Python 3.12.8, pytest-8.3.4, pluggy-1.5.0
rootdir: /Users/aldcroft/git
configfile: pytest.ini
plugins: anyio-4.7.0, timeout-2.3.1
collected 104 items                                                                                                   

sparkles/tests/test_checks.py ............................................................................      [ 73%]
sparkles/tests/test_find_er_catalog.py .....                                                                    [ 77%]
sparkles/tests/test_review.py ...................                                                               [ 96%]
sparkles/tests/test_yoshi.py ....                                                                               [100%]

================================================ 104 passed in 29.43s =================================================

Independent check of unit tests by Javier

  • Linux
(ska3-flight-2025.0rc4) jgonzale sparkles $ pytest sparkles/
============================================================= test session starts =============================================================
platform linux -- Python 3.12.8, pytest-8.3.4, pluggy-1.5.0
rootdir: /proj/sot/ska/jgonzalez/git
configfile: pytest.ini
plugins: anyio-4.7.0, timeout-2.3.1
collected 104 items                                                                                                                           

sparkles/tests/test_checks.py ............................................................................                              [ 73%]
sparkles/tests/test_find_er_catalog.py .....                                                                                            [ 77%]
sparkles/tests/test_review.py ...................                                                                                       [ 96%]
sparkles/tests/test_yoshi.py ....                                                                                                       [100%]

======================================================= 104 passed in 80.71s (0:01:20) ========================================================
(ska3-flight-2025.0rc4) jgonzale sparkles $ git rev-parse --short HEAD
c003f24

Functional tests

No functional testing.

@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.2.2
rev: v0.8.5
Copy link
Contributor

Choose a reason for hiding this comment

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

0.8.6 was released two hours ago :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Hah.

Copy link
Contributor

@javierggt javierggt left a comment

Choose a reason for hiding this comment

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

The changes make sense to me and I verified that tests pass.

sparkles/roll_optimize.py Show resolved Hide resolved
@taldcroft taldcroft merged commit 37b0522 into master Jan 6, 2025
2 checks passed
@taldcroft taldcroft deleted the fix-roll-optimize-deepcopy-issue branch January 6, 2025 16:43
This was referenced Jan 23, 2025
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