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: Handle importing XML measurements with no POI attribute #1933

Merged
merged 2 commits into from
Aug 10, 2022

Conversation

kratsg
Copy link
Contributor

@kratsg kratsg commented Aug 10, 2022

Description

See #1909.

Add runtime check for missing POI in XML measurements. XML measurements are not necessarily required to have a POI, but we require it, so need to fix coverage.

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* Add runtime check for missing POI in XML measurements. XML measurements are not
necessarily required to have a POI, but we require it, so need to fix coverage.
* Add test and test XML files for missing POI in XML configs.

@kratsg kratsg added the fix A bug fix label Aug 10, 2022
@kratsg kratsg self-assigned this Aug 10, 2022
@codecov
Copy link

codecov bot commented Aug 10, 2022

Codecov Report

Merging #1933 (1915293) into master (18bc4ec) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1933   +/-   ##
=======================================
  Coverage   98.22%   98.22%           
=======================================
  Files          68       68           
  Lines        4330     4334    +4     
  Branches      729      730    +1     
=======================================
+ Hits         4253     4257    +4     
  Misses         45       45           
  Partials       32       32           
Flag Coverage Δ
contrib 26.34% <0.00%> (-0.03%) ⬇️
doctest 60.61% <0.00%> (-0.06%) ⬇️
unittests-3.10 96.10% <100.00%> (+<0.01%) ⬆️
unittests-3.7 96.08% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pyhf/readxml.py 95.88% <100.00%> (+0.09%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@matthewfeickert matthewfeickert added the tests pytest label Aug 10, 2022
Copy link
Member

@matthewfeickert matthewfeickert left a comment

Choose a reason for hiding this comment

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

LGTM. 👍 Thanks @kratsg!

@kratsg kratsg merged commit 1ed7003 into master Aug 10, 2022
@kratsg kratsg deleted the fix/poiNone branch August 10, 2022 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A bug fix tests pytest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants