Skip to content

FIX: Fix handling of sweep_mode attribiutes #365

FIX: Fix handling of sweep_mode attribiutes

FIX: Fix handling of sweep_mode attribiutes #365

Workflow file for this run

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@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- 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 .
build_0:
name: xradar unit tests - linux
runs-on: ubuntu-latest
needs: [lint]
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install micromamba environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: xradar-tests
environment-file: ci/unittests.yml
extra-specs: |
python=${{ matrix.python-version }}
- name: Install xradar
run: |
python -m pip install . --no-deps
- name: Version Info
run: |
python -c "import xradar; print(xradar.version.version)"
- name: Test with pytest
run: |
pytest -n auto --dist loadfile --verbose --durations=15 --cov-report xml:coverage_unit.xml --cov=xradar --pyargs tests
pytest -n auto --dist loadfile --verbose --durations=15 --cov-report xml:coverage_notebooks.xml --cov=xradar --pyargs examples/notebooks
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage_unit.xml
flags: unittests
env_vars: RUNNER_OS,PYTHON_VERSION
name: codecov-gha
fail_ci_if_error: false
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage_notebook.xml
flags: notebooktests
env_vars: RUNNER_OS,PYTHON_VERSION
name: codecov-gha
fail_ci_if_error: false
test_build_distribution:
name: test build distribution
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build setuptools wheel
- name: Package
run: |
python -m build
cp dist/xradar*.gz dist/xradar0.gz
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: xradar-0-${{github.event.number}}
path: dist/xradar0.gz
test_build_distribution2:
name: test build distribution for testpypi
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- 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/xradar*.gz dist/xradar1.gz
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: xradar-1-${{github.event.number}}
path: dist/xradar1.gz