Skip to content

Removed Unfinished Features #15

Removed Unfinished Features

Removed Unfinished Features #15

name: esgf-transaction-api-check
on:
push:
paths:
- "esgf-transaction-api/**"
pull_request:
paths:
- "esgf-transaction-api/**"
jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup
run: |
pipx install poetry
- name: Run black
run: |
cd esgf-transaction-api
poetry install --only black
poetry run black ./ --verbose --check
- name: Run mypy
run: |
cd esgf-transaction-api
poetry install
poetry run mypy .
- name: Run bandit
run: |
cd esgf-transaction-api
poetry install --only bandit
poetry run bandit -c pyproject.toml -r .
- name: Run isort
run: |
cd esgf-transaction-api
poetry install --only isort
poetry run isort . --check
- name: Run ruff
run: |
cd esgf-transaction-api
poetry install --only ruff
poetry run ruff check
- name: Run audit
run: |
cd esgf-transaction-api
poetry self add poetry-audit-plugin
poetry audit $(poetry run python -c "import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); ignore_codes = data['tool']['quality']['audit']['ignore-code']; print('--ignore-code=' + ','.join(ignore_codes)) if ignore_codes else print('')")
- name: Run xenon
run: |
cd esgf-transaction-api
poetry install --only xenon
poetry run xenon -a $(poetry run python -c "import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['average'])") -b $(poetry run python -c "import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['block'])") -m $(poetry run python -c "import tomllib; f = open('pyproject.toml','rb') ; data = tomllib.load(f); f.close(); print(data['tool']['quality']['mccabe']['module'])") .