Skip to content

Commit

Permalink
Merge pull request #179 from nasa/release/v1.3
Browse files Browse the repository at this point in the history
v1.3
  • Loading branch information
teubert committed May 14, 2022
2 parents a15b0ff + fc2941e commit cedf132
Show file tree
Hide file tree
Showing 120 changed files with 4,432 additions and 1,380 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Relevant Requirements**
Indicate any enhancement issues (i.e., requirements) that are impacted by this issue.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Python Version [e.g. 3.7]

**Additional context**
Add any other context about the problem here.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation-update.md
@@ -0,0 +1,14 @@
---
name: Documentation update
about: Update to the documentation
title: ''
labels: documentation
assignees: ''

---

** Location where change is recommended **

** Recommended change **

** Reason **
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,25 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Requirement Text**
What must this feature do, specifically - this is the thing to test to. E.g., Ability to simulate model until a specified event has been met.

**Background Information**
Optional

**Suggested Solution**
Optional, Solution that is proposed. Requirement can be met with other solutions

**DoD**
What need to be completed for this feature to be complete. E.g.,
- [ ] Implement feature
- [ ] Add to example
- [ ] Add to tutorial
- [ ] Add tests
- [ ] Add to change notes for next release
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/testing-update.md
@@ -0,0 +1,14 @@
---
name: Testing update
about: Update to tests or CI/CD pipeline
title: ''
labels: CI/CD
assignees: ''

---

** Test to Update **

** Change Recommended **

** Reason **
55 changes: 22 additions & 33 deletions .github/workflows/python-package.yml
Expand Up @@ -10,12 +10,11 @@ on:
- prog_algs

jobs:
analysis:
test-prog_models-dev:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8']

python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -25,62 +24,47 @@ jobs:
- name: Install prog_models
run: |
python -m pip install git+https://github.com/nasa/prog_models.git@dev
- name: Lint with flake8
- name: Install
run: |
python -m pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 src/prog_algs --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 src/prog_algs --count --benchmark --exit-zero --show-source --max-complexity=10 --max-line-length=127 --statistics --tee --output-file=lint_results_${{ matrix.python-version }}.txt
- name: Upload Lint Results
uses: actions/upload-artifact@v2
with:
name: lint_results_${{matrix.python-version}}
path: lint_results_${{matrix.python-version}}.txt
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: 'python'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
test-prog_models-dev:
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install notebook
python -m pip install testbook
- name: Run tests
run: python -m tests
test-prog_models-released:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install prog_models
run: |
python -m pip install git+https://github.com/nasa/prog_models.git@dev
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install notebook
python -m pip install testbook
- name: Run tests
run: python -m tests
test-prog_models-released:
copyright:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
python-version: ['3.9']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install
- name: Run copyright check
run: |
python -m pip install --upgrade pip
python -m pip install -e .
- name: Run tests
run: python -m tests

python scripts/test_copyright.py
coverage:
runs-on: ubuntu-latest
strategy:
Expand All @@ -92,11 +76,16 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install prog_models from dev
run: |
python -m pip install git+https://github.com/nasa/prog_models.git@dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .
pip install coverage
pip install notebook
pip install testbook
- name: Run coverage
run: |
coverage run -m tests
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,41 @@
name: Release

on:
push:
branches:
- 'release/**'
- 'master'

jobs:
analysis:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install prog_models
run: |
python -m pip install git+https://github.com/nasa/prog_models.git@dev
- name: Lint with flake8
run: |
python -m pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 src/prog_algs --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 src/prog_algs --count --benchmark --exit-zero --show-source --max-complexity=10 --max-line-length=127 --statistics --tee --output-file=lint_results_${{ matrix.python-version }}.txt
- name: Upload Lint Results
uses: actions/upload-artifact@v2
with:
name: lint_results_${{matrix.python-version}}
path: lint_results_${{matrix.python-version}}.txt
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: 'python'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -99,3 +99,6 @@ cython_debug/
# VS Code
.vscode/
.pypirc
.DS_Store
data_test.pkl
predictor_test.pkl
9 changes: 4 additions & 5 deletions README.md
Expand Up @@ -35,22 +35,21 @@ Use the following to cite this repository:
@misc{2022_nasa_prog_algs,
author = {Christopher Teubert and Matteo Corbetta and Chetan Kulkarni},
title = {Prognostics Algorithm Python Package},
month = Dec,
year = 2021,
version = {1.2.3},
month = May,
year = 2022,
version = {1.3.0},
url = {https://github.com/nasa/prog_algs}
}
```

The corresponding reference should look like this:

C. Teubert, M. Corbetta, C. Kulkarni, Prognostics Algorithm Python Package, v1.2.3, Dec 2021. URL https://github.com/nasa/prog_algs.
C. Teubert, M. Corbetta, C. Kulkarni, Prognostics Algorithm Python Package, v1.3.0, May 2022. URL https://github.com/nasa/prog_algs.

## Acknowledgements
The structure and algorithms of this package are strongly inspired by the [MATLAB Prognostics Algorithm Library](https://github.com/nasa/PrognosticsAlgorithmLibrary) and the [MATLAB Prognostics Metrics Library](https://github.com/nasa/PrognosticsMetricsLibrary). We would like to recognize Matthew Daigle, Shankar Sankararaman 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_algs

## Notices

Copyright © 2021 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved.

## Disclaimers
Expand Down
2 changes: 1 addition & 1 deletion docs/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: d169039d98198512da4bb212eadd1180
config: 84a069a180fbdb8b47010e7f2620a345
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/.doctrees/exceptions.doctree
Binary file not shown.
Binary file modified docs/.doctrees/getting_started.doctree
Binary file not shown.
Binary file modified docs/.doctrees/index.doctree
Binary file not shown.
Binary file modified docs/.doctrees/metrics.doctree
Binary file not shown.
Binary file modified docs/.doctrees/prediction.doctree
Binary file not shown.
Binary file modified docs/.doctrees/predictors.doctree
Binary file not shown.
Binary file added docs/.doctrees/release.doctree
Binary file not shown.
Binary file modified docs/.doctrees/state_estimators.doctree
Binary file not shown.
Binary file modified docs/.doctrees/uncertain_data.doctree
Binary file not shown.
@@ -1,5 +1,11 @@
# Copyright © 2021 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved.

"""
An example illustrating the creation of a new state estimator.
In this example a basic state estimator is constructed by subclassing the StateEstimator class. This StateEstimator is then demonstrated with a ThrownObject model
"""

from prog_algs.state_estimators import StateEstimator
from prog_algs.uncertain_data import ScalarData
import random
Expand Down

0 comments on commit cedf132

Please sign in to comment.