Skip to content
Closed
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/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Description

<!-- Briefly describe what this PR does -->

## Related Issues

<!-- Link related issues using keywords: "Fixes #123" or "Related to #456" -->

## Type of Change

<!-- Mark the applicable option with [x] -->

- [ ] `[Fix]` - Bug fix (non-breaking change fixing an issue)
- [ ] `[Feature]` - New feature (non-breaking change adding functionality)
- [ ] `[Refactor]` - Code refactoring (no functional changes)
- [ ] `[Release]` - Release preparation
- [ ] `[Hotfix]` - Critical fix for production

## How was this solved?

<!-- Explain your approach to solving the issue -->

## Checklist

- [ ] PR title includes appropriate tag: `[Fix]`, `[Feature]`, `[Refactor]`, `[Release]`, or `[Hotfix]`
- [ ] Linked to related issue (if applicable)
- [ ] Code passes `make check` (lint, format, isort)
- [ ] Tests added/updated for changes (if applicable)
- [ ] Documentation updated (if applicable)

## Testing

<!-- How can reviewers verify this change works? -->

## Additional Notes

<!-- Any additional context, screenshots, or considerations -->
41 changes: 41 additions & 0 deletions .github/auto-label-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# =============================================================================
# Auto-Label Configuration
# =============================================================================
#
# Used by: auto-label-prs.yml
#
# OUTPUT:
# PRs get labels based on:
# - Title prefix: [Fix] → "Fix" label
# - Changed files: docs/** → "documentation" label
# - Branch name: dependabot/* → "dependencies" label
#
# =============================================================================

autolabeler:
- label: 'documentation'
files:
- 'docs/**/*'
- '*.md'
branch:
- '/docs?\/.+/'
- label: 'Fix'
title:
- '/^\[Fix\]/i'
- label: 'Feature'
title:
- '/^\[Feature\]/i'
- label: 'Refactor'
title:
- '/^\[Refactor\]/i'
- label: 'Release'
title:
- '/^\[Release\]/i'
- label: 'Hotfix'
title:
- '/^\[Hotfix\]/i'
- label: 'dependencies'
files:
- 'pyproject.toml'
branch:
- '/dependabot\/.+/'
67 changes: 67 additions & 0 deletions .github/draft-changelog-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# =============================================================================
# Draft Changelog Configuration
# =============================================================================
#
# Used by: draft-changelog.yml
#
# OUTPUT:
# A draft release in GitHub Releases containing:
# - Title: v5.1.0 (based on version-resolver)
# - Body: Grouped list of PRs (based on categories)
#
# =============================================================================

name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'

template: |
## What's Changed

$CHANGES

**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION

categories:
- title: 'New Features'
labels:
- 'Feature'
- 'enhancement'
- title: 'Bug Fixes'
labels:
- 'Fix'
- 'bug'
- 'Hotfix'
- title: 'Refactoring'
labels:
- 'Refactor'
- 'refactoring'
- title: 'Documentation'
labels:
- 'documentation'
- 'docs'
- title: 'Maintenance'
labels:
- 'maintenance'
- 'dependencies'
- 'Release'

version-resolver:
major:
labels:
- 'major'
- 'breaking'
minor:
labels:
- 'minor'
- 'Feature'
patch:
labels:
- 'patch'
- 'Fix'
- 'Hotfix'
default: patch

exclude-labels:
- 'skip-changelog'
- 'duplicate'
- 'invalid'
35 changes: 35 additions & 0 deletions .github/workflows/auto-label-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# =============================================================================
# Auto-Label PRs
# =============================================================================
#
# TRIGGER:
# When a PR is opened or updated
#
# OUTPUT:
# PR gets a label based on its title prefix:
# - [Fix] → "Fix" label
# - [Feature] → "Feature" label
# - [Refactor] → "Refactor" label
# - etc.
#
# =============================================================================

name: Auto-Label PRs

on:
pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: read
pull-requests: write

jobs:
add_labels:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: auto-label-config.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90 changes: 90 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Documentation

on:
push:
branches:
- main
- dev
paths:
- 'docs/**'
- 'src/**'
- '.github/workflows/docs.yml'
pull_request:
branches:
- main
- dev
paths:
- 'docs/**'
- 'src/**'
- '.github/workflows/docs.yml'

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

jobs:
test-snippets:
name: test-doc-snippets
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --no-cache-dir --upgrade pip
python -m pip install --no-cache-dir -e ".[all_extras,test]"
python -m pip install --no-cache-dir -r docs/requirements.txt

- name: Show dependencies
run: python -m pip list

- name: Test documentation snippets
run: |
python -m pytest docs/tests/test_doc_snippets.py -v --tb=short

build-docs:
name: build-docs
runs-on: ubuntu-latest
needs: test-snippets

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --no-cache-dir --upgrade pip
python -m pip install --no-cache-dir -e ".[all_extras]"
python -m pip install --no-cache-dir -r docs/requirements.txt

- name: Show dependencies
run: python -m pip list

- name: Build documentation
run: |
cd docs && sphinx-build -b html source build/html -W --keep-going

- name: Run doctest
run: |
cd docs && sphinx-build -b doctest source build/doctest || true

- name: Upload documentation artifact
uses: actions/upload-artifact@v4
with:
name: docs-html
path: docs/build/html/
retention-days: 7
39 changes: 39 additions & 0 deletions .github/workflows/draft-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# =============================================================================
# Draft Changelog
# =============================================================================
#
# TRIGGER:
# When code is merged/pushed to main
#
# OUTPUT:
# A draft release in GitHub Releases section containing:
# - Grouped list of merged PRs (Features, Bug Fixes, etc.)
# - Suggested next version number
#
# DOES NOT:
# - Publish the release (you must click "Publish" manually)
# - Create git tags
# - Upload to PyPI
#
# =============================================================================

name: Draft Changelog

on:
push:
branches:
- main

permissions:
contents: read
pull-requests: write

jobs:
update_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: draft-changelog-config.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading