-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from ACCESS-Community-Hub/prerelease
Release of v1.0
- Loading branch information
Showing
129 changed files
with
2,541 additions
and
1,307 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build of mopper conda package for new release | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
conda_deployment_with_new_tag: | ||
name: Test conda deployment of package with Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v4.1.7 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Conda environment creation and activation | ||
uses: conda-incubator/setup-miniconda@v3.0.4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
activate-environment: mopper_env | ||
environment-file: conda/environment.yaml # Path to the build conda environment | ||
show-channel-urls: true # | ||
- name: Build but do not upload the conda packages | ||
uses: uibcdf/action-build-and-upload-conda-packages@v1.3.0 | ||
with: | ||
meta_yaml_dir: conda | ||
python-version: ${{ matrix.python-version }} # Values previously defined in `matrix` | ||
user: coecms | ||
label: auto | ||
upload: true | ||
token: ${{ secrets.ANACONDA_TOKEN }} # Replace with the right name of your secret |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: mopper-all-tests | ||
|
||
#on: [push] | ||
on: | ||
push: | ||
branches: | ||
- prerelease | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- prerelease | ||
|
||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
strategy: | ||
max-parallel: 5 | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4.1.7 | ||
- name: Set up Python 3.10/3.11 | ||
uses: actions/setup-python@v5.1.1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Miniconda | ||
uses: conda-incubator/setup-miniconda@v3.0.4 | ||
with: | ||
activate-environment: testenv | ||
environment-file: conda/testenv.yaml | ||
python-version: ${{ matrix.python-version }} | ||
channels: conda-forge | ||
- name: Lint with ruff | ||
shell: bash -el {0} | ||
run: | | ||
ruff check --output-format=github . | ||
continue-on-error: true | ||
|
||
# making sure we are testing installed package | ||
- name: Install package | ||
shell: bash -el {0} | ||
run: | | ||
conda activate testenv | ||
pip install -e . | ||
- name: Test with pytest | ||
shell: bash -el {0} | ||
run: | | ||
conda run python -m pytest | ||
#conda run coverage run --source src -m py.test | ||
# - name: Upload to codecov | ||
# shell: bash -el {0} | ||
# if: steps.build.outcome == 'success' | ||
# run: | | ||
# curl -Os https://uploader.codecov.io/latest/linux/codecov | ||
# chmod +x codecov | ||
# ./codecov | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# this workflow can be used as a template for a worklfow | ||
# that runs automatically only specific tests when pushing | ||
# to a selected branch. | ||
name: mopper-specific-tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- class | ||
|
||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
strategy: | ||
max-parallel: 5 | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4.1.7 | ||
- name: Set up Python 3.10/3.11 | ||
uses: actions/setup-python@v5.1.1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Miniconda | ||
uses: conda-incubator/setup-miniconda@v3.0.4 | ||
with: | ||
activate-environment: testenv | ||
environment-file: conda/testenv.yaml | ||
python-version: ${{ matrix.python-version }} | ||
channels: conda-forge | ||
- name: Lint with ruff | ||
shell: bash -el {0} | ||
run: | | ||
ruff check --output-format=github . | ||
continue-on-error: true | ||
|
||
# making sure we are testing installed package | ||
- name: Install package | ||
shell: bash -el {0} | ||
run: | | ||
conda activate testenv | ||
pip install -e . | ||
- name: Test with pytest | ||
shell: bash -el {0} | ||
run: | | ||
conda run python -m pytest -q tests/test_calculations.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Test Build of mopper conda package | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the prerelase branch | ||
push: | ||
branches: [ prerelease ] | ||
pull_request: | ||
branches: [ prerelease ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
conda_deployment_with_new_tag: | ||
name: Test conda deployment of package with Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v4.1.7 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Conda environment creation and activation | ||
uses: conda-incubator/setup-miniconda@v3.0.4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
activate-environment: mopper_env | ||
environment-file: conda/environment.yaml # Path to the build conda environment | ||
show-channel-urls: true # | ||
- name: Build but do not upload the conda packages | ||
uses: uibcdf/action-build-and-upload-conda-packages@v1.3.0 | ||
with: | ||
meta_yaml_dir: conda | ||
python-version: ${{ matrix.python-version }} # Values previously defined in `matrix` | ||
user: coecms | ||
label: auto | ||
upload: false | ||
token: ${{ secrets.ANACONDA_TOKEN }} # Replace with the right name of your secret |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
custom_app4_*.sh | ||
__pycache__/ | ||
build/ | ||
mopper_venv/ | ||
*.csv | ||
*.yaml | ||
*.json | ||
localdata/ | ||
src/mopper.egg-info/ | ||
extras/ | ||
*.txt |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: mopper_env | ||
channels: | ||
- conda-forge | ||
- coecms | ||
- default | ||
|
||
dependencies: | ||
- anaconda-client | ||
- conda-build | ||
- conda-verify |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/bin/bash | ||
py.test | ||
echo 'calling run_test' | ||
python -m pytest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
pip install coverage pytest-cov | ||
py.test --cov=mopper --cov-report xml:/tmp/artefacts/tests/pytest/coverage.xml --junit-xml /tmp/artefacts/tests/pytest/results.xml | ||
py.test --cov=mopdb --cov-report xml:/tmp/artefacts/tests/pytest/coverage.xml --junit-xml /tmp/artefacts/tests/pytest/results.xml | ||
python -m pytest --cov=mopper --cov-report xml:/tmp/artefacts/tests/pytest/coverage.xml --junit-xml /tmp/artefacts/tests/pytest/results.xml | ||
python -m pytest --cov=mopdb --cov-report xml:/tmp/artefacts/tests/pytest/coverage.xml --junit-xml /tmp/artefacts/tests/pytest/results.xml | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: testenv | ||
channels: | ||
- conda-forge | ||
|
||
dependencies: | ||
- cmor | ||
- click | ||
- xarray | ||
- numpy | ||
- dask | ||
- pyyaml | ||
- cftime | ||
- python-dateutil | ||
- pytest | ||
- coverage | ||
- codecov | ||
- pyfakefs | ||
- ruff |
Oops, something went wrong.