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

Check if metadata attribute is not None before serialization #5076

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

registerrier
Copy link
Contributor

Description

This pull request solves issue #5075 .
Before serializing a specific metadata attribute to a set of header keywords, the to_header() method now checks that it is not None.

Dear reviewer

Signed-off-by: Régis Terrier <rterrier@apc.in2p3.fr>
Signed-off-by: Régis Terrier <rterrier@apc.in2p3.fr>
@registerrier registerrier added this to the 1.2 milestone Feb 2, 2024
@registerrier registerrier linked an issue Feb 2, 2024 that may be closed by this pull request
Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (b5fee6f) 75.00% compared to head (4f30e80) 75.00%.
Report is 7 commits behind head on main.

❗ Current head 4f30e80 differs from pull request most recent head d877e7a. Consider uploading reports for the commit d877e7a to get more accurate results

Files Patch % Lines
gammapy/modeling/models/temporal.py 22.22% 7 Missing ⚠️
gammapy/modeling/models/tests/test_temporal.py 22.22% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5076   +/-   ##
=======================================
  Coverage   75.00%   75.00%           
=======================================
  Files         232      232           
  Lines       34554    34554           
=======================================
  Hits        25917    25917           
  Misses       8637     8637           

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

bkhelifi
bkhelifi previously approved these changes Feb 2, 2024
Copy link
Member

@bkhelifi bkhelifi left a comment

Choose a reason for hiding this comment

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

Thanks a lot @registerrier

Signed-off-by: Régis Terrier <rterrier@apc.in2p3.fr>
@registerrier registerrier merged commit 09b9ee3 into gammapy:main Feb 2, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

PointingInfoMetaData serialization is failing
2 participants