fix: normalize None timesteps and use .get() for safe optim_conf reads #884
Workflow file for this run
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: "Code Quality Scan" | |
| # Use tools such as mypy ruf and sonarcloud to check for code quality & code security | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| id-token: write | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| env: | |
| OS: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - uses: sourcery-ai/action@v1 | |
| continue-on-error: true | |
| with: | |
| token: ${{ secrets.SOURCERY_TOKEN }} | |
| diff_ref: ${{ github.event.pull_request.base.sha }} | |
| - name: Install the project | |
| run: uv sync --reinstall --extra test | |
| - name: Install ruff | |
| run: uv tool install ruff | |
| - name: Run Ruff | |
| run: uvx ruff check --output-format=github . | |
| - name: Check formatting | |
| run: uvx ruff format --check --diff | |
| scan-pr: | |
| uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@v2.0.1" | |
| with: | |
| fail-on-vuln: false | |
| scan-args: |- | |
| --recursive | |
| ./ | |
| permissions: | |
| actions: read | |
| security-events: write | |
| contents: read |