studio-baton 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- studio_baton-0.1.0/.github/workflows/ci.yml +85 -0
- studio_baton-0.1.0/.github/workflows/release.yml +77 -0
- studio_baton-0.1.0/.gitignore +43 -0
- studio_baton-0.1.0/LICENSE +21 -0
- studio_baton-0.1.0/PKG-INFO +487 -0
- studio_baton-0.1.0/README.md +451 -0
- studio_baton-0.1.0/docs/adopting-an-existing-schema.md +66 -0
- studio_baton-0.1.0/docs/notion-setup.md +58 -0
- studio_baton-0.1.0/docs/private-overlay.md +73 -0
- studio_baton-0.1.0/profiles/example/.env.example +35 -0
- studio_baton-0.1.0/profiles/example/baton.yaml +75 -0
- studio_baton-0.1.0/pyproject.toml +106 -0
- studio_baton-0.1.0/skills/README.md +58 -0
- studio_baton-0.1.0/skills/lesson-summarizer/SKILL.md +73 -0
- studio_baton-0.1.0/skills/quick-notes/SKILL.md +45 -0
- studio_baton-0.1.0/skills/send-lesson/SKILL.md +54 -0
- studio_baton-0.1.0/skills/student-lookup/SKILL.md +52 -0
- studio_baton-0.1.0/skills/studio-calendar/SKILL.md +59 -0
- studio_baton-0.1.0/skills/video-pipeline/SKILL.md +55 -0
- studio_baton-0.1.0/src/baton/__init__.py +19 -0
- studio_baton-0.1.0/src/baton/__main__.py +6 -0
- studio_baton-0.1.0/src/baton/adapters/__init__.py +6 -0
- studio_baton-0.1.0/src/baton/adapters/cal/__init__.py +27 -0
- studio_baton-0.1.0/src/baton/adapters/cal/base.py +51 -0
- studio_baton-0.1.0/src/baton/adapters/cal/google.py +136 -0
- studio_baton-0.1.0/src/baton/adapters/chat/__init__.py +43 -0
- studio_baton-0.1.0/src/baton/adapters/chat/base.py +129 -0
- studio_baton-0.1.0/src/baton/adapters/chat/drivers.py +260 -0
- studio_baton-0.1.0/src/baton/adapters/db/__init__.py +83 -0
- studio_baton-0.1.0/src/baton/adapters/db/base.py +177 -0
- studio_baton-0.1.0/src/baton/adapters/db/fallback.py +95 -0
- studio_baton-0.1.0/src/baton/adapters/db/mapping.py +64 -0
- studio_baton-0.1.0/src/baton/adapters/db/postgrest.py +325 -0
- studio_baton-0.1.0/src/baton/adapters/db/sqlite.py +374 -0
- studio_baton-0.1.0/src/baton/adapters/docs/__init__.py +39 -0
- studio_baton-0.1.0/src/baton/adapters/docs/base.py +166 -0
- studio_baton-0.1.0/src/baton/adapters/docs/notion.py +315 -0
- studio_baton-0.1.0/src/baton/adapters/fakes.py +423 -0
- studio_baton-0.1.0/src/baton/adapters/media/__init__.py +88 -0
- studio_baton-0.1.0/src/baton/adapters/media/base.py +108 -0
- studio_baton-0.1.0/src/baton/adapters/media/ffmpeg.py +148 -0
- studio_baton-0.1.0/src/baton/adapters/media/google.py +225 -0
- studio_baton-0.1.0/src/baton/adapters/media/local.py +86 -0
- studio_baton-0.1.0/src/baton/cli/__init__.py +1 -0
- studio_baton-0.1.0/src/baton/cli/app.py +285 -0
- studio_baton-0.1.0/src/baton/cli/cmd_calendar.py +338 -0
- studio_baton-0.1.0/src/baton/cli/cmd_config.py +83 -0
- studio_baton-0.1.0/src/baton/cli/cmd_doctor.py +392 -0
- studio_baton-0.1.0/src/baton/cli/cmd_init.py +316 -0
- studio_baton-0.1.0/src/baton/cli/cmd_job.py +285 -0
- studio_baton-0.1.0/src/baton/cli/cmd_learner.py +475 -0
- studio_baton-0.1.0/src/baton/cli/cmd_lesson.py +587 -0
- studio_baton-0.1.0/src/baton/cli/cmd_notes.py +177 -0
- studio_baton-0.1.0/src/baton/cli/cmd_send.py +232 -0
- studio_baton-0.1.0/src/baton/cli/cmd_video.py +266 -0
- studio_baton-0.1.0/src/baton/contracts/__init__.py +241 -0
- studio_baton-0.1.0/src/baton/contracts/lesson_summary.schema.json +95 -0
- studio_baton-0.1.0/src/baton/core/__init__.py +5 -0
- studio_baton-0.1.0/src/baton/core/config.py +340 -0
- studio_baton-0.1.0/src/baton/core/i18n.py +75 -0
- studio_baton-0.1.0/src/baton/core/jobs.py +564 -0
- studio_baton-0.1.0/src/baton/core/jsonio.py +188 -0
- studio_baton-0.1.0/src/baton/core/output.py +121 -0
- studio_baton-0.1.0/src/baton/core/paths.py +84 -0
- studio_baton-0.1.0/src/baton/core/retry.py +157 -0
- studio_baton-0.1.0/src/baton/defaults.yaml +302 -0
- studio_baton-0.1.0/src/baton/domain/__init__.py +6 -0
- studio_baton-0.1.0/src/baton/domain/models.py +107 -0
- studio_baton-0.1.0/src/baton/domain/resolve.py +135 -0
- studio_baton-0.1.0/src/baton/domain/status.py +74 -0
- studio_baton-0.1.0/src/baton/domain/whenever.py +186 -0
- studio_baton-0.1.0/src/baton/errors.py +169 -0
- studio_baton-0.1.0/src/baton/exits.py +96 -0
- studio_baton-0.1.0/src/baton/locale/en.yaml +41 -0
- studio_baton-0.1.0/src/baton/locale/th.yaml +40 -0
- studio_baton-0.1.0/src/baton/migrations/postgres.sql +61 -0
- studio_baton-0.1.0/src/baton/migrations/seed_example.sql +31 -0
- studio_baton-0.1.0/src/baton/migrations/sqlite.sql +59 -0
- studio_baton-0.1.0/src/baton/pipelines/__init__.py +5 -0
- studio_baton-0.1.0/src/baton/pipelines/learner.py +250 -0
- studio_baton-0.1.0/src/baton/pipelines/publish.py +137 -0
- studio_baton-0.1.0/src/baton/pipelines/schedule.py +455 -0
- studio_baton-0.1.0/src/baton/pipelines/send.py +204 -0
- studio_baton-0.1.0/src/baton/pipelines/staging.py +249 -0
- studio_baton-0.1.0/src/baton/pipelines/video.py +424 -0
- studio_baton-0.1.0/src/baton/render/__init__.py +6 -0
- studio_baton-0.1.0/src/baton/render/markdown.py +136 -0
- studio_baton-0.1.0/src/baton/render/summary.py +216 -0
- studio_baton-0.1.0/tests/conftest.py +71 -0
- studio_baton-0.1.0/tests/test_calendar.py +605 -0
- studio_baton-0.1.0/tests/test_cli.py +296 -0
- studio_baton-0.1.0/tests/test_config.py +234 -0
- studio_baton-0.1.0/tests/test_contracts.py +238 -0
- studio_baton-0.1.0/tests/test_db_sqlite.py +282 -0
- studio_baton-0.1.0/tests/test_docs.py +229 -0
- studio_baton-0.1.0/tests/test_fallback.py +115 -0
- studio_baton-0.1.0/tests/test_init.py +221 -0
- studio_baton-0.1.0/tests/test_jobs.py +341 -0
- studio_baton-0.1.0/tests/test_jsonio.py +132 -0
- studio_baton-0.1.0/tests/test_learner_cli.py +286 -0
- studio_baton-0.1.0/tests/test_learner_pipeline.py +477 -0
- studio_baton-0.1.0/tests/test_lesson_cli.py +429 -0
- studio_baton-0.1.0/tests/test_notes.py +299 -0
- studio_baton-0.1.0/tests/test_parity_tool.py +191 -0
- studio_baton-0.1.0/tests/test_publish.py +196 -0
- studio_baton-0.1.0/tests/test_resolve.py +111 -0
- studio_baton-0.1.0/tests/test_send.py +653 -0
- studio_baton-0.1.0/tests/test_skills.py +199 -0
- studio_baton-0.1.0/tests/test_staging.py +73 -0
- studio_baton-0.1.0/tests/test_video.py +456 -0
- studio_baton-0.1.0/tools/check_leaks.py +155 -0
- studio_baton-0.1.0/tools/parity.py +246 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_call:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
name: test (py${{ matrix.python }} on ${{ matrix.os }})
|
|
16
|
+
runs-on: ${{ matrix.os }}
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
os: [ubuntu-latest]
|
|
21
|
+
# 3.11 is what the openclaw gateway container runs (Debian bookworm)
|
|
22
|
+
# and 3.14 is the studio's own machine. Both are production runtimes, so
|
|
23
|
+
# neither may be left to chance.
|
|
24
|
+
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
25
|
+
include:
|
|
26
|
+
# macOS is the other platform a studio might run this from by hand.
|
|
27
|
+
# Windows is not tested because it is not supported: the job layer is
|
|
28
|
+
# built on POSIX signals and file locking, and its first honest CI run
|
|
29
|
+
# said so out loud. See "Supported platforms" in the README.
|
|
30
|
+
- os: macos-latest
|
|
31
|
+
python: "3.12"
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- uses: actions/setup-python@v5
|
|
36
|
+
with:
|
|
37
|
+
python-version: ${{ matrix.python }}
|
|
38
|
+
|
|
39
|
+
- name: Install
|
|
40
|
+
run: python -m pip install --upgrade pip && pip install -e ".[dev]"
|
|
41
|
+
|
|
42
|
+
- name: Test
|
|
43
|
+
run: python -m pytest --cov=baton --cov-report=term-missing
|
|
44
|
+
|
|
45
|
+
quality:
|
|
46
|
+
name: lint and types
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
|
|
51
|
+
- uses: actions/setup-python@v5
|
|
52
|
+
with:
|
|
53
|
+
python-version: "3.12"
|
|
54
|
+
|
|
55
|
+
- name: Install
|
|
56
|
+
run: python -m pip install --upgrade pip && pip install -e ".[dev]"
|
|
57
|
+
|
|
58
|
+
- name: Lint
|
|
59
|
+
run: python -m ruff check .
|
|
60
|
+
|
|
61
|
+
- name: Format check
|
|
62
|
+
run: python -m ruff format --check .
|
|
63
|
+
|
|
64
|
+
- name: Types
|
|
65
|
+
run: python -m mypy
|
|
66
|
+
|
|
67
|
+
leaks:
|
|
68
|
+
name: no leaked paths, secrets, or personal data
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/checkout@v4
|
|
72
|
+
with:
|
|
73
|
+
fetch-depth: 0
|
|
74
|
+
|
|
75
|
+
- uses: actions/setup-python@v5
|
|
76
|
+
with:
|
|
77
|
+
python-version: "3.12"
|
|
78
|
+
|
|
79
|
+
- name: Scan
|
|
80
|
+
run: python tools/check_leaks.py
|
|
81
|
+
|
|
82
|
+
- name: Scan history for secrets
|
|
83
|
+
uses: gitleaks/gitleaks-action@v2
|
|
84
|
+
env:
|
|
85
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
# The full suite runs again against the tag. A release that ships code the
|
|
12
|
+
# tests never saw is exactly the release that breaks someone's studio.
|
|
13
|
+
verify:
|
|
14
|
+
uses: ./.github/workflows/ci.yml
|
|
15
|
+
|
|
16
|
+
build:
|
|
17
|
+
needs: verify
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
|
|
26
|
+
- name: Build
|
|
27
|
+
run: |
|
|
28
|
+
python -m pip install --upgrade pip build
|
|
29
|
+
python -m build
|
|
30
|
+
|
|
31
|
+
- name: Check the wheel carries its data files
|
|
32
|
+
run: |
|
|
33
|
+
python -m pip install dist/*.whl
|
|
34
|
+
python - <<'PY'
|
|
35
|
+
from pathlib import Path
|
|
36
|
+
import baton
|
|
37
|
+
|
|
38
|
+
# `__file__` is None when the wheel shipped no `__init__.py` and the
|
|
39
|
+
# import resolved to a namespace package instead — which is what a
|
|
40
|
+
# mis-scoped `include` in pyproject produces: a wheel of data files
|
|
41
|
+
# with no code. Say that, rather than raising TypeError on None.
|
|
42
|
+
assert baton.__file__, "the wheel carries no Python code (namespace package)"
|
|
43
|
+
root = Path(baton.__file__).parent
|
|
44
|
+
for name in ("cli/app.py", "defaults.yaml", "locale/th.yaml",
|
|
45
|
+
"migrations/sqlite.sql", "contracts/lesson_summary.schema.json"):
|
|
46
|
+
assert (root / name).is_file(), f"{name} missing from the wheel"
|
|
47
|
+
print("wheel contents ok")
|
|
48
|
+
PY
|
|
49
|
+
|
|
50
|
+
- name: Check the installed console script actually runs
|
|
51
|
+
run: |
|
|
52
|
+
baton --version
|
|
53
|
+
baton --help > /dev/null
|
|
54
|
+
|
|
55
|
+
- uses: actions/upload-artifact@v4
|
|
56
|
+
with:
|
|
57
|
+
name: dist
|
|
58
|
+
path: dist/
|
|
59
|
+
|
|
60
|
+
publish:
|
|
61
|
+
needs: build
|
|
62
|
+
# Off until the PyPI trusted publisher exists. Set the repository variable
|
|
63
|
+
# PUBLISH_TO_PYPI to `true` to turn it on — until then a tag still gets a
|
|
64
|
+
# verified, built artefact, and the release run stays green instead of
|
|
65
|
+
# failing on an upload nobody has authorised yet.
|
|
66
|
+
if: vars.PUBLISH_TO_PYPI == 'true'
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
environment: pypi
|
|
69
|
+
permissions:
|
|
70
|
+
id-token: write # trusted publishing; no API token to leak
|
|
71
|
+
steps:
|
|
72
|
+
- uses: actions/download-artifact@v4
|
|
73
|
+
with:
|
|
74
|
+
name: dist
|
|
75
|
+
path: dist/
|
|
76
|
+
|
|
77
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
build/
|
|
6
|
+
dist/
|
|
7
|
+
.venv/
|
|
8
|
+
.mypy_cache/
|
|
9
|
+
.ruff_cache/
|
|
10
|
+
.pytest_cache/
|
|
11
|
+
.coverage
|
|
12
|
+
htmlcov/
|
|
13
|
+
|
|
14
|
+
# Secrets and per-installation state. A profile's baton.yaml is meant to be
|
|
15
|
+
# committed (to a *private* repo); the credentials beside it never are.
|
|
16
|
+
.env
|
|
17
|
+
*.env
|
|
18
|
+
!.env.example
|
|
19
|
+
secrets/
|
|
20
|
+
state/
|
|
21
|
+
data/
|
|
22
|
+
*.db
|
|
23
|
+
|
|
24
|
+
# Editor / OS
|
|
25
|
+
.DS_Store
|
|
26
|
+
*.swp
|
|
27
|
+
.idea/
|
|
28
|
+
.vscode/
|
|
29
|
+
|
|
30
|
+
# Never commit these: they are what made the original workspace impossible to
|
|
31
|
+
# open-source without a scrubbing pass.
|
|
32
|
+
*.bak
|
|
33
|
+
*.bak.*
|
|
34
|
+
*.orig
|
|
35
|
+
tmp/
|
|
36
|
+
|
|
37
|
+
# Sidecar lock files from the atomic-write layer. They are transient and
|
|
38
|
+
# occasionally survive a killed process; they must never be committed.
|
|
39
|
+
*.lock
|
|
40
|
+
|
|
41
|
+
# Local-only review workspace. This repo is public; the review notes track
|
|
42
|
+
# known defects before they are fixed and stay on the machine.
|
|
43
|
+
/review/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Studio Baton contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|