Skip to content

Commit

Permalink
Merge pull request #172 from nasa/feature/python_3_10
Browse files Browse the repository at this point in the history
prog_models v1.2.1: Added support to python3.10
  • Loading branch information
teubert authored Nov 30, 2021
2 parents 7a1443c + 05f775b commit 8f9636e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ['3.6', '3.7', '3.8', '3.9']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ['3.6', '3.7', '3.8', '3.9']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ['3.6', '3.7', '3.8', '3.9']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
python-version: ['3.9']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -140,4 +140,4 @@ jobs:
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
fail_ci_if_error: true
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name = 'prog_models',
version = '1.2.0', #pkg_resources.require("prog_models")[0].version,
version = '1.2.1', #pkg_resources.require("prog_models")[0].version,
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.',
long_description=long_description,
long_description_content_type='text/markdown',
Expand All @@ -32,12 +32,13 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3 :: Only'
],
keywords = ['prognostics', 'diagnostics', 'fault detection', 'fdir', 'physics modeling', 'prognostics and health management', 'PHM', 'health management'],
package_dir = {"":"src"},
packages = find_packages(where = 'src'),
python_requires='>=3.6, <3.10',
python_requires='>=3.6, <3.11',
install_requires = [
'numpy',
'scipy',
Expand Down
2 changes: 1 addition & 1 deletion src/prog_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
from .prognostics_model import PrognosticsModel
from .exceptions import ProgModelException, ProgModelInputException, ProgModelTypeError

__version__ = '1.2.0'
__version__ = '1.2.1'
13 changes: 12 additions & 1 deletion tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def test_state_bounds(self):
# Reset stdout
sys.stdout = _stdout

def test_state_bounds(self):
def test_vectorized(self):
# set stdout (so it wont print)
_stdout = sys.stdout
sys.stdout = StringIO()
Expand All @@ -179,6 +179,17 @@ def test_state_bounds(self):
# Reset stdout
sys.stdout = _stdout

def test_sim_pump_example(self):
# set stdout (so it wont print)
_stdout = sys.stdout
sys.stdout = StringIO()

# Run example
sim_pump.run_example()

# Reset stdout
sys.stdout = _stdout

# This allows the module to be executed directly
def run_tests():
unittest.main()
Expand Down

0 comments on commit 8f9636e

Please sign in to comment.