Closed orbeckst closed 3 years ago
Merging #52 (1631093) into master (4cb391f) will increase coverage by
0.11%
. The diff coverage isn/a
.:exclamation: Current head 1631093 differs from pull request most recent head 4572c0c. Consider uploading reports for the commit 4572c0c to get more accurate results
@@ Coverage Diff @@
## master #52 +/- ##
==========================================
+ Coverage 56.53% 56.64% +0.11%
==========================================
Files 12 13 +1
Lines 375 376 +1
Branches 47 47
==========================================
+ Hits 212 213 +1
Misses 160 160
Partials 3 3
Impacted Files | Coverage Δ | |
---|---|---|
MDAnalysisData/authors.py | 100.00% <0.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 4cb391f...4572c0c. Read the comment docs.
Hello @orbeckst! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:
I am not sure why coverage looks so abysmal. Otherwise this seems to work.
The docs build action will only run when it is merged into master.
Coverage is getting annoying on GitHub actions: I got the error
Coverage.py warning: No data was collected. (no-data-collected)
and following https://stackoverflow.com/a/60579142 I added tests/__init__.py
but now the generated authors file is not correctly picked up by the tests:
_________________________________ test_authors _________________________________
def test_authors():
authors = MDAnalysisData.__authors__
> assert authors[:5] == ["Oliver Beckstein", "Shujie Fan",
"Richard J. Gowers", "Micaela Matta",
"Lily Wang"]
E AssertionError: assert ['The MDAnaly...lopment Team'] == ['Oliver Beck..., 'Lily Wang']
E At index 0 diff: 'The MDAnalysis Development Team' != 'Oliver Beckstein'
E Right contains 4 more items, first extra item: 'Shujie Fan'
E Full diff:
E [
E + 'The MDAnalysis Development Team',
E - 'Oliver Beckstein',
E - 'Shujie Fan',
E - 'Richard J. Gowers',
E - 'Micaela Matta',
E - 'Lily Wang',
E ]
MDAnalysisData/tests/test_package_metadata.py:13: AssertionError
=============================== warnings summary ===============================
MDAnalysisData/__init__.py:20
/home/runner/work/MDAnalysisData/MDAnalysisData/MDAnalysisData/__init__.py:20: UserWarning: Could not find authors.py, __authors__ will be the generic MDAnalysis team.
warnings.warn('Could not find authors.py, __authors__ will be the '
I am not sure if it's trying to run the package from the sources instead from the proper installation.
The author tests work just fine if there is no tests/__init__.py
.
What exactly do pytest and coverage look for and where???
The only way I managed to solve the issue of getting both pytest and coverage to work was to use an in-place installation pip install -e .
.
(Seems a sub-par solution but for right now I take it and I am eager to hear better solutions and will happily implement them.)
https://stackoverflow.com/questions/20292950/making-py-test-coverage-and-tox-work-together-init-py-in-tests-folder seems to have some links for follow-up reading.
fix #48