Visitar URL original
Add hello world example and check to tests by matthewfeickert · Pull Request #215 · scikit-hep/pyhf · GitHub
Skip to content

Add hello world example and check to tests - #215

Merged
lukasheinrich merged 3 commits into
masterfrom
docs/add-hello-world-example-and-check
Aug 26, 2018
Merged

lukasheinrich merged 3 commits into
masterfrom
docs/add-hello-world-example-and-check

Conversation

@matthewfeickert

@matthewfeickert matthewfeickert commented Aug 26, 2018 •

Copy link
Copy Markdown
Member

Resolves #214

Checklist Before Requesting Approver

  • Tests are passing
  • "WIP" removed from the title of the pull request

As Python2 doesn't have extended unpacking (c.f. PEP 3132) the unpacking
in the example needs to be changed to pass the CI
@matthewfeickert matthewfeickert added feat/enhancement New feature or request docs Documentation related labels Aug 26, 2018
@matthewfeickert matthewfeickert self-assigned this Aug 26, 2018
@matthewfeickert matthewfeickert changed the title Add hello world example and check to tests WIP: Add hello world example and check to tests Aug 26, 2018
@matthewfeickert
matthewfeickert force-pushed the docs/add-hello-world-example-and-check branch from a590513 to 519f99e Compare August 26, 2018 01:23
This is done by explicitly calling doctest on the README in the docs
section of the CI. This is done instead of adding the README to
--doctest-glob in pytest.ini so as to keep the example in the README
displaying Python3 code.
@kratsg

kratsg commented Aug 26, 2018

Copy link
Copy Markdown
Contributor

Extended Upacking is a python 3 feature only. Just need to fix *_ and you're good, I think.

@coveralls

coveralls commented Aug 26, 2018 •

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 97.228% when pulling 09c04da on docs/add-hello-world-example-and-check into e9d9f11 on master.

@matthewfeickert
matthewfeickert force-pushed the docs/add-hello-world-example-and-check branch from 519f99e to 09c04da Compare August 26, 2018 01:28
@matthewfeickert

matthewfeickert commented Aug 26, 2018 •

Copy link
Copy Markdown
Member Author

Extended Upacking is a python 3 feature only.

Yeah, that's exactly what I say in this commit.

However, I would prefer to not have Python2 code in the very first examples people see (for a few reasons) so I've just switched to explicitly calling doctest in the docs CI. Is that okay with people?

@matthewfeickert matthewfeickert changed the title WIP: Add hello world example and check to tests Add hello world example and check to tests Aug 26, 2018
@lukasheinrich

Copy link
Copy Markdown
Contributor

nice. thanks @matthewfeickert

@lukasheinrich
lukasheinrich merged commit 2f5f094 into master Aug 26, 2018
@kratsg
kratsg deleted the docs/add-hello-world-example-and-check branch August 26, 2018 14:27
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

Successfully merging this pull request may close these issues.

4 participants