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 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ body:
description: |
Please provide:
- Python version
- toon-format version
- toon_format version (from `pip show toon_format`)
- Operating system
placeholder: |
- Python 3.12.0
- toon-format 0.1.0
- toon_format 1.0.0
- macOS 14.0
validations:
required: true
Expand Down
71 changes: 65 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,83 @@ Closes #

- [ ] All existing tests pass
- [ ] Added new tests for changes
- [ ] Tested on Python 3.8
- [ ] Tested on Python 3.9
- [ ] Tested on Python 3.10
- [ ] Tested on Python 3.11
- [ ] Tested on Python 3.12
- [ ] Tested on Python 3.13
- [ ] Tested on Python 3.14

### Test Output

```bash
# Paste test output here
```

## Code Quality

<!-- Confirm code quality checks -->

- [ ] Ran `ruff check src/toon_format tests` - no issues
- [ ] Ran `ruff format src/toon_format tests` - code formatted
- [ ] Ran `mypy src/toon_format` - no critical errors
- [ ] All tests pass: `pytest tests/ -v`

## Checklist

<!-- Mark completed items with an [x] -->

- [ ] My code follows the project's coding standards
- [ ] My code follows the project's coding standards (PEP 8, line length 100)
- [ ] I have added type hints to new code
- [ ] I have run `ruff check` and `ruff format`
- [ ] I have run `mypy` on my changes
- [ ] I have added tests that prove my fix/feature works
- [ ] New and existing tests pass locally
- [ ] I have updated documentation (if needed)
- [ ] I have updated documentation (README.md, CLAUDE.md if needed)
- [ ] My changes do not introduce new dependencies
- [ ] I have maintained Python 3.8+ compatibility
- [ ] I have reviewed the [TOON specification](https://github.com/toon-format/spec) for relevant sections

## Performance Impact

<!-- If applicable, describe any performance implications -->

- [ ] No performance impact
- [ ] Performance improvement (describe below)
- [ ] Potential performance regression (describe and justify below)

<!-- Details: -->

## Breaking Changes

<!-- If this is a breaking change, describe the migration path for users -->

- [ ] No breaking changes
- [ ] Breaking changes (describe migration path below)

<!-- Migration path: -->

## Screenshots / Examples

<!-- If applicable, add screenshots or example output -->

```python
# Example usage
```

Output:
```
# Example output
```

## Additional Context

<!-- Add any other context about the PR here (optional) -->

## Checklist for Reviewers

<!-- For maintainers reviewing this PR -->

- [ ] Code changes are clear and well-documented
- [ ] Tests adequately cover the changes
- [ ] Documentation is updated
- [ ] No security concerns
- [ ] Follows TOON specification
- [ ] Backward compatible (or breaking changes are justified and documented)
40 changes: 40 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Dependabot configuration for automated dependency updates
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
# Monitor GitHub Actions for updates
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "github-actions"
commit-message:
prefix: "ci"
include: "scope"

# Monitor pip dependencies (compatible with uv)
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"
commit-message:
prefix: "deps"
include: "scope"
# Group dev dependencies together
groups:
dev-dependencies:
patterns:
- "pytest*"
- "mypy*"
- "ruff*"
update-types:
- "minor"
- "patch"
70 changes: 60 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,78 @@ name: Publish to PyPI
on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read

jobs:
publish:
name: Publish to PyPI
build:
name: Build distribution
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.x"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build

- name: Build package
run: uv build
run: python -m build

- name: Store distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Publish to PyPI
if: github.event_name == 'release' && github.event.action == 'published'
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/toon_format
permissions:
id-token: write

steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

publish-to-testpypi:
name: Publish to TestPyPI
if: github.event_name == 'workflow_dispatch'
needs: build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/toon_format
permissions:
id-token: write

steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/

- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
40 changes: 22 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@ name: Tests

on:
push:
branches: [main]
branches: [main, develop]
pull_request:
branches: [main]
branches: [main, develop]

jobs:
test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
name: Test Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11", "3.12", "3.13", "3.14"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -32,17 +30,23 @@ jobs:
- name: Install dependencies
run: uv sync

- name: Run tests
run: uv run pytest tests/ -v

- name: Run tests with coverage
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
run: |
uv run pytest tests/ --cov=src/toon_format --cov-report=xml --cov-report=term-missing
run: uv run pytest --cov=toon_format --cov-report=xml --cov-report=term --cov-report=html --cov-fail-under=85

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: codecov/codecov-action@v4
- name: Upload coverage reports as artifact
uses: actions/upload-artifact@v4
if: matrix.python-version == '3.12'
with:
name: coverage-reports
path: |
coverage.xml
htmlcov/
retention-days: 30

- name: Coverage comment on PR
uses: py-cov-action/python-coverage-comment-action@v3
if: matrix.python-version == '3.12' && github.event_name == 'pull_request'
with:
file: ./coverage.xml
fail_ci_if_error: false
GITHUB_TOKEN: ${{ github.token }}
MINIMUM_GREEN: 90
MINIMUM_ORANGE: 85
73 changes: 60 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
Expand All @@ -23,7 +27,36 @@ share/python-wheels/
*.egg
MANIFEST

# Virtual environments
# Package-specific
toon_format.egg-info/

# Ruff cache
.ruff_cache/

# Mypy cache
.mypy_cache/
.dmypy.json
dmypy.json

# PyInstaller
*.manifest
*.spec

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Environments
.env
.venv
env/
Expand All @@ -38,21 +71,35 @@ venv.bak/
*.swp
*.swo
*~
.claude/
CLAUDE.md

# macOS
.DS_Store
.AppleDouble
.LSOverride
._*

# Testing
.pytest_cache/
.coverage
htmlcov/
.tox/
.nox/
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Type checking
.mypy_cache/
.pytype/
.pyre/
.pyright/
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# uv
.uv/
uv.lock

PR_DESCRIPTION.md
AGENTS.md
.augment/
Loading
Loading