Skip to content

Commit a523e45

Browse files
authored
Merge pull request #283 from nasa/release/v1.3
Release v1.3
2 parents 6ae410a + 906244d commit a523e45

File tree

139 files changed

+10314
-2689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+10314
-2689
lines changed

.github/workflows/python-package.yml

+29-37
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,11 @@ on:
1010
- prog_models
1111

1212
jobs:
13-
analysis:
14-
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
python-version: ['3.6', '3.7', '3.8', '3.9']
18-
19-
steps:
20-
- uses: actions/checkout@v2
21-
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v2
23-
with:
24-
python-version: ${{ matrix.python-version }}
25-
- name: Install dependencies
26-
run: |
27-
python -m pip install --upgrade pip
28-
python -m pip install -r requirements.txt
29-
- name: Lint with flake8
30-
run: |
31-
python -m pip install flake8
32-
# stop the build if there are Python syntax errors or undefined names
33-
flake8 src/prog_models --count --select=E9,F63,F7,F82 --show-source --statistics
34-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
35-
flake8 src/prog_models --count --benchmark --exit-zero --show-source --max-complexity=10 --max-line-length=127 --statistics --tee --output-file=lint_results_${{ matrix.python-version }}.txt
36-
- name: Upload Lint Results
37-
uses: actions/upload-artifact@v2
38-
with:
39-
name: lint_results_${{matrix.python-version}}
40-
path: lint_results_${{matrix.python-version}}.txt
41-
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v1
43-
with:
44-
languages: 'python'
45-
- name: Perform CodeQL Analysis
46-
uses: github/codeql-action/analyze@v1
4713
test:
4814
runs-on: ubuntu-latest
4915
strategy:
5016
matrix:
51-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
17+
python-version: ['3.7', '3.8', '3.9', '3.10']
5218
steps:
5319
- uses: actions/checkout@v2
5420
- name: Set up Python ${{ matrix.python-version }}
@@ -59,13 +25,16 @@ jobs:
5925
run: |
6026
python -m pip install --upgrade pip
6127
python -m pip install -e .
28+
python -m pip install notebook
29+
python -m pip install testbook
30+
python -m pip install requests
6231
- name: Run tests
6332
run: python -m tests
6433
test_prog_algs_released:
6534
runs-on: ubuntu-latest
6635
strategy:
6736
matrix:
68-
python-version: ['3.6', '3.7', '3.8', '3.9']
37+
python-version: ['3.7', '3.8', '3.9', '3.10']
6938
steps:
7039
- uses: actions/checkout@v2
7140
- name: Set up Python ${{ matrix.python-version }}
@@ -76,6 +45,9 @@ jobs:
7645
run: |
7746
python -m pip install --upgrade pip
7847
python -m pip install -e .
48+
python -m pip install notebook
49+
python -m pip install testbook
50+
python -m pip install requests
7951
- name: Clone prog_algs
8052
uses: actions/checkout@v2
8153
with:
@@ -93,7 +65,7 @@ jobs:
9365
runs-on: ubuntu-latest
9466
strategy:
9567
matrix:
96-
python-version: ['3.6', '3.7', '3.8', '3.9']
68+
python-version: ['3.7', '3.8', '3.9', '3.10']
9769
steps:
9870
- uses: actions/checkout@v2
9971
- name: Set up Python ${{ matrix.python-version }}
@@ -104,6 +76,9 @@ jobs:
10476
run: |
10577
python -m pip install --upgrade pip
10678
python -m pip install -e .
79+
pip install notebook
80+
pip install testbook
81+
pip install requests
10782
- name: Clone prog_algs
10883
uses: actions/checkout@v2
10984
with:
@@ -117,6 +92,20 @@ jobs:
11792
run: |
11893
cd prog_algs
11994
python -m tests
95+
copyright:
96+
runs-on: ubuntu-latest
97+
strategy:
98+
matrix:
99+
python-version: ['3.9']
100+
steps:
101+
- uses: actions/checkout@v2
102+
- name: Set up Python ${{ matrix.python-version }}
103+
uses: actions/setup-python@v2
104+
with:
105+
python-version: ${{ matrix.python-version }}
106+
- name: Run copyright check
107+
run: |
108+
python scripts/test_copyright.py
120109
coverage:
121110
runs-on: ubuntu-latest
122111
strategy:
@@ -133,6 +122,9 @@ jobs:
133122
python -m pip install --upgrade pip
134123
python -m pip install -e .
135124
pip install coverage
125+
pip install notebook
126+
pip install testbook
127+
pip install requests
136128
- name: Run coverage
137129
run: |
138130
coverage run -m tests

.github/workflows/release.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/**'
7+
- 'master'
8+
9+
jobs:
10+
analysis:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.9']
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install -r requirements.txt
25+
- name: Lint with flake8
26+
run: |
27+
python -m pip install flake8
28+
# stop the build if there are Python syntax errors or undefined names
29+
flake8 src/prog_models --count --select=E9,F63,F7,F82 --show-source --statistics
30+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
31+
flake8 src/prog_models --count --benchmark --exit-zero --show-source --max-complexity=10 --max-line-length=127 --statistics --tee --output-file=lint_results_${{ matrix.python-version }}.txt
32+
- name: Upload Lint Results
33+
uses: actions/upload-artifact@v2
34+
with:
35+
name: lint_results_${{matrix.python-version}}
36+
path: lint_results_${{matrix.python-version}}.txt
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@v1
39+
with:
40+
languages: 'python'
41+
- name: Perform CodeQL Analysis
42+
uses: github/codeql-action/analyze@v1

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,9 @@ cython_debug/
100100
ex.pickle
101101

102102
.vscode/
103+
.DS_Store
104+
model_test.pkl
105+
106+
battery123.cfg
107+
108+
dataset_1.pkl

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ Use the following to cite this repository:
3636

3737
```
3838
@misc{2021_nasa_prog_models,
39-
author = {Christopher Teubert and Matteo Corbetta and Chetan Kulkarni and Matthew Daigle},
39+
author = {Christopher Teubert and Matteo Corbetta and Chetan Kulkarni and Katelyn Jarvis and Matthew Daigle},
4040
title = {Prognostics Models Python Package},
41-
month = Dec,
42-
year = 2021,
43-
version = {1.2.2},
41+
month = May,
42+
year = 2022,
43+
version = {1.3},
4444
url = {https://github.com/nasa/prog_models}
4545
}
4646
```
4747

4848
The corresponding reference should look like this:
4949

50-
C. Teubert, M. Corbetta, C. Kulkarni, and M. Daigle, Prognostics Models Python Package, v1.2.2, Dec. 2021. URL https://github.com/nasa/prog_models.
50+
C. Teubert, C. Kulkarni, M. Corbetta, K. Jarvis, M. Daigle, Prognostics Model Python Package, v1.3, May 2022. URL https://github.com/nasa/prog_models.
5151

5252
## Acknowledgements
5353
The structure and algorithms of this package are strongly inspired by the [MATLAB Prognostics Model Library](https://github.com/nasa/PrognosticsModelLibrary). We would like to recognize Matthew Daigle and the rest of the team that contributed to the Prognostics Model Library for the contributions their work on the MATLAB library made to the design of prog_models

docs/.buildinfo

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 163b495075cd81ec01dc49e97b9c341c
3+
config: 663675407ca8eacfb0c3279f576cc0ca
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/.doctrees/datasets.doctree

39.8 KB
Binary file not shown.

docs/.doctrees/dev_guide.doctree

158 KB
Binary file not shown.

docs/.doctrees/environment.pickle

19.7 KB
Binary file not shown.
-57.7 KB
Binary file not shown.

docs/.doctrees/index.doctree

289 Bytes
Binary file not shown.

docs/.doctrees/linear_model.doctree

220 KB
Binary file not shown.

docs/.doctrees/models.doctree

50.9 KB
Binary file not shown.
78.5 KB
Binary file not shown.

docs/.doctrees/release.doctree

45.7 KB
Binary file not shown.

docs/.doctrees/simresult.doctree

11.9 KB
Binary file not shown.

docs/_downloads/04d44be63878c426c67e43fe15b5b6e7/sim_battery_eol.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def future_loading(t, x=None):
2828
elif event_state["EOD"] < 0.05:
2929
load = -1 # Charge
3030
# Rule for loading at initialization
31-
return {'i': load}
31+
return batt.InputContainer({'i': load})
3232

3333
# Simulate to EOL Threshold
3434
print('\n\n------------------------------------------------')
@@ -39,7 +39,7 @@ def future_loading(t, x=None):
3939
'threshold_keys': ['InsufficientCapacity'], # Simulate to InsufficientCapacity
4040
'print': True
4141
}
42-
(times, inputs, states, outputs, event_states) = batt.simulate_to_threshold(future_loading, **options)
42+
simulated_results = batt.simulate_to_threshold(future_loading, **options)
4343

4444
# This allows the module to be executed directly
4545
if __name__ == '__main__':

docs/_downloads/07c0fc000584a9e07e95b6ff3a52d38f/noise_examples.py

-154
This file was deleted.

0 commit comments

Comments
 (0)