Skip to content

Commit 573aedd

Browse files
authored
Merge pull request #50 from CovertLab/release_0.5.1
Release 0.5.1 for Python 3.11 compatibility
2 parents 7dce583 + 2e69df2 commit 573aedd

File tree

6 files changed

+30
-6
lines changed

6 files changed

+30
-6
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,15 @@ More examples:
114114

115115
## Changelog
116116

117+
### Version 0.5.1
118+
119+
* Update to Cython 3.0.0a11 for compatibility with Python 3.11.
120+
Add `arrow.pxd` to work around a Cython 3.0.0 bug.
121+
* Stop using deprecated `numpy.distutils` to avoid warnings and prepare for its
122+
removal in Python 3.12.
123+
* Make `test_arrow.py --plot` compatible with Python 3.
124+
* Fix `PytestReturnNotNoneWarning` warnings from pytest 7.2.0.
125+
117126
### Version 0.5.0
118127

119128
* Add the arrow_hang unit test which catches a nasty edge-case (Issue #48),

arrow/analysis/plotting.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from __future__ import absolute_import, division, print_function
99

10-
import matplotlib.pyplot as plt
1110

1211
def plot_full_history(axes, time, counts, *args, **kwargs):
1312
'''

arrow/arrow.pxd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# cython: language_level=3str
2+
3+
# This file works around a Cython 3.0.0a1+ error on arrowhead.pyx:
4+
# arrow/arrowhead.pyx:14:0: 'arrow.pxd' not found

arrow/test/test_arrow.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,17 @@ def test_get_set_random_state():
312312

313313

314314
def main(args):
315+
def check_stochastic_system():
316+
return complexation_test(StochasticSystem)
317+
318+
def check_gillespie_reference():
319+
return complexation_test(GillespieReference)
320+
315321
systems = (
316322
check_equilibration,
317323
check_dimerization,
318-
lambda: complexation_test(StochasticSystem),
319-
lambda: complexation_test(GillespieReference))
324+
check_stochastic_system,
325+
check_gillespie_reference,)
320326

321327
if not args.plot:
322328
if args.complexation:
@@ -359,7 +365,8 @@ def main(args):
359365
all_axes = np.asarray(all_axes)
360366

361367
for (axes, system) in moves.zip(all_axes.flatten(), systems):
362-
axes.set_title(system.func_name)
368+
print(f'Running {system.__name__}')
369+
axes.set_title(system.__name__)
363370

364371
time, counts, events = system()
365372
plot_full_history(axes, time, counts)

requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
# pip install -U -r requirements.txt
2+
13
pip
24
setuptools
35

4-
Cython
6+
Cython>=3.0.0a11
57
numpy
68
pytest
79
psutil

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
# See https://numpy.org/devdocs/reference/distutils_status_migration.html for
33
# migration advice.
44
# This setup.py file no longer uses numpy.distutils so it might be easy to
5-
# fully move to setuptools.
5+
# move fully to setuptools.
66

77
import os
88
import setuptools # used indirectly for bdist_wheel cmd and long_description_content_type
99
from distutils.core import setup
1010
from distutils.extension import Extension
1111
import numpy as np
1212

13+
_ = setuptools
14+
15+
1316
with open("README.md", 'r') as readme:
1417
long_description = readme.read()
1518

0 commit comments

Comments
 (0)