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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3f3305c
add compare.py which contains functions for comparing.
Apr 25, 2022
3580819
fix typing and imports
Apr 25, 2022
101551d
fix .gitignore to ignore sonarlint
May 3, 2022
7419721
revised compare.py and the comparing functions
May 3, 2022
670877d
added typing and docstrings
May 3, 2022
4112af2
initial tests for compare.py
May 3, 2022
6c91335
tidying of compare.py
May 7, 2022
3f0d530
tidying of compare.py
May 9, 2022
edc4305
fixed some reaction comparison tests
May 10, 2022
2f835a6
fix: resolve E501 for mat.py
synchon May 1, 2022
7ab716e
fix: resolve F401 for cobrapy_repository.py
synchon May 1, 2022
48e433d
fix: resolve B008 and B014 for load.py
synchon May 1, 2022
0f90469
refactor: resolve D100, D103 and add type annotations and docstrings …
synchon May 1, 2022
7106669
refactor: resolve D100, add type annotations, docstrings and upgrade …
synchon May 2, 2022
0502729
refactor: resolve D100, D041 and add type annotations, docstrings for…
synchon May 2, 2022
deff161
refactor: resolve D100, F841 and add type annotations, docstrings for…
synchon May 2, 2022
aa1778e
refactor: resolve D100, D103 and add type annotations, docstrings for…
synchon May 2, 2022
8bc63e5
refactor: resolve D401, F841 and add type annotations and docstrings …
synchon May 3, 2022
434bd48
fix: docstrings fixes for test_annotation.py and test_annotation_form…
synchon May 3, 2022
015690e
chore: improve file opening for test_load.py
synchon May 3, 2022
547b2f8
chore: improve file opening for test_annotation.py
synchon May 3, 2022
3b206c1
chore: improve pytest exception handling for test_load.py
synchon May 4, 2022
2d61932
chore: add changes in next-release.md
synchon May 4, 2022
ddcd502
refactor: proper use of package import for loading resources in cobra…
synchon May 4, 2022
4d7ff97
refactor: group default repositories for load.py
synchon May 4, 2022
5a0313e
refactor: use pathlib.Path.open() for loading model in test_laod.py
synchon May 4, 2022
e98d19c
refactor: rename cobra/data/init.py to cobra/data/__init__.py
synchon May 4, 2022
cb32e2e
chore: remove unnecessary boilerplate code for singleton.py
synchon May 4, 2022
3c2362c
chore: resolve F401 for species.py
synchon May 4, 2022
e17425f
refactor: resolve F401, D103 and add type annotations, docstrings for…
synchon May 5, 2022
fb7c34d
refactor: resolve flake8 issue and add type annotations and upgrade c…
synchon May 5, 2022
3326064
refactor: remove try...except block for pytest import in conftest.py
synchon May 5, 2022
7bd0c61
refactor: remove LegacySolution class from codebase
synchon May 6, 2022
95acae6
refactor: resolve flake8 issues and add type annotations, docstrings …
synchon May 6, 2022
0a26462
refactor: resolve flake8 issues and type annotations, docstrings for …
synchon May 6, 2022
8fe367a
refactor: add further type annotations and correct f-string formattin…
synchon May 6, 2022
d55dddf
added some gene comparison tests
May 10, 2022
21eba62
black
May 10, 2022
4b92ed9
black again
May 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,6 @@ docs/_build/
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
Expand Down Expand Up @@ -302,3 +300,6 @@ gurobi.log
/documentation_builder/test*\.*
/.benchmarks
/.testmondata

# sonarlint
.idea/sonarlint*
2 changes: 2 additions & 0 deletions release-notes/next-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

## Other

* Resolve `flake8` issues and add missing type annotations and docstrings in `src/cobra/io` and `tests/test_io` (#1212).

## Deprecated features

## Backwards incompatible changes
2 changes: 1 addition & 1 deletion src/cobra/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
from cobra.core.object import Object
from cobra.core.reaction import Reaction
from cobra.core.group import Group
from cobra.core.solution import Solution, LegacySolution, get_solution
from cobra.core.solution import Solution, get_solution
from cobra.core.species import Species
3 changes: 3 additions & 0 deletions src/cobra/core/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from typing import Optional

from cobra.util import resettable


class Object:
"""Defines common behavior of object in cobra.core."""
Expand Down Expand Up @@ -81,6 +83,7 @@ def annotation(self) -> dict:
return self._annotation

@annotation.setter
@resettable
def annotation(self, annotation):
"""Set annotation.

Expand Down
4 changes: 0 additions & 4 deletions src/cobra/core/singleton.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-

"""Define the singleton meta class."""

from __future__ import absolute_import


class Singleton(type):
"""Implementation of the singleton pattern as a meta class."""
Expand Down
Loading