-
Notifications
You must be signed in to change notification settings - Fork 55
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
Codecov and flake8 fix #99
Conversation
Codecov Report
@@ Coverage Diff @@
## master #99 +/- ##
==========================================
- Coverage 51.19% 51.12% -0.08%
==========================================
Files 40 40
Lines 9586 9608 +22
==========================================
+ Hits 4908 4912 +4
- Misses 4678 4696 +18
Continue to review full report at Codecov.
|
Nice stuff, let me just add this link to codecov path fixing docs for further information - I was missing the key step that the paths stored in |
Okay this should be all the flake8 fixes. There were some keyword arguments which were overshadowing builtins, such that changing them would break backwards compatibility. This is how I handled them:
|
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.
I need to start using _i
for "inactive" counters as well
Purpose
This PR updates the codecov setup to not install/test in place. This is important since
setup.py
mistakes could be undetected when installing in place (see #97). As a result of that, this PR will fail until those changes are merged into master and subsequently into this branch (which will verify that these changes are working).For a bit of background on what's going on, let's talk about two things.
First, Python package imports:
sys.path
will contain the current directory, meaning that even if you installed a package intosite-packages
, if you runtestflo
from the root it will attempt to use the local version instead. This is the reason why installing with -e worked without path fixing (see below), which confused me a lot. I'm sure this can be adjusted from thetestflo
side but I feel there is no elegant solution there. Instead, in this PR the tests are run once wecd
into thetests
directory.Secondly, path fixing in
codecov
.testflo
usescoverage.py
to provide the coverage report, which contains the full path of all the files in the package. In order to make the paths shorter and more readable,codecov
provides a mechanism to essentially search and replace these file paths. Previously we had one line incodecov.yml
* to get rid of the Docker paths, and now I've added a second line to replace thesite-packages
paths to shorten everything. This should allow a seamless transition to usingpip install .
*: we actually don't use this file because they do not support using them this way. Instead, their web UI allows specifying "Team YAML" config which is shared, and I have been maintaining both just so others know what our YAML file looks like.
Type of change
What types of change is it?
Select the appropriate type(s) that describe this PR