cobrapy icon indicating copy to clipboard operation
cobrapy copied to clipboard

Fix 673

Open akaviaLab opened this issue 2 years ago • 2 comments

  • [X] fix #673
  • [X] description of feature/fix Fix #673 by making reactions in species search the model fields, if this species is in a model. Added checks in the code to copy the reaction if it is in a model that isn't the one it is added to. Added properties reaction.metabolites as a settable property, added reaction_add, reaction_remove, reaction_clear to species.py, in order to minimize use of ._reaction.
  • [X] tests added/passed test_add_reactions_with_context test_add_reactions_from_another_model
  • [X] add an entry to the next release

akaviaLab avatar Aug 10 '22 00:08 akaviaLab

Fixed almost everything. If I remove context from species/remove_reaction, species/add_reaction almost everything works, which is simpler.

However, test_remove_genes_with_context() breaks. Can you help me fix that? I'm not good with contexts. The previous version would not try to update contexts when calling add_reaction or remove_reaction from _associate_gene/__dissociate_gene and that would work.

akaviaLab avatar Aug 11 '22 17:08 akaviaLab

@cdiener - can you help me fix test_remove_genes_with_context() please

akaviaLab avatar Aug 20 '22 21:08 akaviaLab