opencobra / memote

memote – the genome-scale metabolic model test suite
https://memote.readthedocs.io/
Apache License 2.0
123 stars 26 forks source link

Bug in unit testing (possible upstream problem) #704

Closed carrascomj closed 3 years ago

carrascomj commented 3 years ago

Problem description

Please explain:

pytest is failing because cobra.flux_analysis.single_cell_deletion is returning the gene ids as a column "ids" instead of as the index (as it is in its docstring). Maybe this is a problem on cobrapy or the expected behavior has changed and the docstring is outdated. In the latter case, I have a branch working here https://github.com/carrascomj/memote/tree/fix-test-essentiality

Code Sample

Create a minimal, complete, verifiable example. Under the memote repository root:

python -m pytest tests/test_for_experimental/test_for_config.py

Traceback: https://github.com/opencobra/memote/pull/703/checks

Context

``` System Information ================== OS Linux OS-release 5.8.12-arch1-1 Python 3.6.12 Package Versions ================ Jinja2 2.11.2 click 7.1.2 click-configfile 0.2.3 click-log 0.3.2 cobra 0.19.0 cookiecutter 1.7.2 depinfo 1.5.4 equilibrator-api 0.1.26 future 0.18.2 gitpython 3.1.9 goodtables 2.5.1 importlib-resources 3.0.0 lxml 4.5.2 memote 0.11.1+20.gea06738 numpydoc 1.1.0 pandas 1.1.2 pip 20.2.1 pylru 1.2.0 pytest 6.1.0 requests 2.24.0 ruamel.yaml 0.16.12 setuptools 50.1.0 six 1.15.0 sqlalchemy 1.3.19 sympy 1.6.2 travis-encrypt 1.1.2 wheel 0.35.1 ```
Midnighter commented 3 years ago

Yes, pandas changed API and we had to change this in cobrapy. See https://github.com/opencobra/cobrapy/pull/980

carrascomj commented 3 years ago

Thanks for the quick reply! I will make a PR, then