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
27 changes: 0 additions & 27 deletions .devcontainer/Dockerfile.dev

This file was deleted.

120 changes: 0 additions & 120 deletions .devcontainer/README.md

This file was deleted.

32 changes: 14 additions & 18 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
{
// To customize this for your local environment without committing changes,
// create a .devcontainer/devcontainer.local.json file (it's gitignored).
// See .devcontainer/README.md for examples.
"name": "toon-python (devcontainer)",
"build": {
"dockerfile": "Dockerfile.dev",
"context": ".."
},
"workspaceFolder": "/app",
"mounts": [
"source=${localWorkspaceFolder},target=/app,type=bind,consistency=cached"
],
"name": "toon-python",
"image": "mcr.microsoft.com/devcontainers/python:3.14-trixie",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"remoteEnv": {
// Python environment variables (can be overridden in devcontainer.local.json)
// These supplement the ENV vars set in Dockerfile.dev
"containerEnv": {
// Keep the container's virtualenv out of the mounted repository, so it
// never replaces the host's .venv.
"UV_PROJECT_ENVIRONMENT": "/home/vscode/.venv",
"UV_LINK_MODE": "copy"
},
"postCreateCommand": "uv sync --all-groups",
"postCreateCommand": ".devcontainer/post-create.sh",
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.mypy-type-checker",
"charliermarsh.ruff"
],
"settings": {
"python.defaultInterpreterPath": "/app/.venv/bin/python"
"python.defaultInterpreterPath": "/home/vscode/.venv/bin/python"
}
}
}
Expand Down
32 changes: 0 additions & 32 deletions .devcontainer/devcontainer.local.json.example

This file was deleted.

7 changes: 7 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
# Kept in a file so postCreateCommand is a single word: Zed joins the
# arguments of lifecycle commands without quoting them.
set -eu
pipx install uv
uv sync --all-groups
uv run prek install
15 changes: 3 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,9 @@ charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{py,pyi}]
indent_style = space
indent_size = 4

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.{json,toml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
[*.{py,pyi}]
indent_size = 4
max_line_length = 88
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
groups:
actions:
patterns: ["*"]
- package-ecosystem: uv
directory: /
schedule:
interval: monthly
groups:
dev-dependencies:
patterns: ["*"]
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint and type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- run: uv sync --locked
- run: uv run ruff check .
- run: uv run ruff format --check .
- run: uv run mypy

docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- run: uv run --locked --group docs mkdocs build --strict

test:
name: Test (Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
include:
- os: macos-latest
python-version: "3.14"
- os: windows-latest
python-version: "3.14"
env:
HYPOTHESIS_PROFILE: ci
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- run: uv sync --locked
- run: uv run pytest --cov --cov-report=term --cov-report=xml --cov-fail-under=95
- uses: actions/upload-artifact@v5
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'
with:
name: coverage
path: coverage.xml

build:
name: Build distributions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
- run: uv build
- name: Smoke test the wheel
run: |
uv run --isolated --no-project --with dist/toon_format-*.whl python -c \
"import toon_format as t; assert t.loads(t.dumps({'a': [1, 2]})) == {'a': [1, 2]}"
39 changes: 0 additions & 39 deletions .github/workflows/lint.yml

This file was deleted.

Loading
Loading