ADD: GRIDDING, MAX-CAPPI, AWS Features #132
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
lint: | |
name: lint and style checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install black black[jupyter] ruff | |
- name: Black style check | |
run: | | |
black --check . | |
- name: Lint with ruff | |
run: | | |
ruff check . | |
build_0: | |
name: radarx unit tests - linux | |
runs-on: ubuntu-latest | |
needs: [lint] | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
CONDA_ENV_FILE: ci/unittests.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.12"] | |
numpy-version: ["1", "2"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install micromamba environment | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-name: radarx-unit-tests | |
environment-file: ${{env.CONDA_ENV_FILE}} | |
cache-environment: true | |
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | |
create-args: >- | |
python=${{matrix.python-version}} | |
numpy=${{matrix.numpy-version}} | |
conda | |
- name: Install coverage via pip # ADD THIS STEP TO INSTALL COVERAGE | |
run: | | |
python -m pip install coverage pytest-cov pytest-xdist pytest-mock | |
- name: Install radarx | |
run: | | |
python -m pip install . --no-deps | |
- name: Version Info | |
run: | | |
python -c "import radarx; print(radarx.version.version)" | |
- name: Test with pytest | |
run: | | |
pytest -n auto --dist loadfile --verbose --durations=15 --cov-report xml:coverage_unit.xml --cov=radarx --pyargs tests | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
file: ./coverage_unit.xml | |
flags: unittests | |
env_vars: RUNNER_OS,PYTHON_VERSION | |
name: codecov-gha | |
fail_ci_if_error: false | |
token: ${{ secrets.CODECOV_TOKEN}} | |
build_1: | |
name: radarx notebook tests - linux | |
runs-on: ubuntu-latest | |
needs: [lint] | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
CONDA_ENV_FILE: ci/notebooktests.yml | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.12"] | |
numpy-version: ["2"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install micromamba environment | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-name: radarx-notebook-tests | |
environment-file: ${{env.CONDA_ENV_FILE}} | |
cache-environment: true | |
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | |
create-args: >- | |
python=${{matrix.python-version}} | |
numpy=${{matrix.numpy-version}} | |
conda | |
# - name: Install coverage and pytest via pip | |
# run: | | |
# python -m pip install coverage pytest-cov pytest-xdist nbval pytest-mock | |
# - name: Install radarx | |
# run: | | |
# python -m pip install . --no-deps | |
# - name: Version Info | |
# run: | | |
# python -c "import radarx; print(radarx.version.version)" | |
# - name: Test with pytest | |
# run: | | |
# pytest --nbval --verbose --durations=15 --cov=radarx --cov-report=xml:coverage_notebook.xml --cov-report=term-missing examples/notebooks | |
# - name: Upload coverage to Codecov | |
# uses: codecov/codecov-action@v5 | |
# with: | |
# file: ./coverage_notebook.xml | |
# flags: notebooktests | |
# env_vars: RUNNER_OS,PYTHON_VERSION | |
# name: codecov-gha | |
# fail_ci_if_error: false | |
# token: ${{ secrets.CODECOV_TOKEN}} | |
test_build_distribution_testpypi: | |
name: test build distribution for testpypi | |
needs: [lint, build_0] | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build setuptools wheel twine toml-cli | |
- name: Package | |
run: | | |
toml set --toml-path pyproject.toml tool.setuptools_scm.local_scheme "no-local-version" | |
git update-index --assume-unchanged pyproject.toml | |
python -m build | |
cp dist/radarx*.gz dist/radarx1.gz | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: radarx-1-${{github.event.number}} | |
path: dist/radarx1.gz | |
- name: Upload to TestPyPI | |
if: ${{ github.event_name == 'push' }} | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.TESTPYPI_API_TOKEN }} | |
run: | | |
rm -f dist/radarx1.gz | |
twine upload --repository testpypi dist/* | |
test_build_distribution_pypi: | |
name: test build distribution | |
needs: [lint, build_0, test_build_distribution_testpypi] | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build setuptools wheel | |
- name: Package | |
run: | | |
python -m build | |
cp dist/radarx*.gz dist/radarx0.gz | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: radarx-0-${{github.event.number}} | |
path: dist/radarx0.gz |