From b364f26f0975088948589b146e54b3ca99f38877 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 19 Feb 2026 15:26:32 -0800 Subject: [PATCH 1/2] Add ruff and pytype to dev dependencies These tools provide valuable static checking. --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 8951b6c..9345eeb 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,6 +34,8 @@ dependencies = [ dev = [ "pytest>=7.0", "pytest-cov>=4.0", + "pytype", + "ruff" ] [project.scripts] From 43046bbc53bda767645ffbc8507badf9466a297c Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 19 Feb 2026 15:27:13 -0800 Subject: [PATCH 2/2] Enable CI tests These check lint the code and run tests on a number of different Python versions. --- .github/workflows/python.yml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/python.yml diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..9cfbe8e --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,44 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python package + +permissions: {} + +on: + push: + branches: ["main", "ci"] + pull_request: + branches: ["main"] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t", "pypy3.11"] + + steps: + - uses: actions/checkout@v5 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + - name: Install dependencies + run: | + python -m pip install '.[dev]' + - name: Compile + run: | + python -m compileall -x '/\.git/' . + - name: Lint with ruff + run: | + ruff check + - name: Type check with pytype + run: | + pytype -j auto -k $(find urpm -name '*.py') + - name: Test with pytest + run: | + pytest -v