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 circular import on map.read #5603

Merged
merged 1 commit into from
Nov 25, 2024
Merged

Conversation

Astro-Kirsty
Copy link
Member

Resolves #5600

@Astro-Kirsty Astro-Kirsty added bug backport-v1.3.x on-merge: backport to v1.3.x labels Nov 25, 2024
@Astro-Kirsty Astro-Kirsty added this to the 1.3 milestone Nov 25, 2024
Copy link
Contributor

@registerrier registerrier left a comment

Choose a reason for hiding this comment

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

Thanks @Astro-Kirsty ! Looks good. Can you add a test for this. I am really surprised that an error of something as simple as Map.read was not seen on the CI.

Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.60%. Comparing base (ccb8bc8) to head (d5dc78b).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5603   +/-   ##
=======================================
  Coverage   94.60%   94.60%           
=======================================
  Files         232      232           
  Lines       36394    36394           
=======================================
  Hits        34432    34432           
  Misses       1962     1962           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@Astro-Kirsty
Copy link
Member Author

Thanks @Astro-Kirsty ! Looks good. Can you add a test for this. I am really surprised that an error of something as simple as Map.read was not seen on the CI.

As we discussed I think it is due to the imports we have, i.e. we import many things in the tests but it was failing specifically when only importing Map. Not sure how we can add a test to catch this?

Signed-off-by: Astro-Kirsty <AstroKirsty@gmail.com>
@registerrier
Copy link
Contributor

Thanks @Astro-Kirsty ! Looks good. Can you add a test for this. I am really surprised that an error of something as simple as Map.read was not seen on the CI.

As we discussed I think it is due to the imports we have, i.e. we import many things in the tests but it was failing specifically when only importing Map. Not sure how we can add a test to catch this?

well technically the existing test on make_map_rgb should be failing already. And the docstring of the function too. The docstring test runs while executing it in an ipython session fails...

@registerrier registerrier merged commit 57bf209 into gammapy:main Nov 25, 2024
18 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/gammapy that referenced this pull request Nov 25, 2024
registerrier added a commit that referenced this pull request Nov 25, 2024
…3-on-v1.3.x

Backport PR #5603 on branch v1.3.x (Fix circular import on map.read)
@Astro-Kirsty Astro-Kirsty deleted the fix_circular branch November 25, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v1.3.x on-merge: backport to v1.3.x bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Map.read causes circular import
2 participants