Skip to content

Commit

Permalink
Merge pull request #98 from PySCeS/development
Browse files Browse the repository at this point in the history
Bugfix Release 1.2.1
  • Loading branch information
jmrohwer committed May 10, 2024
2 parents 199cb37 + 999deba commit 865c8fc
Show file tree
Hide file tree
Showing 8 changed files with 176 additions and 115 deletions.
4 changes: 2 additions & 2 deletions .zenodo.json
Expand Up @@ -3,9 +3,9 @@
"license": "BSD-3-Clause",
"title": "The Python Simulator for Cellular Systems: PySCeS",
"notes": "If you use this software, please cite it using the information provided in this metadata.",
"version": "1.2.0",
"version": "1.2.1",
"upload_type": "software",
"publication_date": "2024-02-14",
"publication_date": "2024-05-10",
"creators": [{
"orcid": "0000-0002-5293-5321",
"affiliation": "Vrije Universiteit Amsterdam",
Expand Down
234 changes: 145 additions & 89 deletions CHANGES.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions CITATION.cff
@@ -1,6 +1,6 @@
# YAML 1.2
---
cff-version: "1.2.0"
cff-version: "1.2.1"
message: "If you use this software, please cite it using the information provided in this metadata."
authors:
-
Expand All @@ -14,9 +14,9 @@ authors:
affiliation: "Stellenbosch University"
orcid: "https://orcid.org/0000-0001-6288-8904"
title: "The Python Simulator for Cellular Systems: PySCeS"
version: "1.2.0"
repository-code: "https://github.com/PySCeS/pysces/tree/1.2.0"
date-released: 2024-02-14
version: "1.2.1"
repository-code: "https://github.com/PySCeS/pysces/tree/1.2.1"
date-released: 2024-05-10
doi: "10.5281/zenodo.2600905"
license: "BSD-3-Clause"
url: https://pysces.github.io
Expand Down
16 changes: 10 additions & 6 deletions INSTALL.md
Expand Up @@ -2,20 +2,24 @@

Binary install packages for all three OSs and recent Python versions are
provided. Anaconda packages are available for 64-bit Windows and Linux, as well as
macOS *x86_64* architecture. Apple Silicon (*arm64*) macOS users should install with
`pip` (see below). Anaconda users can conveniently install PySCeS with:
macOS *x86_64* and Apple Silicon (*arm64*) architectures. Anaconda users can
conveniently install PySCeS with:

```bash
$ conda install -c conda-forge -c pysces pysces
```

Any dependencies will be installed automatically, including the optional dependencies
*Assimulo*, *ipyparallel* and *libSBML*.
*Assimulo*, *ipyparallel* and *libSBML*.
> **NOTE:** Anaconda packages are only provided for Python versions 3.9-3.11. The
> reason is that Assimulo has not been ported to Python 3.12 and still depends on
> `numpy.distutils`. As soon as this has happened, PySCeS Anaconda packages for 3.12
> will be built.
Alternatively, you can use *pip* to
install PySCeS from PyPI. Core dependencies will be installed automatically. Wheels
are available for 64-bit Windows and Linux, as well as macOS architectures *x86_64* and
*arm64* (starting from PySCeS version 1.2.0).
install PySCeS from PyPI. Core dependencies will be installed automatically. Wheels
are available for 64-bit Windows and Linux, as well as macOS architectures *x86_64* and
*arm64* (starting from PySCeS version 1.2.0, supporting Python 3.11 and 3.12).

```bash
$ pip install pysces
Expand Down
2 changes: 1 addition & 1 deletion docs
18 changes: 13 additions & 5 deletions pysces/PyscesModel.py
Expand Up @@ -33,6 +33,7 @@
'''
import os, copy, time
import re
import pickle
import warnings
try:
Expand Down Expand Up @@ -4814,14 +4815,21 @@ def _update_assignment_rule_code(self, rule):
or s in self.__rules__
or s in self.__species__
):
# catch any _init so it doesn't get replaced
replacements.append((s + '_init', '_zzzz_'))
# deal with substrings in symbols
partialmatches = []
for sym in rule['symbols']:
if not re.fullmatch(s, sym) and re.search(s, sym):
partialmatches.append(sym)
# catch any partial matches so they don't get replaced
for e in enumerate(partialmatches):
replacements.append((e[1], f'_zzzz_{e[0]}_z'))
# replace symbol to get sim data
replacements.append(
('self.' + s, 'self.data_sim.getSimData("' + s + '")[p:q,1]')
(f'self.{s}', f'self.data_sim.getSimData("{s}")[p:q,1]')
)
# revert the _init
replacements.append(('_zzzz_', s + '_init'))
# revert the partial match symbol
for e in enumerate(partialmatches):
replacements.append((f'_zzzz_{e[0]}_z', e[1]))

for old, new in replacements:
rule['data_sim_string'] = rule['data_sim_string'].replace(old, new)
Expand Down
7 changes: 0 additions & 7 deletions pysces/PyscesStoich.py
Expand Up @@ -753,19 +753,12 @@ def PLUfactorize(self, a_in):
## except Exception, e:
## print "CLAPACK error", e

if a.shape[0] >= 500 or a.shape[1] >= 500:
print('\nMatrix {} using SciPy version: {} on {}'.format(a.shape, scipy.__version__, os.sys.platform))
print('Error 766 error detector: only report this if your Python crashes now ...')

if Using_FLAPACK == 1:
## results = getrf(numpy.transpose(a)) # brett 20041226
results = getrf(a) # brett 201106

results = list(results)

if a.shape[0] >= 500 or a.shape[1] >= 500:
print('766 error did not occur please continue as normal {} ...'.format(a.shape))

if results[2] < 0:
print('Argument ', results['info'], ' had an illegal value')
raise LinAlgError
Expand Down
2 changes: 1 addition & 1 deletion pysces/version.txt
@@ -1 +1 @@
1.2.0
1.2.1

0 comments on commit 865c8fc

Please sign in to comment.