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
4,552 changes: 4,552 additions & 0 deletions .basedpyright/baseline.json

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions .github/workflows/ruff.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Static analysis
on: [push, pull_request]
jobs:
static_analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
# This is pinned for reproducibility. It can be updated anytime
# a new version of uv is released.
version: 0.6.17
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install dependencies
run: uv sync --locked --all-extras --dev
- name: Run static checks
run: uv run pre-commit run --all-files
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: test
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
env:
UV_PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
# This is pinned for reproducibility. It can be updated anytime
# a new version of uv is released.
version: 0.6.17
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --locked --all-extras --dev
- name: Run py.test
run: uv run py.test colander_tools
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build
*.egg-info

__pycache__
Expand Down
69 changes: 69 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
# This file is automatically written without a newline, and fixing it
# repeatedly would be a waste of time.
exclude: ".basedpyright/baseline.json"
- id: debug-statements
- id: check-docstring-first
- id: check-merge-conflict
- id: name-tests-test
- repo: local
hooks:
- id: uv-lock
name: uv lock
language: system
require_serial: true
files: (^|/)pyproject\.toml$
pass_filenames: false
entry: uv lock
args:
- --check

- id: ruff
name: ruff check
language: system
require_serial: true
types: [python]
entry: uv run ruff check
args:
- --fix
- --exit-non-zero-on-fix
- id: ruff-format
name: ruff format
language: system
require_serial: true
types: [python]
entry: uv run ruff format
args:
- --verbose

- id: pyproject-fmt
name: pyproject-fmt
language: system
files: (^|/)pyproject\.toml$
entry: uv run pyproject-fmt

- id: prospector
name: prospector
language: system
require_serial: true
types: [python]
entry: uv run prospector
args:
- --ignore-patterns='^(?!colander_tools)'
- --no-autodetect

- id: basedpyright
name: basedpyright
language: system
require_serial: true
types: [python]
entry: uv run basedpyright
args:
- --level
- error
11 changes: 11 additions & 0 deletions .prospector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
strictness: medium

pylint:
disable:
# TODO: incrementally re-enable and fix each of these warnings
- consider-using-f-string
- disallowed-name
- raise-missing-from
- redefined-builtin
- super-with-arguments
- useless-object-inheritance
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

22 changes: 16 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ license = "BSD-3-Clause"
authors = [
{ name = "Platform.sh", email = "sayhello@platform.sh" },
]
requires-python = ">=3.7"
requires-python = ">=3.9"
classifiers = [
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -36,10 +34,22 @@ dependencies = [

urls.source = "https://github.com/platformsh/colander-tools"

[tool.pyproject-fmt]
indent = 4

[dependency-groups]
dev = [
"basedpyright~=1.29",
"pre-commit~=4.2",
"prospector~=1.16",
"pyproject-fmt~=2.5",
"pytest~=8.3",
"ruff~=0.11.5",
]

[tool.pyproject-fmt]
indent = 4

[tool.pyright]
venvPath = "."
venv = ".venv"
include = [ "colander_tools" ]
pythonVersion = "3.9"
failOnWarnings = false
4 changes: 0 additions & 4 deletions test-requirements.txt

This file was deleted.

Loading