guard against cf_name.canonical_units being None in get_nc_attrs #218
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
| # This workflow will install Python dependencies, run tests and lint with a single version of Python | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Build | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| lint: | |
| name: Lint and Style | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7.6.0 | |
| with: | |
| enable-cache: true | |
| - name: Lint with ruff | |
| run: | | |
| uvx ruff check | |
| - name: Test code style with ruff | |
| run: | | |
| uvx ruff format --check | |
| pytest: | |
| name: Pytest | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7.6.0 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Test with pytest | |
| run: uv run pytest --pyargs cchdo.params --cov-report xml --cov=src | |
| - name: Upload coverage to Coveralls | |
| uses: coverallsapp/github-action@v2.3.0 | |
| continue-on-error: true | |
| with: | |
| file: ./coverage.xml | |
| selftest: | |
| name: Selftest | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7.6.0 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: | | |
| uv venv | |
| uv pip install .[selftest] | |
| - name: Test with pytest | |
| run: uv run --no-default-groups pytest --pyargs cchdo.params | |
| typing: | |
| name: Typing with ty | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7.6.0 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Test typing | |
| run: uv run ty check src |