Skip to content

return metric name in __str__ #62

return metric name in __str__

return metric name in __str__ #62

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
env:
PY_VERSION_BUILD: 3.12
jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Code formatting
uses: astral-sh/ruff-action@v3
with:
args: "format --check --diff"
pypa-build:
name: PyPA build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PY_VERSION_BUILD }}
cache: 'pip' # caching pip dependencies
- run: |
python3 -m pip install --upgrade build && python3 -m build
conda-build:
name: Conda Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup conda environment
uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
with:
miniconda-version: "latest"
python-version: ${{ env.PY_VERSION_BUILD }}
environment-file: conda/environment.yml
auto-update-conda: false
auto-activate-base: false
show-channel-urls: true
- name: Build conda package
uses: ACCESS-NRI/action-build-and-upload-conda-packages@v3.0.0
with:
meta_yaml_dir: conda
label: main
upload: false
build:
needs: formatting
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[devel,test]'
- name: Lint with ruff
uses: astral-sh/ruff-action@v3
- name: Test with pytest
run: |
python -m pytest
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}