Update plm function to return first derivative with associated argume… #57
This file contains hidden or 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: CI Pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| build-env: | |
| name: Build Conda Environment | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Miniconda | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| activate-environment: lenapy_env | |
| environment-file: environment.yml | |
| auto-activate-base: false | |
| - name: Cache Conda environment | |
| uses: actions/cache@v4 | |
| with: | |
| path: /usr/share/miniconda/envs/lenapy_env | |
| key: conda-${{ runner.os }}-${{ hashFiles('environment.yml') }} | |
| restore-keys: | | |
| conda-${{ runner.os }}- | |
| formater: | |
| name: Code Formatting Check | |
| runs-on: ubuntu-latest | |
| needs: build-env | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Dependencies | |
| shell: bash -l {0} | |
| run: pip install -e .[formatter] | |
| - name: Run Black & Isort | |
| run: | | |
| black --check --diff lenapy | |
| isort lenapy --check --diff | |
| pytest: | |
| name: Run Pytest | |
| runs-on: ubuntu-latest | |
| needs: build-env | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Miniconda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: false | |
| activate-environment: lenapy_env | |
| - name: Restore Conda environment | |
| uses: actions/cache@v4 | |
| with: | |
| path: /usr/share/miniconda/envs/lenapy_env | |
| key: conda-${{ runner.os }}-${{ hashFiles('environment.yml') }} | |
| - name: Run Pytest with Coverage | |
| shell: bash -l {0} | |
| run: | | |
| pip install -e .[test] | |
| pytest -s tests --cov=lenapy --cov-report=xml:.ci-reports/coverage.xml --cov-report html:cov_html --cov-report=term --junitxml=pytest-results.xml | |
| - name: Upload Coverage Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: | | |
| .ci-reports/ | |
| cov_html/ | |
| pytest-results.xml | |
| - name: Publish test results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| with: | |
| files: pytest-results.xml | |
| test_notebooks: | |
| name: Test Jupyter Notebooks | |
| runs-on: ubuntu-latest | |
| needs: build-env | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Miniconda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: false | |
| activate-environment: lenapy_env | |
| - name: Restore Conda environment | |
| uses: actions/cache@v4 | |
| with: | |
| path: /usr/share/miniconda/envs/lenapy_env | |
| key: conda-${{ runner.os }}-${{ hashFiles('environment.yml') }} | |
| - name: Install Notebook Dependencies | |
| shell: bash -l {0} | |
| run: | | |
| pip install -e .[test] | |
| pip install -e .[notebook] | |
| - name: Run Pytest on Notebooks | |
| shell: bash -l {0} | |
| run: | | |
| pytest --nbmake --nbmake-kernel=python3 doc/tutorials/ | |
| pylint_analysis: | |
| name: Pylint Code Analysis | |
| runs-on: ubuntu-latest | |
| needs: build-env | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Dependencies | |
| shell: bash -l {0} | |
| run: pip install -e .[quality] | |
| - name: Run Pylint | |
| shell: bash -l {0} | |
| run: | | |
| pylint --recursive=y --disable=all --fail-under=10 --enable=too-many-statements,too-many-nested-blocks lenapy | |
| mccabe_analysis: | |
| name: McCabe Complexity Analysis | |
| runs-on: ubuntu-latest | |
| needs: build-env | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Conda | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| activate-environment: lenapy | |
| auto-activate-base: false | |
| - name: Install Quality Tools | |
| shell: bash -l {0} | |
| run: pip install .[quality] | |
| - name: Run McCabe Complexity Check | |
| shell: bash -l {0} | |
| run: ./continuous_integration/scripts/check_mccabe_complexity.sh 25 lenapy lenapy/readers/ocean.py lenapy/plots/plotting.py | |
| build_doc: | |
| name: Build sphinx documentation | |
| runs-on: ubuntu-latest | |
| needs: build-env | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Miniconda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: false | |
| activate-environment: lenapy_env | |
| - name: Restore Conda environment | |
| uses: actions/cache@v4 | |
| with: | |
| path: /usr/share/miniconda/envs/lenapy_env | |
| key: conda-${{ runner.os }}-${{ hashFiles('environment.yml') }} | |
| - name: Install documentation dependencies | |
| shell: bash -l {0} | |
| run: pip install .[doc] | |
| - name: Build doc | |
| shell: bash -l {0} | |
| run: | | |
| conda install pandoc | |
| sphinx-build -b html doc doc/build | |
| - name: Upload doc as artefact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: doc-build | |
| path: | | |
| doc/build | |
| retention-days: 7 |