Closed xrotwang closed 5 years ago
Merging #237 into master will decrease coverage by
93.58%
. The diff coverage is0%
.
@@ Coverage Diff @@
## master #237 +/- ##
=========================================
- Coverage 93.58% 0% -93.59%
=========================================
Files 25 24 -1
Lines 2917 2915 -2
=========================================
- Hits 2730 0 -2730
- Misses 187 2915 +2728
Impacted Files | Coverage Δ | |
---|---|---|
beastling/fileio/datareaders.py | 0% <0%> (-89.95%) |
:arrow_down: |
beastling/clocks/random.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/clocks/relaxed.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/clocks/strict.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/beast_maps.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/treepriors/coalescent.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/models/mk.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/clocks/baseclock.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/models/covarion.py | 0% <0%> (-98.44%) |
:arrow_down: |
beastling/treepriors/base.py | 0% <0%> (-98.42%) |
:arrow_down: |
... and 15 more |
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 072de64...c598875. Read the comment docs.
Merging #237 into master will decrease coverage by
93.58%
. The diff coverage is0%
.
@@ Coverage Diff @@
## master #237 +/- ##
=========================================
- Coverage 93.58% 0% -93.59%
=========================================
Files 25 24 -1
Lines 2917 2915 -2
=========================================
- Hits 2730 0 -2730
- Misses 187 2915 +2728
Impacted Files | Coverage Δ | |
---|---|---|
beastling/fileio/datareaders.py | 0% <0%> (-89.95%) |
:arrow_down: |
beastling/clocks/random.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/clocks/relaxed.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/clocks/strict.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/beast_maps.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/treepriors/coalescent.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/models/mk.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/clocks/baseclock.py | 0% <0%> (-100%) |
:arrow_down: |
beastling/models/covarion.py | 0% <0%> (-98.44%) |
:arrow_down: |
beastling/treepriors/base.py | 0% <0%> (-98.42%) |
:arrow_down: |
... and 15 more |
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 072de64...c598875. Read the comment docs.
So what do I run to do these tests locally instead of my old nosetests
?
You install all test/dev requirements running pip install -r requirements.txt
, and then simply pytest
. Arguments for pytest
are configured in setup.cfg
.
Okay, I'm officially Pleased as Punch with this! I just did a pytest tests/fileio_tests.py
and it only ran the tests in that file and then quit. Even though I'm, heaven forbid, not in a virtualenv! This sounds like a ludicrously straightforward thing to get excited about, but literally none of our previous test setups have worked like this for me.
I think the test files got a lot simpler, too. So I'd say that's a good basis to move forward.
If you don't have stuff to fold into beastling right now, I'd have a go at removing all PY2 compat stuff, so we can startout with an even leaner codebase.
Nope, nothing to fold in for now. Even though we now have validate_ids()
in place, I'd like to start shifting toward a system where a lot of these IDs are generated programmatically, rather than being handwritten. So I'm liable to be thinking about big future overhauls for a while, rather than hacking in random little bits and pieces. In other words, this is a fine time to have a go at killing PY2.
Are you ok with also rolling in some xml creation refactoring?
Hmm, what did you have in mind?
I just wanted to replace all the ET.SubElement
or ET.Element
calls with calling a utility function, which can add some syntactic sugar to
range
attribute will be ",".join
ed).And add explicit element functions named after the tag names to an xml module, so that the tab-completion in the IDE prevents mistyping tag names.
Okay, sounds good!
Btw. looking over all instances of ET.SubElement
calls, I noticed one where a tag dist
was created - not distr
or distribution
. Dunno if that's a bug, but it was the only instance such a tag was created.
And now I can ask the IDE to show all places where xml.dist
was used - and can easily refactor if that's a bug.
If it's in the BSVS model, for an operator, then it's correct.
I de-activated the assertions for the currently failing beastrun tests, see #235