Fix an issue where SBML models with a "created" date would break lots of the cobrapy functionality.
Temporary fix of restricting numpy to <1.24 as that release introduces breaking changes both in cobrapy and dependencies
Other
Deprecated features
Backwards incompatible changes
0.26.0
New features
* View number of genes in model notebook representation. * added support for Python 3.11
Fixes
* serializes GPRs to strings to avoid massive storage usage * Reformatted example files (e_coli_core.xml, mini_cobra.xml, mini.json, mini.yml, textbook.xml.gz) to be more compliant with identifiers.org. * ncbigi is not a valid identifiers.org, so it was replaced with ncbiprotein. * make sbml.py subsystem reading add partonomy, which matches the definition of SBO:0000633 (see https://sourceforge.net/p/sbo/term-request/113/) * Correct reading and writing of subsystem in mat. * General cleanup of code in mat.py * fix the pandas deprecation warning in `find_external_compartment` * fix an issue where creating a Formula object would give a recursion error
Other
* Resolve `flake8` issues and add missing type annotations and docstrings in `src/cobra/io` and `tests/test_io` (1212). * Updated model.py and test_model.py to Python 3.6+, including type annotations and docstrings. * Resolve remaining `flake8` issues and enable the check in GitHub Actions Lint workflow (1272).
Deprecated features
* dropped support for Python 3.6
Backwards incompatible changes * Removed `model.add_reaction()` and replaced remaining usages of it with `model.add_reactions()` * Removed the following tests: test_add_remove_reaction_benchmark, test_add_reaction, test_add_reaction_context, test_add_reaction_from_other_model, test_add_cobra_reaction * Removed `model.__add__` and `model.__iadd__` - use `model.merge` to replace them. * Remove `Model().description()`. * Remove `Model().get_metabolite_compartments()`.
0.25.0
New features
* Add `knock_out_model_genes` to simulate knock-outs, setting reaction bounds of affected reactions to zero and returning a list of reactions that were knocked-out. Replaces `delete_model_genes` and `undelete_model_genes` since it is context sensitive. * Improve reading of matlab models which will include metabolite and reaction annotations.
Fixes
* `model.copy()` will now correctly copy GPRs. * Fix an error where matlab models can not be read if their bounds exceed the configuration default in some cases. * Fixed some bugs in `GPR().from_string()` where it was using the unmodified string, leading to errors with `GPR`s that should work. Made `GPR`s that have empty parenthesis fail more comprehensibly.
Other
* Move tests to a different directory, from `src/cobra/test` to `tests` (1191). * Add two tests for `GPR` fixes: * `test_gpr_wrong_input()` * `test_gpr_that_needs_two_replacements()` * Clean up Python syntax (1152, 1153, 1171, 1173, 1182)
* Remove `find_gene_knockout_reactions` from `delete.py` * Remove `_find_gene_knockout_reactions_fast`, `_gene_knockout_computation`, `_get_removed ` from `test_delete.py` * Remove `pymatlib` direct transfer of models to matlab process. Please use `save_matlab_model()` and then read the model in matlab.
0.24.0
New features
* Gene-protein-reaction association rules are now represented by a structured object `GPR`. `Reaction.gene_reaction_rule` still returns a string and a string can be assigned to it that will modify the underlying `GPR` instance. * The `Reaction` class has gained another attribute `Reaction.gpr` which allows direct access to the `GPR` instance (1143).
Fixes
* Syntax update and type annotations (1151).
0.23.0
Fixes
- Make compatible with Python 3.10 - Use the internal semantic GPR parser in the SBML module - Setting a growth medium will not reset export flux bounds anymore
Other
- Clean up code (1116, 1114, 1113, 1111, 1110, 1097)
0.22.1
Fixes
- Fix an old bug with double gene deletion that was not knocking-out combinations (1103). - Lots of syntax, annotation, and docstring fixes (1081, 1083, 1084, 1085, 1086, 1088, 1090, 1091, 1092, 1093, 1094, 1095, 1096).