cobrapy
cobrapy copied to clipboard
add compare.py which contains functions for comparing.
- [X] description of feature Added functions for comparing models, metabolites, reactions, groups, genes. This is an adaptation of a function I used to compare XML and MAT models of the same file.
I'm not sure what tests to add for this. Maybe we can replace the test.test_io.conftest.py compare_mdoels() function with this one.
- [ ] tests added/passed
- [ ] add an entry to the next release
Codecov Report
Attention: Patch coverage is 47.91667% with 75 lines in your changes are missing coverage. Please review.
Project coverage is 83.52%. Comparing base (
c3376da) to head (4b92ed9). Report is 162 commits behind head on devel.
| Files | Patch % | Lines |
|---|---|---|
| src/cobra/util/compare.py | 36.11% | 67 Missing and 2 partials :warning: |
| src/cobra/core/solution.py | 79.31% | 5 Missing and 1 partial :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## devel #1206 +/- ##
==========================================
- Coverage 84.44% 83.52% -0.93%
==========================================
Files 66 67 +1
Lines 5511 5602 +91
Branches 1265 1289 +24
==========================================
+ Hits 4654 4679 +25
- Misses 557 617 +60
- Partials 300 306 +6
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I'm a bit unsure if this should be in the cobrapy package, part of a cookbook, or possibly a cobra-tools package or so. Let's discuss at the dev meeting!
Since the test suite is now separated, maybe this could also live there? There is some value to have it for testing purposes...
I'd be happy to move it to the testing suite. This really helped me working on MAT import to make sure it is the same as SBML. If I move it to the testing suite, how thorough should the testing of the compare function be? I'm working on testing that it gives the appropriate results, but I'm not sure that is appropriate/necessary if it lives in the testing suite.
Would you like me to move the compare function to tests? I can do that.