-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Convert project to use a src layout #22
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #22 +/- ##
==========================================
- Coverage 86.63% 84.86% -1.77%
==========================================
Files 15 14 -1
Lines 591 555 -36
Branches 50 50
==========================================
- Hits 512 471 -41
- Misses 63 66 +3
- Partials 16 18 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This turned out to not be needed from #22
This turned out to not be needed from #22
@@ -5,7 +5,7 @@ error_summary = true | |||
files = | |||
packaging/, | |||
tests/, | |||
propcache/ | |||
src/propcache/ |
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.
@bdraco I concluded that it's possible to just have src/
here and then, this config can be synchronized across projects w/o needing to adjust project-specific names. Also, this list was supposed to be sorted so it'd be packaging, src, tests
.
|
||
|
||
cov: lint .develop | ||
pytest --cov propcache --cov-report html --cov-report term ./tests/ ./propcache/ | ||
pytest --cov src/propcache --cov-report html --cov-report term ./tests |
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.
@bdraco with .coveragerc
having all the necessary configuration, the pytest
invocations should just have the --cov
option without any arguments, which also makes sure that other parts of the layout are measured.
This probably also causes these weird paths under /Users/
to show up, like https://app.codecov.io/gh/aio-libs/propcache/tree/master/Users%2Frunner%2Fwork%2Fpropcache%2Fpropcache%2Fsrc%2Fpropcache. And I see that .py
files are displayed on the top level, while .pyx
are under src/
on Codecov.
--cov
corresponds to the source =
setting in Coveragepy which accepts both importable identifiers and file paths, which is ambiguous. To make it cleaner, .coveragerc
marks the entire project as source and specifies source_pkgs
which only works with importables.
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.
Oh.. there's actually another place that is missing — .coveragerc
's path mapping doesn't take into account src
which is likely one of the main causes of broken path mapping. Drop in this section https://github.com/ansible/awx_plugins.interfaces/blob/fc44b24/.coveragerc#L5-L12 to fix it. It maps src to site-packages w/o using project-specific names, which makes it copy-paste-friendly too.
What do these changes do?
Convert project to use a src layout
Are there changes in behavior for the user?
no, packaging change only
Related issue number
see #18