Skip to content

Commit

Permalink
update py versions in CI matrix (pysb#584)
Browse files Browse the repository at this point in the history
* remove python 3.7 and add 3.11 in version matrix (fixes pysb#582)
* Fix one regex with a syntax that's invalid in 3.11 (flags must now come first)
* Switch test runner to to pynose, the maintained fork of nose
* Include simulator.templates in setup.py package list
* Enable python faulthandler for test runs to help diagnose errors in native code
* Update readthedocs config to define new build section (fixes pysb#585)
---------

Co-authored-by: Jeremy Muhlich <[email protected]>
  • Loading branch information
FFroehlich and jmuhlich authored Feb 5, 2024
1 parent 9921446 commit 23fc948
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/pysb-conda-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ dependencies:
- cython
- matplotlib
- networkx
- nose
- h5py
- pexpect
- pandas
Expand All @@ -24,3 +23,4 @@ dependencies:
- pip:
- libroadrunner
- python-libsbml
- pynose
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
exclude:
# Fails due to Atomizer linker/runtime issue
- os: windows-latest
python-version: 3.7
python-version: ["3.8", "3.9", "3.10", "3.11"]
defaults:
run:
shell: bash -l {0}
Expand Down Expand Up @@ -42,6 +38,8 @@ jobs:
- name: Build PySB
run: python setup.py build --build-lib=build/lib
- name: Run nosetests
env:
PYTHONFAULTHANDLER: 1
run: >
nosetests
build/lib/pysb
Expand Down
6 changes: 5 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

build:
os: "ubuntu-22.04"
tools:
python: "3.8"

# Required
version: 2

Expand All @@ -14,6 +19,5 @@ formats:
- pdf

python:
version: 3.8
install:
- requirements: doc/requirements.txt
2 changes: 1 addition & 1 deletion pysb/export/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,6 @@ def export(model, format, docstring=None):
def pad(text, depth=0):
"Dedent multi-line string and pad with spaces."
text = textwrap.dedent(text)
text = re.sub(r'^(?m)', ' ' * depth, text)
text = re.sub(r'(?m)^', ' ' * depth, text)
text += '\n'
return text
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ def main():
url='http://pysb.org/',
packages=['pysb', 'pysb.generator', 'pysb.importers', 'pysb.tools',
'pysb.examples', 'pysb.export', 'pysb.simulator',
'pysb.testing', 'pysb.tests'],
'pysb.simulator.templates', 'pysb.testing', 'pysb.tests'],
scripts=['scripts/pysb_export'],
# We should really specify some minimum versions here.
python_requires='>=3.6',
install_requires=['numpy', 'scipy>=1.1', 'sympy>=1.6,<1.12',
'networkx'],
setup_requires=['nose'],
setup_requires=['pynose'],
tests_require=['coverage', 'pygraphviz', 'matplotlib', 'pexpect',
'pandas', 'h5py', 'mock', 'cython',
'python-libsbml', 'libroadrunner'],
Expand Down

0 comments on commit 23fc948

Please sign in to comment.