Skip to content

Commit

Permalink
Devel (#171)
Browse files Browse the repository at this point in the history
* Minor bug fixes surrounding visualization due to matplotlib 3.3 deprecations

temp fix for NLEQ2 bug, use newton_linesearch instead

bumpversion

Documentation updates and fixes
bug fix in OptGp sampler

set commit to True

Bump version: 0.1.6rc0 → 0.1.6

* Turn off notebook execution (too long to run each time)

* pre-commit autoupdate
adjusted repostory link for flake8

Removed .bumpversion.cfg from manifest, now merged with setup.cfg

Removed safety from tox testing workflow

Unicode string prefix removed

setup.cfg updates for README and deprecations in setuptools

URL updates

Changed to assert statement due to return True deprecation

intersphinx link updates

Removed 3.10 until further testing

* Updates to test workflow file

Relaxed versioning requirements

Late add of 0.1.6 release notes

Dropped Python 3.6 support and updated files for deprecation warnings

broken link fixes

Escher conflict with versioning jinja2<3 but requirements are for jinja2>3, temp workaround for now with explicit ipywidget inclusion

* Temp solution to address sys-bio/roadrunner#651

* retry

* try linking ncurses with softlink

* Try using older ubuntu image

* Try updating libc6 for py39 dependency and replace ubuntu-latest with ubuntu-20.04 until ncurses issue addressed in libroadrunner

* revert back to latest

* Removed empty cell at top of notebook

Updated pandas append to concat to fix deprecation

tutorial update

Update roadrunner to v2.2

* Bump version: 0.1.7rc0 → 0.1.7
  • Loading branch information
z-haiman authored Dec 9, 2022
1 parent eb72690 commit 784bda5
Show file tree
Hide file tree
Showing 30 changed files with 4,984 additions and 4,902 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ on:
pip_opts:
description: Install options (pip)
required: false
default: '--upgrade --upgrade-strategy eager'
default: '--upgrade'
env:
ACTIONS_SETUP_PY3: ${{ github.event.inputs.py-act || '3.9' }}
PIP_INSTALL_OPTS: ${{ github.event.inputs.pip_opts || '--upgrade --upgrade-strategy eager' }}
PIP_INSTALL_OPTS: ${{ github.event.inputs.pip_opts || '--upgrade' }}
PY_COLORS: 1
DOCKER_IMAGE: sbrg/masspy

Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
py: [3.6, 3.7, 3.8, 3.9]
py: [3.7, 3.8, 3.9]
steps:
-
name: Checkout repository
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-toml
Expand Down Expand Up @@ -33,10 +33,10 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 21.12b0
rev: 22.10.0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
include \
*.yml \
*.yaml \
.bumpversion.cfg \
.dockerignore

graft docker
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ workflows and techniques. Additional information about [**COBRApy**][11] can be

Check out the following information from the [Quick Start](https://masspy.readthedocs.io/en/latest/installation/quickstart.html) guide to get started using MASSpy!

### With Python 3.6+
### With Python 3.7+

The recommended method is to install **MASSpy** is to use ``pip`` to
install the software from the [Python Package Index](https://pypi.org/project/masspy/)
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG python_version=3.7
ARG mass_version=0.1.7rc0
ARG mass_version=0.1.7
# Image to checkout and install a specific version of MASSpy
FROM python:${python_version} AS env-setup
ARG python_version
Expand Down
4 changes: 2 additions & 2 deletions docs/additional/code_repositories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ As a helpful reference, links to the documentation homepages are provided for a
* `Matplotlib <https://matplotlib.org/>`__
* `pandas <https://pandas.pydata.org/>`__
* `SymPy <https://www.sympy.org/>`__
* `libRoadRunner <http://libroadrunner.org/>`__
* `iPython <http://ipython.org/>`__ (`Jupyter <https://jupyter.org/>`__)
* `libRoadRunner <https://www.libroadrunner.org/>`__
* `iPython <https://ipython.org/>`__ (`Jupyter <https://jupyter.org/>`__)
* `Docker <https://docs.docker.com/>`__
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@

# Refer to the Python documentation for other libraries.
intersphinx_mapping = {
"http://docs.python.org/": None,
"https://docs.python.org/3/": None,
"https://cobrapy.readthedocs.io/en/latest/": None,
"https://libroadrunner.readthedocs.io/en/latest/": None,
"https://matplotlib.org/stable/": None,
"http://docs.scipy.org/doc/numpy/": None,
"https://numpy.org/doc/stable/": None,
"https://pandas.pydata.org/pandas-docs/stable/": None,
"http://docs.scipy.org/doc/scipy/reference": None,
"https://docs.scipy.org/doc/scipy/": None,
"https://docs.sympy.org/latest": None,
}
intersphinx_cache_limit = 10 # days to keep the cached inventories
9,341 changes: 4,669 additions & 4,672 deletions docs/education/sb2/chapters/sb2_chapter13.ipynb

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions docs/education/sb2/chapters/sb2_chapter14.ipynb

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion docs/education/sb2/chapters/sb2_chapter8.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2813,7 +2813,9 @@
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[93mWARNING:\u001b[0m \u001b[93mNo compartments found in model. Therefore creating compartment 'compartment' for entire model.\u001b[0m\n"
"\u001b[93mWARNING:\u001b[0m \u001b[93mNo compartments found in model. Therefore creating compartment 'compartment' for entire model.\u001b[0m\n",
"\u001b[93mWARNING:\u001b[0m \u001b[93mNo compartments found in model. Therefore creating compartment 'compartment' for entire model.\u001b[0m\n",
"\u001b[91mERROR:\u001b[0m \u001b[91mSomething unexpected occurred and the model could not be loaded into the current RoadRunner instance. Therefore initializing a new RoadRunner instance for the Simulation.\u001b[0m\n"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/gallery/visualization/animating_simulations.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/installation/solvers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The *Gurobi Optimizer* (Gurobi) is utilized through the `Gurobi Python Interface
* To use Gurobi, a license must be obtained. Free academic licences are available.
* To use Gurobi with Docker, a floating license is required.

`Homepage <https://www.gurobi.com/products/gurobi-optimizer/>`__ |
`Homepage <hhttps://www.gurobi.com/solutions/gurobi-optimizer/>`__ |
`Documentation <https://www.gurobi.com/documentation/>`__ |
`Academic License <https://www.gurobi.com/academia/academic-program-and-licenses/>`__ |
`Floating License <https://www.gurobi.com/documentation/9.0/quickstart_linux/retrieving_a_floating_lice.html>`__
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/compartments.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"volume_l\n",
"volume_m\n"
"volume_m\n",
"volume_l\n"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/constructing_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@
"metadata": {},
"source": [
"### Units\n",
"`Unit` and `UnitDefinition` objects are implemented as per the [SBML Unit](http://sbml.org/Software/libSBML/5.18.0/docs/python-api/classlibsbml_1_1_unit.html) and [SBML UnitDefinition](http://sbml.org/Software/libSBML/5.18.0/docs/python-api/classlibsbml_1_1_unit_definition.html) specifications.\n",
"`Unit` and `UnitDefinition` objects are implemented as per the [SBML Unit](https://synonym.caltech.edu/software/libsbml/5.18.0/docs/formatted/python-api/classlibsbml_1_1_unit.html) and [SBML UnitDefinition](https://synonym.caltech.edu/software/libsbml/5.18.0/docs/formatted/python-api/classlibsbml_1_1_unit_definition.html) specifications.\n",
"It can be useful for comparative reasons to create `Unit` and `UnitDefinition` objects for the model (e.g., amount, volume, time) to provide additional context. However, the model does not maintain unit consistency automatically. It is the responsibility of the users to ensure consistency among units and associated numerical values in a model."
]
},
Expand Down
21 changes: 13 additions & 8 deletions docs/tutorials/dynamic_simulation.ipynb

Large diffs are not rendered by default.

19 changes: 12 additions & 7 deletions docs/tutorials/getting_started_with_masspy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"To ensure all identifiers comply with [Systems Biology Markup Language (SBML)](http://sbml.org/Main_Page) and allow for interactive use, utilizing the identifiers from the [BiGG Models database](http://bigg.ucsd.edu/) is highly recommended.\n",
"To ensure all identifiers comply with [Systems Biology Markup Language (SBML)](https://sbml.org/) and allow for interactive use, utilizing the identifiers from the [BiGG Models database](http://bigg.ucsd.edu/) is highly recommended.\n",
"\n",
"Guidelines for BiGG identifiers are found [here](https://github.com/SBRG/bigg_models/wiki/BiGG-Models-ID-Specification-and-Guidelines)."
]
Expand Down Expand Up @@ -1418,7 +1418,7 @@
"metadata": {},
"source": [
"### Groups\n",
"Groups are objects for holding information regarding pathways, subsystems, or any custom grouping of objects within a `MassModel`. **MASSpy** directly utilizes the `cobra.Group` object, which are implemented based on the [SBML Group](http://sbml.org/Software/libSBML/5.18.0/docs/python-api/classlibsbml_1_1_group.html) specifications.\n",
"Groups are objects for holding information regarding pathways, subsystems, or any custom grouping of objects within a `MassModel`. **MASSpy** directly utilizes the `cobra.Group` object, which are implemented based on the [SBML Group](https://synonym.caltech.edu/software/libsbml/5.18.0/docs/formatted/python-api/group__groups.html) specifications.\n",
"\n",
"`Group` objects are stored in a `cobra.DictList` as the `groups` attribute of the `MassModel`."
]
Expand Down Expand Up @@ -1565,7 +1565,7 @@
"source": [
"### Units\n",
"\n",
"`Unit` and `UnitDefinition` objects are implemented, as per the [SBML Unit](http://sbml.org/Software/libSBML/5.18.0/docs/python-api/classlibsbml_1_1_unit.html) and [SBML UnitDefinition](http://sbml.org/Software/libSBML/5.18.0/docs/python-api/classlibsbml_1_1_unit_definition.html) specifications. The primary purpose of these objects is to inform users of the model's units, providing context to model values and observed results.\n",
"`Unit` and `UnitDefinition` objects are implemented, as per the [SBML Unit](https://synonym.caltech.edu/software/libsbml/5.18.0/docs/formatted/python-api/classlibsbml_1_1_unit.html) and [SBML UnitDefinition](https://synonym.caltech.edu/software/libsbml/5.18.0/docs/formatted/python-api/classlibsbml_1_1_unit_definition.html) specifications. The primary purpose of these objects is to inform users of the model's units, providing context to model values and observed results.\n",
"\n",
"It is important to note that unit consistency is **NOT** checked by the `MassModel`, meaning that it is incumbent upon users to maintain consistency of units and associated numerical values in a model. \n",
"\n",
Expand Down Expand Up @@ -1658,8 +1658,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"kind: mole; exponent: 1; scale: -3; multiplier: 1\n",
"kind: litre; exponent: -1; scale: 0; multiplier: 1\n"
"kind: litre; exponent: -1; scale: 0; multiplier: 1\n",
"kind: mole; exponent: 1; scale: -3; multiplier: 1\n"
]
}
],
Expand Down Expand Up @@ -1723,7 +1723,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3.9.5 ('beng123')",
"language": "python",
"name": "python3"
},
Expand All @@ -1737,7 +1737,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.15"
"version": "3.9.5"
},
"vscode": {
"interpreter": {
"hash": "8e44e5c2ac5fdd4cabb24e42b49ad4e0bc098b81974ee0e625739ea45ccb12a4"
}
}
},
"nbformat": 4,
Expand Down
13 changes: 12 additions & 1 deletion docs/tutorials/network_visualization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"The **Escher** package must already be installed into the environment. To install **Escher**:\n",
"\n",
"```python\n",
"pip install escher\n",
"pip install escher>=1.7\n",
"```\n",
"\n",
"## Viewing Models with Escher\n",
Expand Down Expand Up @@ -475,6 +475,17 @@
"\n",
"* [Animating Simulations with Escher](../gallery/visualization/animating_simulations.ipynb)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<div class=\"alert alert-warning\"> \n",
"Due to versioning compatibility issues, it is possible that Jinja2==3.1.2 must be installed. See issue \n",
"\n",
"* https://github.com/zakandrewking/escher/issues/377\n",
"</div>"
]
}
],
"metadata": {
Expand Down
11 changes: 8 additions & 3 deletions docs/tutorials/reading_writing_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"**MASSpy** utilizes the [libSBML](http://sbml.org/Software/libSBML/5.18.0/docs/python-api/) package to read and write SBML files, supporting both the [FBC](http://sbml.org/Software/libSBML/5.18.0/docs/python-api/group__fbc.html) (Version 2) and the [Groups](http://sbml.org/Software/libSBML/5.18.0/docs/python-api/group__groups.html) (Version 1) extensions.\n",
"**MASSpy** utilizes the [libSBML](https://synonym.caltech.edu/software/libsbml/5.18.0/docs/formatted/python-api/) package to read and write SBML files, supporting both the [FBC](https://synonym.caltech.edu/software/libsbml/5.18.0/docs/formatted/python-api/group__fbc.html (Version 2) and the [Groups](https://synonym.caltech.edu/software/libsbml/5.18.0/docs/formatted/python-api/group__groups.html) (Version 1) extensions.\n",
"When reading in a model, **MASSpy** automatically detects whether the FBC and/or Groups extensions were used.\n",
"\n",
"To preserve information specific to `EnzymeModule` objects, the SBML Groups extension is used along with the notes section for SBML objects. The `use_groups_package` argument can be utilized to indicate whether to write `cobra.Group` objects to the SBML file, including `EnzymeModule` information. Disabling this extension may result in a loss of some enzyme specific information (e.g., categorized groups), but it does not prevent species and reactions of the enzyme module\n",
Expand Down Expand Up @@ -341,7 +341,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3.9.5 ('beng123')",
"language": "python",
"name": "python3"
},
Expand All @@ -355,7 +355,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.15"
"version": "3.9.5"
},
"vscode": {
"interpreter": {
"hash": "8e44e5c2ac5fdd4cabb24e42b49ad4e0bc098b81974ee0e625739ea45ccb12a4"
}
}
},
"nbformat": 4,
Expand Down
262 changes: 127 additions & 135 deletions docs/tutorials/thermo_concentrations.ipynb

Large diffs are not rendered by default.

14 changes: 6 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ build-backend = "setuptools.build_meta"
[tool.black]
line-length = 88
python-version = [
"py36",
"py37",
"py38",
"py39"
Expand Down Expand Up @@ -91,8 +90,7 @@ envlist =
clean,
lint,
pypi-description,
safety,
py3{6,7,8,9},
py3{7,8,9},
docs,
report
isolated_build = true
Expand All @@ -101,7 +99,6 @@ skip_missing_interpreters = true
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
Expand All @@ -116,10 +113,10 @@ setenv =
PYTHONUNBUFFERED=yes
PY_COLORS={env:PY_COLORS:1}
usedevelop = true
install_command = python -m pip install --upgrade --upgrade-strategy eager {opts} {packages}
install_command = python -m pip install --upgrade {opts} {packages}
depends =
py3{6,7,8,9}: clean
report: py3{6,7,8,9}
py3{7,8,9}: clean
report: py3{7,8,9}
[testenv:clean]
Expand All @@ -140,6 +137,7 @@ setenv =
deps =
pre-commit
commands =
pre-commit install
pre-commit autoupdate
pre-commit run --all-files --show-diff-on-failure
Expand All @@ -154,7 +152,7 @@ commands =
safety check --full-report
[testenv:py3{6,7,8,9}]
[testenv:py3{7,8,9}]
description = Run tests under {basepython}.
extras = tests
commands =
Expand Down
3 changes: 3 additions & 0 deletions release-notes/0.1.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Release notes for MASSpy 0.1.6

* This will be the last version of MASSpy to support Python 3.6.
9 changes: 9 additions & 0 deletions release-notes/0.1.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Release notes for MASSpy 0.1.7

* Dropped support Python 3.6.

## Fixes

* Fixed versioning issues in installation
* Fixed documentation issues
* Other minor fixes
24 changes: 10 additions & 14 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.7rc0
current_version = 0.1.7
commit = True
tag = False
tag_name = v{new_version}
Expand Down Expand Up @@ -51,17 +51,15 @@ classifiers =
Natural Language :: English
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering :: Bio-Informatics
license = MIT
license_file = LICENSE
license_files = LICENSE
description = MASSpy is a package for dynamic modeling of biological processes.
long_description = file: README.rst
long_description_content_type = text/x-rst
long_description = file: README.md
long_description_content_type = text/markdown
keywords =
python
metabolism
Expand All @@ -80,25 +78,23 @@ keywords =
zip_safe = True
install_requires =
cobra<0.24.0
libroadrunner==2.1.3
numpy<1.22
libroadrunner~=2.2
numpy
scipy
optlang
pandas
scipy
six
sympy
tabulate
python_requires = ~=3.6
include_package_data = True
packages = find:
python_requires = ~=3.7
packages = find_namespace:
package_dir =
= src
include_package_data = True

[options.packages.find]
where = src
include =
mass

[options.extras_require]
visualization =
Expand All @@ -109,7 +105,7 @@ development =
towncrier
tox
docs =
escher
ipywidgets
ipykernel
nbsphinx
notebook
Expand Down
Loading

0 comments on commit 784bda5

Please sign in to comment.