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

feat: Add contextlib support to pyhf.schema API #1818

Merged
merged 14 commits into from
Mar 23, 2022

Conversation

kratsg
Copy link
Contributor

@kratsg kratsg commented Mar 23, 2022

Pull Request Description

Resolves #1815, originally asked on #1753.

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 contextlib support to the pyhf.schema API.
   - Follow up to PR #1753.
* Add tests for use of the schema contextlib to tests/test_schema.py.
* Add tests for use of the schema contextlib to the public API tests.

@kratsg kratsg added API Changes the public API feat/enhancement New feature or request labels Mar 23, 2022
@kratsg kratsg self-assigned this Mar 23, 2022
@codecov
Copy link

codecov bot commented Mar 23, 2022

Codecov Report

Merging #1818 (d111ca7) into master (6d03b9e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1818   +/-   ##
=======================================
  Coverage   98.16%   98.16%           
=======================================
  Files          68       68           
  Lines        4310     4315    +5     
  Branches      725      725           
=======================================
+ Hits         4231     4236    +5     
  Misses         46       46           
  Partials       33       33           
Flag Coverage Δ
contrib 26.44% <33.33%> (+0.01%) ⬆️
doctest 60.78% <100.00%> (+0.04%) ⬆️
unittests-3.10 96.03% <100.00%> (+<0.01%) ⬆️
unittests-3.7 96.02% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
src/pyhf/schema/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d03b9e...d111ca7. Read the comment docs.

@matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert added the tests pytest label Mar 23, 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.

Thanks for this PR following up on your nice PR #1753 @kratsg. 🙂 You made this easy to review, so thanks for splitting it out. 👍

I have one super tiny suggestion for the examples, but this might be a nit, and so feel free to ignore. Other than that this LGTM, so I'll approve.

src/pyhf/schema/__init__.py Outdated Show resolved Hide resolved
src/pyhf/schema/__init__.py Outdated Show resolved Hide resolved
@kratsg
Copy link
Contributor Author

kratsg commented Mar 23, 2022

All resolved.

@matthewfeickert matthewfeickert merged commit 569f512 into master Mar 23, 2022
@matthewfeickert matthewfeickert deleted the feat/schemaContextLib branch March 23, 2022 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes the public API feat/enhancement New feature or request tests pytest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add contextlib support to the pyhf.schema API
2 participants