Fix import error for cfg #30
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
| name: lint_production | |
| on: | |
| push: | |
| branches: [main, production, wip/for-release, wip/remove-chemdata] | |
| pull_request: | |
| branches: [main, production, wip/for-release, wip/remove-chemdata] | |
| pull_request_target: | |
| types: [ready_for_review] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: ruff (check code style) | |
| # NOTE: We use an ubuntu runner to not be dependent on possibly limited digs infra | |
| # for this tiny linting job. This means we can have many lint jobs accross repos in parallel. | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: 'pip' | |
| - name: Extract ruff version from pyproject.toml | |
| run: | | |
| echo "RUFF_VERSION=$(grep 'ruff==' pyproject.toml \ | |
| | sed -E 's/.*ruff==([^",]+).*/\1/')" >> "$GITHUB_ENV" | |
| - name: Install ruff | |
| run: pip install ruff==${{ env.RUFF_VERSION }} | |
| - name: Ruff format | |
| run: ruff format --diff src models tests | |
| - name: Ruff check | |
| run: ruff check src models tests |