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
136 changes: 136 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
# Run full CI checks before publishing
lint:
name: Lint & Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Set up Python
run: uv python install 3.13

- name: Install dependencies
run: uv sync

- name: Check formatting
run: uv run ruff format --check .

- name: Check linting
run: uv run ruff check .

types:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Set up Python
run: uv python install 3.13

- name: Install dependencies
run: uv sync

- name: Type check
run: uv run ty check

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Set up Python
run: uv python install 3.13

- name: Install dependencies
run: uv sync

- name: Run tests
run: uv run pytest --cov=src/plait --cov-fail-under=90

build:
name: Build Distribution
runs-on: ubuntu-latest
needs: [lint, types, test]
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Set up Python
run: uv python install 3.13

- name: Build package
run: uv build

- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
if-no-files-found: error

publish-testpypi:
name: Publish to TestPyPI
runs-on: ubuntu-latest
needs: [build]
environment:
name: testpypi
url: https://test.pypi.org/project/pyplait/
permissions:
id-token: write
steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

publish-pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [publish-testpypi]
environment:
name: pypi
url: https://pypi.org/project/pyplait/
permissions:
id-token: write
steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
9 changes: 3 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
and this project adheres to [Calendar Versioning](https://calver.org/) with format `YYYY.MM.MICRO`.

## Formatting Rules

Expand All @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#13](https://github.com/eric-tramel/plait/pull/13) Fix scheduler race condition that caused 5-second delays when tasks completed while waiting for semaphore (10x test speedup: 33s → 3.4s)

### Added
- [#27](https://github.com/eric-tramel/plait/pull/27) Add release process documentation (`RELEASE.md`) with CalVer versioning and GitHub Actions workflow for automated PyPI publishing
- [#15](https://github.com/eric-tramel/plait/pull/15) Add container modules (`Sequential`, `ModuleList`, `ModuleDict`) for PyTorch-style module composition
- [#14](https://github.com/eric-tramel/plait/pull/14) Consolidate examples from 9 files to 5 focused single-concept files with `make example` runner
- [#12](https://github.com/eric-tramel/plait/pull/12) Export core classes (`Module`, `LLMInference`, `Parameter`, `ExecutionSettings`) from package root for cleaner imports
Expand Down Expand Up @@ -86,8 +87,4 @@ _No releases yet._

## Release Process

1. Update version in `pyproject.toml`
2. Move items from `[Unreleased]` to new version section
3. Add release date
4. Create git tag: `git tag -a v0.X.0 -m "Release v0.X.0"`
5. Push tag: `git push origin v0.X.0`
See [RELEASE.md](RELEASE.md) for the complete release process documentation.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@ plait is **up to 2x faster** and uses **up to 99% less memory** than alternative

```bash
# Install with uv (recommended)
uv add plait
uv add pyplait

# Or with pip
pip install plait
pip install pyplait
```

> **Note**: The package is published as `pyplait` on PyPI, but you import it as `plait` in Python.

**Requirements**: Python 3.13+

## Quick Start
Expand Down
Loading