Skip to content

Commit

Permalink
Merge pull request #111 from nasa/release/v1.6
Browse files Browse the repository at this point in the history
Release/v1.6
  • Loading branch information
teubert committed Oct 25, 2023
2 parents 5688cd6 + aa57c31 commit 8451081
Show file tree
Hide file tree
Showing 604 changed files with 58,098 additions and 3,563 deletions.
27 changes: 6 additions & 21 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,15 @@
name: "CodeQL"

on:
push:
branches: [ "master", "dev", "release/**" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master", "dev", "release/**" ]
branches: [ "master", "dev", "release/*" ]

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
code_ql:
name: CodeQL Analysis
runs-on: ubuntu-latest

permissions:
actions: read
contents: read
Expand All @@ -37,11 +30,7 @@ jobs:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support


steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -55,10 +44,6 @@ jobs:
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Coverage

on:
push:
pull_request:
paths:
- progpy

jobs:
coverage:
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-cache
- name: Install additional dependencies
run: |
pip install coverage
pip install importlib_metadata
- name: Update
run: pip install --upgrade --upgrade-strategy eager -e .
- name: Run coverage
run: |
coverage run -m tests.test_base_models
coverage run -a -m tests.test_battery
coverage run -a -m tests.test_calc_error
coverage run -a -m tests.test_centrifugal_pump
coverage run -a -m tests.test_composite
coverage run -a -m tests.test_datasets
coverage run -a -m tests.test_dict_like_matrix_wrapper
coverage run -a -m tests.test_direct
coverage run -a -m tests.test_estimate_params
coverage run -a -m tests.test_ensemble
coverage run -a -m tests.test_linear_model
coverage run -a -m tests.test_pneumatic_valve
coverage run -a -m tests.test_powertrain
coverage run -a -m tests.test_predictors
coverage run -a -m tests.test_serialization
coverage run -a -m tests.test_sim_result
coverage run -a -m tests.test_state_estimators
coverage run -a -m tests.test_uav_model
coverage run -a -m tests.test_uav_model
coverage xml -i
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
15 changes: 15 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Greetings

on: [pull_request_target]

jobs:
greeting:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: "Thank you for your contributions. If you haven't already, please send a signed Contributor License Agreement (CLA) to Christopher Teubert (christopher.a.teubert@nasa.gov). CLAs can be found here: https://github.com/nasa/progpy/tree/master/forms. Also, make sure you're familiar with the developer notes and contributing sections of our developers guide, https://nasa.github.io/progpy/dev_guide.html#notes-for-developers"
33 changes: 33 additions & 0 deletions .github/workflows/pr-messages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Print PR Message - Non Release

on:
pull_request:
branches:
- 'dev'
types: [opened]

jobs:
pr_msg:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Auto Comment
uses: wow-actions/auto-comment@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pullRequestOpened: >
Thank you for opening this PR. Each PR into dev requires a code review. For the code review, look at the following:
- [ ] Reviewer (someone other than author) should look for bugs, efficiency, readability, testing, and coverage in examples (if relevant).
- [ ] Ensure that each PR adding a new feature should include a test verifying that feature.
- [ ] All errors from static analysis must be resolved.
- [ ] Review the test coverage reports (if there is a change) - will be added as comment on PR if there is a change
- [ ] Review the software benchmarking results (if there is a change) - will be added as comment on PR
- [ ] Any added dependencies are included in requirements.txt, setup.py, and dev_guide.rst (this document)
- [ ] All warnings from static analysis must be reviewed and resolved - if deemed appropriate.
79 changes: 79 additions & 0 deletions .github/workflows/print-benchmarking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# name: Print Benchmarking

# on: pull_request

# jobs:
# benchmark_branch:
# timeout-minutes: 20
# 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 dependencies
# run: |
# python -m pip install --upgrade pip
# python -m pip install -e .
# - name: benchmark
# id: bench
# shell: bash
# run: |
# bench=$(python -m tests.benchmarking)
# # V To support multiline strings V
# bench="${bench//'%'/'%25'}"
# bench="${bench//$'\n'/'%0A'}"
# bench="${bench//$'\r'/'%0D'}"
# echo "::set-output name=bench::$bench"
# - name: Clone prog_models
# uses: actions/checkout@v2
# with:
# repository: nasa/prog_models
# ref: ${{ github.event.pull_request.base.ref }}
# path: prog_models_target
# - name: Downgrade
# run: |
# python -m pip uninstall -y prog_models
# python -m pip install -e ./prog_models_target
# cd prog_models_target
# - name: benchmark-pre
# id: bench-pre
# shell: bash
# run: |
# bench=$(python -m tests.benchmarking)
# # V To support multiline strings V
# bench="${bench//'%'/'%25'}"
# bench="${bench//$'\n'/'%0A'}"
# bench="${bench//$'\r'/'%0D'}"
# echo "::set-output name=bench::$bench"
# - name: Auto Comment
# uses: wow-actions/auto-comment@v1
# with:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# pullRequestOpened: >
# Benchmarking Results

# From:

# ${{steps.bench-pre.outputs.bench}}

# To:

# ${{steps.bench.outputs.bench}}

# pullRequestSynchronize: >
# Benchmarking Results [Update]

# From:

# ${{steps.bench-pre.outputs.bench}}


# To:


# ${{steps.bench.outputs.bench}}
Loading

0 comments on commit 8451081

Please sign in to comment.