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

Fix pydocstyle was not called; update swig #120

Merged
merged 3 commits into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Install tox
pip install tox

# Update aptitude
# Update apt package lists
sudo apt-get update

# iterate over optional dependencies
Expand All @@ -12,7 +12,7 @@ for par in "$@"; do
amici)
# for amici
sudo apt-get install \
swig3.0 libatlas-base-dev libhdf5-serial-dev
swig libatlas-base-dev libhdf5-serial-dev
;;

doc)
Expand Down
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""yaml2sbml tests."""
36 changes: 18 additions & 18 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ envlist =
[testenv]
# Dependencies
deps =
coverage
pytest
pytest-cov
pytest-console-scripts
coverage >= 5.5
pytest >= 6.2.2
pytest-cov >= 2.11.1
pytest-console-scripts >= 1.1.0

# Sub-environments
# inherit settings defined in the base
Expand All @@ -32,29 +32,29 @@ deps =
# No installation of yaml2sbml required
skip_install = true
deps =
pygments
pyroma
pyroma >= 3.1
commands = pyroma --min=10 .
description =
Run pyroma to check the package friendliness

[testenv:flake8]
skip_install = true
deps =
flake8
flake8-bandit
flake8-bugbear
flake8-colors
flake8-commas
flake8-comprehensions
flake8-print
flake8-use-fstring
pep8-naming
pydocstyle
flake8 >= 3.8.3
flake8-bandit >= 2.1.2
flake8-bugbear >= 20.1.4
flake8-colors >= 0.1.6
flake8-commas >= 2.0.0
flake8-comprehensions >= 3.2.3
flake8-print >= 3.1.4
flake8-use-fstring >= 1.1
pep8-naming >= 0.11.1
pydocstyle >= 5.1.1
commands =
flake8 yaml2sbml tests setup.py
pydocstyle yaml2sbml tests setup.py
description =
Run flake8 with various plugins
Run flake8 with various plugins, and pydocstyle

[testenv:unittests]
commands =
Expand All @@ -67,7 +67,7 @@ description =

[testenv:notebooks]
deps =
nbmake
nbmake >= 0.4
# Extras required from yaml2sbml
extras = examples
commands =
Expand Down
4 changes: 4 additions & 0 deletions yaml2sbml/YamlModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,20 @@ def _get_reduced_model_dict(self) -> dict:

# functionalities regarding the time
def is_set_time(self):
"""Check whether there is a time variable."""
return 'variable' in self._yaml_model['time'].keys()

def set_time(self,
time_variable: str):
"""Set time variable."""
self._yaml_model['time'] = {'variable': time_variable}

def delete_time(self):
"""Delete time variable."""
self._yaml_model['time'] = {}

def get_time(self):
"""Get time variable."""
if self.is_set_time():
return self._yaml_model['time']['variable']
else:
Expand Down
2 changes: 2 additions & 0 deletions yaml2sbml/version.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""yaml2sbml version."""

__version__ = '0.2.1'
1 change: 0 additions & 1 deletion yaml2sbml/yaml2sbml.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ def _create_time(model: sbml.Model, time_var: str):
model: the SBML model to which the species will be added.
time_var: str, the time variable
"""

if time_var == 'time':
return

Expand Down