feat: docs cleanup #1394
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: Test Python Code | |
| on: | |
| pull_request: | |
| paths: | |
| - '**/*.py' | |
| jobs: | |
| sonarcloud: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: SonarCloud Scan | |
| uses: sonarsource/sonarqube-scan-action@master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| code-formatting-syntax-and-docstrings: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Check code formatting using ruff | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| version: 0.11.2 | |
| args: format --check | |
| - name: Check import order | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| version: 0.11.2 | |
| args: check --select I | |
| - name: Lint | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| version: 0.11.2 | |
| args: check | |
| - name: Check docstrings using interrogate | |
| run: | | |
| pip install interrogate | |
| if [ $(interrogate -c pyproject.toml -v . -f 100 | grep "FAILED" | wc -l) = 1 ]; then | |
| echo "necessary docstrings missing:" | |
| interrogate -vv -c pyproject.toml --omit-covered-files . -f 100 | |
| exit 1 | |
| fi | |
| functionality-tests: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| needs: [code-formatting-syntax-and-docstrings] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| id: cached_python_setup | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| cache-dependency-path: pyproject.toml | |
| - name: "run tests using a mock client" | |
| run: | | |
| pip install --upgrade pip | |
| pip install --upgrade setuptools | |
| pip install -e .[test,tools,plots] | |
| pytest --mock | |
| - name: "test docs with pytest markdown-docs" | |
| run: | | |
| pytest -x docs --mock --markdown-docs --markdown-docs-syntax=superfences | |