chore(inference): update README.md #13
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: Python Code Quality | |
| on: | |
| push: | |
| branches: [main, develop] | |
| paths: | |
| - "src/python/**" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - ".github/workflows/python-check.yml" | |
| pull_request: | |
| branches: [main, develop] | |
| paths: | |
| - "src/python/**" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - ".github/workflows/python-check.yml" | |
| jobs: | |
| ruff-lint: | |
| name: Ruff - Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: pyproject.toml | |
| - name: Run ruff lint | |
| run: uv run -- ruff check --force-exclude src/python | |
| ruff-format: | |
| name: Ruff - Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: pyproject.toml | |
| - name: Check formatting | |
| run: uv run -- ruff format --check --force-exclude src/python | |
| mypy: | |
| name: mypy - Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: pyproject.toml | |
| - name: Run mypy | |
| run: uv run -- mypy src/python | |
| trailing-whitespace: | |
| name: Trailing Whitespace | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: pyproject.toml | |
| - name: Run trailing-whitespace-fixer | |
| run: | | |
| find src/python -type f \( -name "*.py" -o -name "*.pyi" \) | xargs uv run -- trailing-whitespace-fixer | |
| if git diff --exit-code; then | |
| echo "✓ No trailing whitespace found" | |
| else | |
| echo "✗ Trailing whitespace detected. Run: uv run -- trailing-whitespace-fixer to fix" | |
| exit 1 | |
| fi | |
| end-of-file-fixer: | |
| name: End of File Fixer | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: pyproject.toml | |
| - name: Run end-of-file-fixer | |
| run: | | |
| find src/python -type f \( -name "*.py" -o -name "*.pyi" \) | xargs uv run -- end-of-file-fixer | |
| if git diff --exit-code; then | |
| echo "✓ All files end with newline" | |
| else | |
| echo "✗ Files missing final newline. Run: uv run -- end-of-file-fixer to fix" | |
| exit 1 | |
| fi | |
| check-merge-conflict: | |
| name: Check Merge Conflicts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: pyproject.toml | |
| - name: Check merge conflicts | |
| run: uv run -- check-merge-conflict --assume-in-merge $(find src/python -type f -name "*.py") |