Skip to content

Commit 4bfb412

Browse files
authored
Merge pull request #73 from PySCeS/development
Bug fix release
2 parents a921290 + 18555ec commit 4bfb412

File tree

11 files changed

+44
-32
lines changed

11 files changed

+44
-32
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ jobs:
3535
sudo hdiutil attach /tmp/gfortran.dmg &&
3636
sudo installer -pkg /Volumes/gfortran-10.2-Catalina/gfortran.pkg -target /
3737
38+
- name: Build wheels for CPython 3.10
39+
uses: pypa/[email protected]
40+
env:
41+
CIBW_BUILD: "cp310-*"
42+
CIBW_BEFORE_BUILD: pip install numpy~=1.21.0
43+
3844
- name: Build wheels for CPython 3.9
3945
uses: pypa/[email protected]
4046
env:

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
include *.md
22
include LICENCE.txt
3+
include requirements.txt
34
include setupegg.py
45
include pysces/*
56
include pysces/contrib/*
@@ -18,6 +19,7 @@ include pysces/pitcon/*
1819
include pysces/pscmodels/*
1920
include pysces/tests/*
2021
include pysces/pysces.pth
22+
include pysces/version.txt
2123
include pysces/win32/libgfortran-3.dll
2224
include pysces/win32/libquadmath-0.dll
2325
include pysces/win32/libgcc_s_seh-1.dll

packaging/conda/conda_build_config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ python:
22
- 3.7
33
- 3.8
44
- 3.9
5+
- 3.10
56
numpy:
67
- 1.16
78
- 1.17
89
- 1.20
10+
- 1.21
911
zip_keys:
1012
- python
1113
- numpy

packaging/conda/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package:
22
name: pysces
3-
version: "1.0.0"
3+
version: "1.0.1"
44

55
source:
66
# git_url: https://github.com/PySCeS/pysces.git

pysces/PyscesJWSParse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from .lib import yacc
3333
from getpass import getuser
3434
from time import sleep, strftime
35-
from scipy import MachAr
35+
from numpy import MachAr
3636

3737
MyMachArr = MachAr()
3838

pysces/PyscesModel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4383,6 +4383,7 @@ def function_sim(s, t):
43834383
go = True
43844384

43854385
status = 0
4386+
lsoda_mxstep_bak = self.__settings__["lsoda_mxstep"]
43864387
while go:
43874388
sim_res, infodict = scipy.integrate.odeint(
43884389
function_sim,
@@ -4431,7 +4432,7 @@ def function_sim(s, t):
44314432
go = False
44324433
else:
44334434
go = False
4434-
self.__settings__["lsoda_mxstep"] = 0
4435+
self.__settings__["lsoda_mxstep"] = lsoda_mxstep_bak
44354436

44364437
rates = numpy.zeros((sim_res.shape[0], len(self.__reactions__)))
44374438
if status == 0:
@@ -4999,6 +5000,7 @@ def Simulate(self, userinit=0):
49995000
if self.sim_time[0] != 0:
50005001
self._sim_time_bak = copy.copy(self.sim_time)
50015002
self.sim_time = [0.0] + list(self._sim_time_bak)
5003+
self.sim_end = self.sim_time[-1]
50025004

50035005
# initialises self.__inspec__[x] with self.sXi
50045006
if userinit == 1:

pysces/PyscesStoich.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ def __init__(self, input):
435435
self.nmatrix_row = tuple(numpy.array(list(range(row))))
436436

437437
# Create a machine specific instance
438-
from scipy import MachAr
438+
from numpy import MachAr
439439

440440
mach_spec = MachAr()
441441

pysces/core2/version.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1 @@
1-
MAJOR = 1
2-
MINOR = 0
3-
MICRO = 0
4-
STATUS = ''
5-
6-
7-
def current_version():
8-
return '%s.%s.%s%s' % (MAJOR, MINOR, MICRO, STATUS)
9-
10-
11-
def current_version_tuple():
12-
return (MAJOR, MINOR, MICRO)
13-
14-
15-
__version__ = current_version()
1+
from pysces.version import __version__

pysces/version.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
MAJOR = 1
2-
MINOR = 0
3-
MICRO = 0
4-
STATUS = ''
1+
import re
2+
import os
53

4+
cwd = os.path.dirname(__file__)
5+
6+
with open(os.path.join(cwd, 'version.txt'), 'r') as f:
7+
v = f.read().strip().split('.')
8+
9+
MAJOR = int(v[0])
10+
MINOR = int(v[1])
11+
MICRO = int(re.split('(\d+)', v[2])[1])
12+
STATUS = re.split('(\d+)', v[2])[2]
613

714
def current_version():
815
return '%s.%s.%s%s' % (MAJOR, MINOR, MICRO, STATUS)
916

10-
1117
def current_version_tuple():
1218
return (MAJOR, MINOR, MICRO)
1319

14-
1520
__version__ = current_version()

pysces/version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.1

0 commit comments

Comments
 (0)