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
99 changes: 99 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Bump Version

on:
workflow_dispatch:
inputs:
bump_type:
description: "Version bump type"
required: true
type: choice
options:
- patch
- minor
- major

jobs:
bump-version:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Assert dev branch
run: |
if [ "$GITHUB_REF" != "refs/heads/dev" ]; then
echo "Error: This workflow must be run from the dev branch (got $GITHUB_REF)."
exit 1
fi

- name: Checkout
uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
python-version: "3.12"

- name: Bump version in pyproject.toml
id: bump
env:
BUMP_TYPE: ${{ github.event.inputs.bump_type }}
run: |
uv run - << 'EOF'
# /// script
# dependencies = ["tomli-w"]
# ///
import tomllib, tomli_w, os

bump_type = os.environ["BUMP_TYPE"]

with open("pyproject.toml", "rb") as f:
data = tomllib.load(f)

old_version = data["project"]["version"]
major, minor, patch = map(int, old_version.split("."))

if bump_type == "major":
major += 1
minor = 0
patch = 0
elif bump_type == "minor":
minor += 1
patch = 0
else:
patch += 1

new_version = f"{major}.{minor}.{patch}"
data["project"]["version"] = new_version

with open("pyproject.toml", "wb") as fp:
tomli_w.dump(data, fp)

with open(os.environ["GITHUB_OUTPUT"], "a") as f:
f.write(f"old_version={old_version}\n")
f.write(f"new_version={new_version}\n")

print(f"Version bumped: {old_version} -> {new_version}")
EOF

- name: Configure git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"

- name: Create PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH="bump-version/${{ steps.bump.outputs.new_version }}"
git checkout -b "$BRANCH"
git add pyproject.toml
git commit -m "bump version ${{ steps.bump.outputs.old_version }} -> ${{ steps.bump.outputs.new_version }}"
git push origin "$BRANCH"
gh pr create \
--title "bump version ${{ steps.bump.outputs.old_version }} -> ${{ steps.bump.outputs.new_version }}" \
--body "Automated ${{ github.event.inputs.bump_type }} version bump triggered by @${{ github.actor }}." \
--base dev \
--head "$BRANCH" \
--label "release"
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v8.0.0
uses: astral-sh/setup-uv@v8.1.0
with:
python-version: "3.12"

Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ 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.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.3.1] - 2026-04-27

### Added
- Comprehensive code examples in docstrings for all public API classes and functions: `D3Session`, `D3AsyncSession`, `D3PluginClient`, `D3PythonScript`, `D3Function`, `DesignerPlugin`, `PluginException`, `PluginPayload`, and all low-level functions in `api.py`.
- `scripts/generate_astro_docs.py`: script for generating Astro-compatible API reference documentation.

### Changed
- Improved `DesignerPlugin` class docstring and expanded `default_init()`, `from_json_file()`, and `service_info` docstrings with full Args/Returns sections and examples.
- Added explicit notes to `register_module` and `register_all_modules` on `D3Session` and `D3AsyncSession` clarifying that eager registration is only needed in rare cases — sessions already auto-register lazily on `execute()`.
- `PluginPayload.is_module_payload()` and `debug_string()` now have docstrings.

## [1.3.0] - 2026-01-06

### Added
Expand Down
25 changes: 20 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,27 @@ When requesting features, please include:
- Update CHANGELOG.md following Keep a Changelog format
- Add examples for new features

### Documentation Style
### Generating API Documentation

- Write clear, concise documentation
- Include code examples
- Explain the "why" not just the "what"
- Keep documentation up to date with code
The API reference page for the [developer.disguise.one](https://developer.disguise.one) documentation site is generated from docstrings using `scripts/generate_astro_docs.py`.

Run it from the repo root:

```bash
python scripts/generate_astro_docs.py
```

By default the output is written to `dist/reference.md`. To write elsewhere:

```bash
python scripts/generate_astro_docs.py --output /path/to/output/dir
```

**What it generates:**

| File | Content |
|------|---------|
| `reference.md` | Full API reference with table of contents, covering `DesignerPlugin`, models, sessions, client, and decorators |

## Release Process

Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
prune scripts
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "designer-plugin"
version = "1.3.0"
version = "1.3.1"
description = "Python library for creating Disguise Designer plugins with DNS-SD discovery and remote Python execution"
authors = [
{ name = "Taegyun Ha", email = "taegyun.ha@disguise.one" },
Expand Down
Loading
Loading