Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
push:
branches: ['**']
pull_request:
branches: ['**']

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.13'
- uses: pre-commit/action@v3.0.1

test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9', '3.12', '3.13']
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install package with test dependencies
run: pip install -e ".[dev]"
- name: Run tests
# Agg keeps matplotlib off a display that the runners do not have
env:
MPLBACKEND: Agg
run: pytest -q
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@ var/
# PyInstaller
/weighslide.egg-info/

*__pycache__*
*__pycache__*
# ruff / mypy / pytest caches
.ruff_cache/
.mypy_cache/
.pytest_cache/
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Run `pre-commit install` after cloning. CI runs the same hooks.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 26.5.1
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.22
hooks:
- id: ruff-check
args: [--fix]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v2.3.0
hooks:
- id: mypy
args: [--ignore-missing-imports, --allow-untyped-globals]
files: ^weighslide/.*\.py$
4 changes: 1 addition & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include MANIFEST.in
include LICENSE.txt
include setup.cfg
include README.md
include examples/input.png
include examples/output.png
include examples/contact.png
include examples/contact.png
Loading
Loading