Skip to content

Commit 8f9636e

Browse files
authored
Merge pull request #172 from nasa/feature/python_3_10
prog_models v1.2.1: Added support to python3.10
2 parents 7a1443c + 05f775b commit 8f9636e

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

.github/workflows/python-package.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: [3.6, 3.7, 3.8, 3.9]
17+
python-version: ['3.6', '3.7', '3.8', '3.9']
1818

1919
steps:
2020
- uses: actions/checkout@v2
@@ -48,7 +48,7 @@ jobs:
4848
runs-on: ubuntu-latest
4949
strategy:
5050
matrix:
51-
python-version: [3.6, 3.7, 3.8, 3.9]
51+
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
5252
steps:
5353
- uses: actions/checkout@v2
5454
- name: Set up Python ${{ matrix.python-version }}
@@ -65,7 +65,7 @@ jobs:
6565
runs-on: ubuntu-latest
6666
strategy:
6767
matrix:
68-
python-version: [3.6, 3.7, 3.8, 3.9]
68+
python-version: ['3.6', '3.7', '3.8', '3.9']
6969
steps:
7070
- uses: actions/checkout@v2
7171
- name: Set up Python ${{ matrix.python-version }}
@@ -93,7 +93,7 @@ jobs:
9393
runs-on: ubuntu-latest
9494
strategy:
9595
matrix:
96-
python-version: [3.6, 3.7, 3.8, 3.9]
96+
python-version: ['3.6', '3.7', '3.8', '3.9']
9797
steps:
9898
- uses: actions/checkout@v2
9999
- name: Set up Python ${{ matrix.python-version }}
@@ -121,7 +121,7 @@ jobs:
121121
runs-on: ubuntu-latest
122122
strategy:
123123
matrix:
124-
python-version: [3.9]
124+
python-version: ['3.9']
125125
steps:
126126
- uses: actions/checkout@v2
127127
- name: Set up Python ${{ matrix.python-version }}
@@ -140,4 +140,4 @@ jobs:
140140
- name: "Upload coverage to Codecov"
141141
uses: codecov/codecov-action@v2
142142
with:
143-
fail_ci_if_error: true
143+
fail_ci_if_error: true

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
setup(
1313
name = 'prog_models',
14-
version = '1.2.0', #pkg_resources.require("prog_models")[0].version,
14+
version = '1.2.1', #pkg_resources.require("prog_models")[0].version,
1515
description = 'The NASA Prognostic Model Package is a python modeling framework focused on defining and building models for prognostics (computation of remaining useful life) of engineering systems, and provides a set of prognostics models for select components developed within this framework, suitable for use in prognostics applications for these components.',
1616
long_description=long_description,
1717
long_description_content_type='text/markdown',
@@ -32,12 +32,13 @@
3232
'Programming Language :: Python :: 3.7',
3333
'Programming Language :: Python :: 3.8',
3434
'Programming Language :: Python :: 3.9',
35+
'Programming Language :: Python :: 3.10',
3536
'Programming Language :: Python :: 3 :: Only'
3637
],
3738
keywords = ['prognostics', 'diagnostics', 'fault detection', 'fdir', 'physics modeling', 'prognostics and health management', 'PHM', 'health management'],
3839
package_dir = {"":"src"},
3940
packages = find_packages(where = 'src'),
40-
python_requires='>=3.6, <3.10',
41+
python_requires='>=3.6, <3.11',
4142
install_requires = [
4243
'numpy',
4344
'scipy',

src/prog_models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
from .prognostics_model import PrognosticsModel
55
from .exceptions import ProgModelException, ProgModelInputException, ProgModelTypeError
66

7-
__version__ = '1.2.0'
7+
__version__ = '1.2.1'

tests/test_examples.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def test_state_bounds(self):
168168
# Reset stdout
169169
sys.stdout = _stdout
170170

171-
def test_state_bounds(self):
171+
def test_vectorized(self):
172172
# set stdout (so it wont print)
173173
_stdout = sys.stdout
174174
sys.stdout = StringIO()
@@ -179,6 +179,17 @@ def test_state_bounds(self):
179179
# Reset stdout
180180
sys.stdout = _stdout
181181

182+
def test_sim_pump_example(self):
183+
# set stdout (so it wont print)
184+
_stdout = sys.stdout
185+
sys.stdout = StringIO()
186+
187+
# Run example
188+
sim_pump.run_example()
189+
190+
# Reset stdout
191+
sys.stdout = _stdout
192+
182193
# This allows the module to be executed directly
183194
def run_tests():
184195
unittest.main()

0 commit comments

Comments
 (0)