Skip to content
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

add compare.py which contains functions for comparing. #1206

Open
wants to merge 39 commits into
base: devel
Choose a base branch
from

Conversation

akaviaLab
Copy link
Contributor

  • 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.

@akaviaLab akaviaLab mentioned this pull request Apr 29, 2022
3 tasks
@codecov-commenter
Copy link

codecov-commenter commented May 2, 2022

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 ⚠️
src/cobra/core/solution.py 79.31% 5 Missing and 1 partial ⚠️
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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

uri.akavia and others added 25 commits May 3, 2022 10:01
Added test for everything in reactions except annotation, notes
Added test for everything in reactions
Added test for ignore_keys in reactions
Made annotation resettable
added metabolite comparison tests
) -> Tuple[bool, Dict]:
"""Cmpare two cobra Objects (including subclasses).

Useful for Metaboite, and Gene Comparison.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo Metaboite

@Midnighter
Copy link
Member

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!

@cdiener
Copy link
Member

cdiener commented May 11, 2022

Since the test suite is now separated, maybe this could also live there? There is some value to have it for testing purposes...

@akaviaLab
Copy link
Contributor Author

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.

@akaviaLab
Copy link
Contributor Author

Would you like me to move the compare function to tests? I can do that.

@akaviaLab akaviaLab mentioned this pull request Jun 7, 2022
3 tasks
@cdiener cdiener added the stale The issue or pull request lacks activity. label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale The issue or pull request lacks activity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants