Merge pull request #23 from NREL/light #82
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PINNSTRIPES-CI | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- '*.md' | |
- 'README*' | |
- 'LICENSE' | |
pull_request: | |
branches: [main] | |
paths-ignore: | |
- '*.md' | |
- 'README*' | |
- 'LICENSE' | |
jobs: | |
Lint: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.10'] | |
defaults: | |
run: | |
working-directory: ${{github.workspace}} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{matrix.python-version}} | |
- name: Install formatting dependencies | |
run: | | |
pip install black | |
pip install isort | |
pip install codespell | |
- name: Formatting | |
run: | | |
source .github/linters/formatting.sh | |
format pinn_spm_param true | |
format BayesianCalibration_spm true | |
codespell | |
Test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.10'] | |
defaults: | |
run: | |
working-directory: ${{github.workspace}} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{matrix.python-version}} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest | |
python -m pip install -r requirements.txt | |
- name: Test SPM preprocess | |
run: | | |
cd pinn_spm_param/integration_spm | |
python main.py -nosimp -opt -lean -p 0.5 1 | |
cd ../preProcess | |
python makeDataset_spm.py -nosimp -df ../integration_spm -frt 1 -p 0.5 1 | |
- name: Test SPM | |
run: | | |
cd pinn_spm_param/tests | |
pytest -v test_spm.py | |
- name: Test SPM post process | |
run: | | |
cd pinn_spm_param/tests | |
pytest -v test_spm_postProc.py | |
- name: Test SPM utils | |
run: | | |
pip install black | |
cd pinn_spm_param/tests | |
pytest -v test_spm_utils.py | |
- name: Test SPM Bayesian calibration | |
run: | | |
cd BayesianCalibration_spm | |
bash exec_test.sh |