-
Notifications
You must be signed in to change notification settings - Fork 85
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: Remove 'src' from pytest test testpaths to allow for non-editable install in CI #1467
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1467 +/- ##
=======================================
Coverage 98.04% 98.04%
=======================================
Files 63 63
Lines 4145 4145
Branches 572 572
=======================================
Hits 4064 4064
Misses 48 48
Partials 33 33
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
7b20f95
to
20fd450
Compare
Avoids in pip 21.3+: DEPRECATION: In-tree builds are now the default. pip 22.1 will enforce this behaviour change.
0df71e7
to
4cccfc9
Compare
Relevant RTD build page: https://pyhf--1467.org.readthedocs.build/en/1467/#hello-world |
Changes look fine, I only disagree with this line in the changelog:
You can't invalidate the benefits of a src directory with this; this is the benefit of a src directory. There's no way to import Also, if you do coverage testing, I think you'll need an editable install (which is fine, you should be able to do either one). |
Yeah, you're right. Edited. Thanks for the catch.
Can you elaborate a bit on this? The below seems to be working for generating a coverage file and reporting - name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade .[test]
...
- name: Test with pytest
run: |
pytest -r sx --ignore tests/benchmarks/ --ignore tests/contrib --ignore tests/test_notebooks.py
- name: Report core project coverage with Codecov
if: github.event_name != 'schedule' && matrix.python-version == 3.9 && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
flags: unittests Why do we need an editable install? (I could be missing something very obvious) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some other unrelated changes made their way into this PR as well.
I thought that coverage was picky about the paths that it reports, that is, if it's reporting |
CodeCov seems to be happy. :) |
Ah okay, thanks for the clarification. Agreed, as CodeCov seems happy then I think we're good here. Thanks for taking time to look this over though @henryiii — always appreciate your time and input! |
Description
Resolves #1456
Checklist Before Requesting Reviewer
Before Merging
For the PR Assignees: