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

test: Consolidate and update pytest options in pyproject.toml #121

Merged
merged 5 commits into from Feb 10, 2022

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Feb 10, 2022

Description

Remove .coveragerc and consolidate pytest options to pyproject.toml (this results in --cov-branch getting added.) In doing so, also apply the Configuring pytest recommendations from Scikit-HEP that Henry wrote.

* Remove .coveragerc and consolidate pytest options to pyproject.toml.
* Apply 'configuring pytest' recommendations for pytest from Scikit-HEP
(c.f. https://scikit-hep.org/developer/pytest#configuring-pytest ).
   - '-ra' includes a report after pytest runs with a summary on all tests
     except those that passed. From 'pytest --help':
     > -r chars: show extra test summary info as specified by chars: (f)ailed,
     > (E)rror, (s)kipped, (x)failed, (X)passed, (p)assed, (P)assed with output,
     > (a)ll except passed (p/P), or (A)ll. (w)arnings are enabled by default
     > (see --disable-warnings), 'N' can be used to reset the list. (default: 'fE').
   - '-Wd' enables all warnings.
     > It adds 'd' to sys.warnoptions, which in turn adds a new first entry to
     > _warnings.filters which matches all warnings and enables the "default"
     > behavior, which is to show it once per execution of the Python interpreter.
     c.f. https://mail.python.org/pipermail/python-dev/2010-April/099116.html
   - '--showlocal' prints locals in tracebacks.
   - '--strict-markers' will complain if you use an unspecified fixture.
   - '--strict-config' will raise an error if there is a mistake in the pytest config.
   - 'log_cli_level = "info"' reports INFO and above log messages on a failure.
* Remove '-r sx' from pytest calls in CI jobs as pyproject.toml now applies '-ra'.
* Remove .coverage file added (accidentally?) in 134b6b4c2db3da65ee8198891049d1b8fdbdb2b4

@codecov
Copy link

codecov bot commented Feb 10, 2022

Codecov Report

Merging #121 (0620e80) into master (2962fad) will decrease coverage by 0.63%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #121      +/-   ##
==========================================
- Coverage   81.00%   80.37%   -0.64%     
==========================================
  Files          33       33              
  Lines        2280     2298      +18     
  Branches      361      368       +7     
==========================================
  Hits         1847     1847              
- Misses        334      350      +16     
- Partials       99      101       +2     
Flag Coverage Δ
unittests 80.37% <ø> (-0.64%) ⬇️

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

Impacted Files Coverage Δ
src/yadage/backends/federatedbackend.py 71.42% <0.00%> (-8.58%) ⬇️
src/yadage/backends/__init__.py 59.25% <0.00%> (-4.75%) ⬇️
src/yadage/backends/trivialbackend.py 86.20% <0.00%> (-3.08%) ⬇️
src/yadage/stages.py 89.47% <0.00%> (-2.42%) ⬇️
src/yadage/utilcli.py 78.26% <0.00%> (-2.34%) ⬇️
src/yadage/steering.py 79.12% <0.00%> (-1.78%) ⬇️
src/yadage/backends/caching.py 94.53% <0.00%> (-1.51%) ⬇️
src/yadage/backends/packtivitybackend.py 65.30% <0.00%> (-1.37%) ⬇️
src/yadage/utils.py 87.02% <0.00%> (-0.67%) ⬇️
src/yadage/manualcli.py 71.66% <0.00%> (-0.47%) ⬇️

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 2962fad...0620e80. Read the comment docs.

@matthewfeickert
Copy link
Member Author

Should take the approach of scikit-hep/pyhf#1773, but this is a simpler but less complete approach for the time being as there are lots of other problems with yadage to fix first.

@matthewfeickert matthewfeickert merged commit 314078e into master Feb 10, 2022
@matthewfeickert matthewfeickert deleted the tests/consolidate-pytest-options branch February 10, 2022 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant