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

Add check for Hello World in README #214

Closed
matthewfeickert opened this issue Aug 25, 2018 · 2 comments
Closed

Add check for Hello World in README #214

matthewfeickert opened this issue Aug 25, 2018 · 2 comments
Assignees
Labels
docs Documentation related feat/enhancement New feature or request

Comments

@matthewfeickert
Copy link
Member

matthewfeickert commented Aug 25, 2018

I just realized that I don't think that we actually have a check anywhere for the "Hello World" example that is in the README.

>>> import pyhf
>>> import pyhf.simplemodels
>>> p = pyhf.simplemodels.hepdata_like(signal_data=[12.,11.], bkg_data=[50.,52.], bkg_uncerts=[3.,7.])
>>> *_, CLs_obs,CLs_exp = pyhf.runOnePoint(1.0, [51, 48] + p.config.auxdata, p)
>>> print('obs: {} exp: {}'.format(CLs_obs, CLs_exp[2]))
obs: [0.05290116] exp: [0.06445521]

If something was going to break the README example it would break elsewhere as well, but we wouldn't also realize that we need to update the README example. For example, the above should now be pyhf.utils.runOnePoint.

Unless there is an alternative suggestion I'll open a PR that will add a notebook to both the CI and to the docs.

@matthewfeickert matthewfeickert added feat/enhancement New feature or request docs Documentation related labels Aug 25, 2018
@matthewfeickert matthewfeickert self-assigned this Aug 25, 2018
@kratsg
Copy link
Contributor

kratsg commented Aug 26, 2018

Doctesting should catch it if we add the readme in.

@matthewfeickert
Copy link
Member Author

Ah, okay I'll add that in the PR. I didn't know that it could also get the README, but it is just another file (so duh yeah it can).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related feat/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants