marimo-book 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.
- marimo_book-0.1.0/.github/release-drafter.yml +64 -0
- marimo_book-0.1.0/.github/social-preview.png +0 -0
- marimo_book-0.1.0/.github/workflows/ci.yml +94 -0
- marimo_book-0.1.0/.github/workflows/docs.yml +52 -0
- marimo_book-0.1.0/.github/workflows/publish.yml +53 -0
- marimo_book-0.1.0/.github/workflows/release-drafter.yml +22 -0
- marimo_book-0.1.0/.gitignore +59 -0
- marimo_book-0.1.0/CHANGELOG.md +414 -0
- marimo_book-0.1.0/CLAUDE.md +148 -0
- marimo_book-0.1.0/LICENSE +21 -0
- marimo_book-0.1.0/PKG-INFO +292 -0
- marimo_book-0.1.0/PUBLISHING.md +132 -0
- marimo_book-0.1.0/README.md +240 -0
- marimo_book-0.1.0/docs/book.yml +85 -0
- marimo_book-0.1.0/docs/content/authoring.md +268 -0
- marimo_book-0.1.0/docs/content/book_yml.md +186 -0
- marimo_book-0.1.0/docs/content/building.md +419 -0
- marimo_book-0.1.0/docs/content/dependencies.md +108 -0
- marimo_book-0.1.0/docs/content/deploying.md +78 -0
- marimo_book-0.1.0/docs/content/example.py +95 -0
- marimo_book-0.1.0/docs/content/index.md +77 -0
- marimo_book-0.1.0/docs/content/inspiration.md +103 -0
- marimo_book-0.1.0/docs/content/link_checks.md +81 -0
- marimo_book-0.1.0/docs/content/precompute_demo.py +89 -0
- marimo_book-0.1.0/docs/content/quickstart.md +77 -0
- marimo_book-0.1.0/docs/content/roadmap.md +172 -0
- marimo_book-0.1.0/docs/content/wasm_demo.py +71 -0
- marimo_book-0.1.0/docs/content/widgets.md +104 -0
- marimo_book-0.1.0/pyproject.toml +136 -0
- marimo_book-0.1.0/src/marimo_book/__init__.py +11 -0
- marimo_book-0.1.0/src/marimo_book/_version.py +24 -0
- marimo_book-0.1.0/src/marimo_book/assets/extra.css +427 -0
- marimo_book-0.1.0/src/marimo_book/assets/marimo_book.js +358 -0
- marimo_book-0.1.0/src/marimo_book/assets/mathjax.js +19 -0
- marimo_book-0.1.0/src/marimo_book/assets/scaffold/.github/workflows/deploy.yml +51 -0
- marimo_book-0.1.0/src/marimo_book/assets/scaffold/.gitignore +20 -0
- marimo_book-0.1.0/src/marimo_book/assets/scaffold/README.md +28 -0
- marimo_book-0.1.0/src/marimo_book/assets/scaffold/book.yml +47 -0
- marimo_book-0.1.0/src/marimo_book/assets/scaffold/content/example.py +54 -0
- marimo_book-0.1.0/src/marimo_book/assets/scaffold/content/intro.md +32 -0
- marimo_book-0.1.0/src/marimo_book/cli.py +417 -0
- marimo_book-0.1.0/src/marimo_book/config.py +378 -0
- marimo_book-0.1.0/src/marimo_book/launch_buttons.py +121 -0
- marimo_book-0.1.0/src/marimo_book/preprocessor.py +612 -0
- marimo_book-0.1.0/src/marimo_book/shell.py +275 -0
- marimo_book-0.1.0/src/marimo_book/transforms/__init__.py +7 -0
- marimo_book-0.1.0/src/marimo_book/transforms/anywidgets.py +257 -0
- marimo_book-0.1.0/src/marimo_book/transforms/callouts.py +106 -0
- marimo_book-0.1.0/src/marimo_book/transforms/link_rewrites.py +96 -0
- marimo_book-0.1.0/src/marimo_book/transforms/marimo_export.py +381 -0
- marimo_book-0.1.0/src/marimo_book/transforms/precompute.py +910 -0
- marimo_book-0.1.0/src/marimo_book/transforms/wasm.py +56 -0
- marimo_book-0.1.0/src/marimo_book/watcher.py +235 -0
- marimo_book-0.1.0/tests/__init__.py +0 -0
- marimo_book-0.1.0/tests/fixtures/simple_notebook.py +43 -0
- marimo_book-0.1.0/tests/phase0_spike/README.md +36 -0
- marimo_book-0.1.0/tests/phase0_spike/RESULTS.md +51 -0
- marimo_book-0.1.0/tests/phase0_spike/SYNTAX_INVENTORY.md +69 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/index.md +23 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/javascripts/mathjax.js +19 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/many/page01.md +7 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/many/page02.md +7 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/many/page03.md +7 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/many/page04.md +7 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/many/page05.md +7 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/many/page06.md +7 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/many/page07.md +7 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/many/page08.md +7 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/many/page09.md +7 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/many/page10.md +7 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/plotly.md +30 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/prose.md +66 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/stylesheets/extra.css +20 -0
- marimo_book-0.1.0/tests/phase0_spike/docs/widget.md +42 -0
- marimo_book-0.1.0/tests/phase0_spike/mkdocs.yml +90 -0
- marimo_book-0.1.0/tests/test_cli_commands.py +113 -0
- marimo_book-0.1.0/tests/test_config.py +117 -0
- marimo_book-0.1.0/tests/test_dependencies.py +91 -0
- marimo_book-0.1.0/tests/test_link_rewrites.py +85 -0
- marimo_book-0.1.0/tests/test_precompute.py +584 -0
- marimo_book-0.1.0/tests/test_preprocessor.py +239 -0
- marimo_book-0.1.0/tests/test_transforms.py +96 -0
- marimo_book-0.1.0/tests/test_wasm.py +109 -0
- marimo_book-0.1.0/tests/test_watcher.py +202 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# release-drafter config — https://github.com/release-drafter/release-drafter
|
|
2
|
+
#
|
|
3
|
+
# Maintains a single draft Release on github.com/<repo>/releases that gets
|
|
4
|
+
# updated whenever a PR merges to main. The draft accumulates entries
|
|
5
|
+
# categorised by PR label; when you cut a release you tag the commit and
|
|
6
|
+
# the draft auto-publishes against that tag.
|
|
7
|
+
|
|
8
|
+
name-template: "v$RESOLVED_VERSION"
|
|
9
|
+
tag-template: "v$RESOLVED_VERSION"
|
|
10
|
+
|
|
11
|
+
categories:
|
|
12
|
+
- title: "Added"
|
|
13
|
+
labels:
|
|
14
|
+
- "enhancement"
|
|
15
|
+
- "feature"
|
|
16
|
+
- title: "Changed"
|
|
17
|
+
labels:
|
|
18
|
+
- "change"
|
|
19
|
+
- "refactor"
|
|
20
|
+
- "performance"
|
|
21
|
+
- title: "Fixed"
|
|
22
|
+
labels:
|
|
23
|
+
- "bug"
|
|
24
|
+
- "fix"
|
|
25
|
+
- title: "Removed"
|
|
26
|
+
labels:
|
|
27
|
+
- "removal"
|
|
28
|
+
- "breaking"
|
|
29
|
+
- title: "Documentation"
|
|
30
|
+
labels:
|
|
31
|
+
- "documentation"
|
|
32
|
+
- "docs"
|
|
33
|
+
- title: "Build & CI"
|
|
34
|
+
labels:
|
|
35
|
+
- "ci"
|
|
36
|
+
- "build"
|
|
37
|
+
- "dependencies"
|
|
38
|
+
|
|
39
|
+
change-template: "- $TITLE (#$NUMBER) @$AUTHOR"
|
|
40
|
+
change-title-escapes: '\<*_&'
|
|
41
|
+
|
|
42
|
+
# Resolve next version from labels: `breaking` → minor bump (we're 0.x),
|
|
43
|
+
# `feature` → patch, anything else → patch. Tweak when we hit 1.0.
|
|
44
|
+
version-resolver:
|
|
45
|
+
major:
|
|
46
|
+
labels: ["major"]
|
|
47
|
+
minor:
|
|
48
|
+
labels: ["breaking", "feature", "enhancement"]
|
|
49
|
+
patch:
|
|
50
|
+
labels: ["bug", "fix", "documentation", "ci", "build"]
|
|
51
|
+
default: patch
|
|
52
|
+
|
|
53
|
+
# Filter out merge commits and dependabot noise from auto-categorisation.
|
|
54
|
+
exclude-labels:
|
|
55
|
+
- "skip-changelog"
|
|
56
|
+
exclude-contributors:
|
|
57
|
+
- "dependabot"
|
|
58
|
+
|
|
59
|
+
template: |
|
|
60
|
+
## What's changed
|
|
61
|
+
|
|
62
|
+
$CHANGES
|
|
63
|
+
|
|
64
|
+
**Full diff:** https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
|
|
Binary file
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ci-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
- name: Install
|
|
27
|
+
run: |
|
|
28
|
+
python -m pip install --upgrade pip
|
|
29
|
+
pip install -e '.[dev]'
|
|
30
|
+
- name: Lint
|
|
31
|
+
run: ruff check src/ tests/
|
|
32
|
+
- name: Format check
|
|
33
|
+
run: ruff format --check src/ tests/
|
|
34
|
+
- name: Test
|
|
35
|
+
run: pytest -q
|
|
36
|
+
|
|
37
|
+
build:
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
needs: test
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
- name: Set up Python
|
|
43
|
+
uses: actions/setup-python@v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: "3.13"
|
|
46
|
+
- name: Install build backend
|
|
47
|
+
run: python -m pip install build
|
|
48
|
+
- name: Build sdist + wheel
|
|
49
|
+
run: python -m build
|
|
50
|
+
- name: Verify wheel contents
|
|
51
|
+
run: |
|
|
52
|
+
python -c "
|
|
53
|
+
import zipfile, pathlib
|
|
54
|
+
wheel = next(pathlib.Path('dist').glob('marimo_book-*.whl'))
|
|
55
|
+
with zipfile.ZipFile(wheel) as z:
|
|
56
|
+
names = z.namelist()
|
|
57
|
+
required = [
|
|
58
|
+
'marimo_book/cli.py',
|
|
59
|
+
'marimo_book/preprocessor.py',
|
|
60
|
+
'marimo_book/assets/marimo_book.js',
|
|
61
|
+
'marimo_book/assets/scaffold/book.yml',
|
|
62
|
+
'marimo_book/assets/scaffold/.gitignore',
|
|
63
|
+
'marimo_book/assets/scaffold/.github/workflows/deploy.yml',
|
|
64
|
+
]
|
|
65
|
+
missing = [f for f in required if f not in names]
|
|
66
|
+
if missing:
|
|
67
|
+
raise SystemExit(f'wheel missing files: {missing}')
|
|
68
|
+
print(f'wheel OK ({len(names)} entries)')
|
|
69
|
+
"
|
|
70
|
+
- uses: actions/upload-artifact@v4
|
|
71
|
+
with:
|
|
72
|
+
name: dist-${{ github.sha }}
|
|
73
|
+
path: dist/
|
|
74
|
+
retention-days: 7
|
|
75
|
+
|
|
76
|
+
docs:
|
|
77
|
+
# Validates that the self-hosted docs book still builds — catches
|
|
78
|
+
# regressions before they land on main. The real deploy happens in
|
|
79
|
+
# docs.yml on push to main.
|
|
80
|
+
runs-on: ubuntu-latest
|
|
81
|
+
needs: test
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/checkout@v4
|
|
84
|
+
- uses: actions/setup-python@v5
|
|
85
|
+
with:
|
|
86
|
+
python-version: "3.13"
|
|
87
|
+
- name: Install system deps for social-card generation
|
|
88
|
+
run: sudo apt-get update -y && sudo apt-get install -y libcairo2 libpango-1.0-0 libpangocairo-1.0-0
|
|
89
|
+
- name: Install marimo-book with linkcheck + social + autorefs + pdf extras
|
|
90
|
+
run: |
|
|
91
|
+
python -m pip install --upgrade pip
|
|
92
|
+
pip install -e '.[linkcheck,social,autorefs,pdf]'
|
|
93
|
+
- name: Build docs --strict (also exercises social-card generation)
|
|
94
|
+
run: marimo-book build -b docs/book.yml --strict
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Build and deploy docs
|
|
2
|
+
|
|
3
|
+
# Self-host marimo-book's own docs (built with marimo-book) on GitHub
|
|
4
|
+
# Pages. Triggered on pushes to main that touch the docs tree or the
|
|
5
|
+
# package source (so tool changes also re-render the docs immediately).
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [main]
|
|
10
|
+
paths:
|
|
11
|
+
- "docs/**"
|
|
12
|
+
- "src/**"
|
|
13
|
+
- "pyproject.toml"
|
|
14
|
+
- ".github/workflows/docs.yml"
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
pages: write
|
|
20
|
+
id-token: write
|
|
21
|
+
|
|
22
|
+
concurrency:
|
|
23
|
+
group: docs-pages
|
|
24
|
+
cancel-in-progress: true
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
build:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
- uses: actions/setup-python@v5
|
|
32
|
+
with:
|
|
33
|
+
python-version: "3.13"
|
|
34
|
+
- name: Install system deps for social-card generation
|
|
35
|
+
run: sudo apt-get update -y && sudo apt-get install -y libcairo2 libpango-1.0-0 libpangocairo-1.0-0
|
|
36
|
+
- name: Install marimo-book + extras for docs build
|
|
37
|
+
run: pip install -e '.[linkcheck,social,autorefs,pdf]'
|
|
38
|
+
- name: Build docs
|
|
39
|
+
run: marimo-book build -b docs/book.yml --strict
|
|
40
|
+
- uses: actions/upload-pages-artifact@v3
|
|
41
|
+
with:
|
|
42
|
+
path: docs/_site
|
|
43
|
+
|
|
44
|
+
deploy:
|
|
45
|
+
needs: build
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
environment:
|
|
48
|
+
name: github-pages
|
|
49
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
50
|
+
steps:
|
|
51
|
+
- id: deployment
|
|
52
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Publishes on any tag matching v*.
|
|
4
|
+
# Uses PyPI's Trusted Publisher setup (OIDC — no API token needed) — you
|
|
5
|
+
# must first register this repo + workflow on PyPI:
|
|
6
|
+
# https://docs.pypi.org/trusted-publishers/
|
|
7
|
+
#
|
|
8
|
+
# Project name on PyPI: marimo-book
|
|
9
|
+
# Owner / repo: ljchang/marimo-book
|
|
10
|
+
# Workflow name: publish.yml
|
|
11
|
+
# Environment name: pypi-publish
|
|
12
|
+
|
|
13
|
+
on:
|
|
14
|
+
push:
|
|
15
|
+
tags: ["v*"]
|
|
16
|
+
workflow_dispatch:
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
id-token: write # required for PyPI Trusted Publisher
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
build:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.13"
|
|
31
|
+
- name: Build sdist + wheel
|
|
32
|
+
run: |
|
|
33
|
+
python -m pip install build
|
|
34
|
+
python -m build
|
|
35
|
+
- uses: actions/upload-artifact@v4
|
|
36
|
+
with:
|
|
37
|
+
name: dist
|
|
38
|
+
path: dist/
|
|
39
|
+
|
|
40
|
+
publish:
|
|
41
|
+
needs: build
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
environment:
|
|
44
|
+
name: pypi-publish
|
|
45
|
+
url: https://pypi.org/p/marimo-book
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/download-artifact@v4
|
|
48
|
+
with:
|
|
49
|
+
name: dist
|
|
50
|
+
path: dist/
|
|
51
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
52
|
+
# No `with:` block needed — trusted publishing pulls creds from
|
|
53
|
+
# PyPI's OIDC handshake with GitHub.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Release Drafter
|
|
2
|
+
|
|
3
|
+
# Updates the draft GitHub Release whenever a PR merges to main. The
|
|
4
|
+
# draft accumulates entries grouped by PR label; the draft is published
|
|
5
|
+
# (auto-tagging the commit) when you click "Publish release" on github.com.
|
|
6
|
+
# The published `v*` tag then triggers publish.yml → PyPI.
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches: [main]
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write # required to draft releases
|
|
14
|
+
pull-requests: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
update_release_draft:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: release-drafter/release-drafter@v6
|
|
21
|
+
env:
|
|
22
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# Distribution / packaging
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
*.egg-info/
|
|
10
|
+
.eggs/
|
|
11
|
+
wheels/
|
|
12
|
+
|
|
13
|
+
# Virtual environments
|
|
14
|
+
.venv/
|
|
15
|
+
venv/
|
|
16
|
+
env/
|
|
17
|
+
.env
|
|
18
|
+
|
|
19
|
+
# Testing / coverage
|
|
20
|
+
.pytest_cache/
|
|
21
|
+
.coverage
|
|
22
|
+
.coverage.*
|
|
23
|
+
htmlcov/
|
|
24
|
+
.tox/
|
|
25
|
+
.nox/
|
|
26
|
+
|
|
27
|
+
# Type checkers
|
|
28
|
+
.mypy_cache/
|
|
29
|
+
.pyre/
|
|
30
|
+
.pytype/
|
|
31
|
+
.ruff_cache/
|
|
32
|
+
|
|
33
|
+
# marimo-book build artifacts
|
|
34
|
+
_site/
|
|
35
|
+
_site_src/
|
|
36
|
+
.marimo_book_cache/
|
|
37
|
+
|
|
38
|
+
# Editors
|
|
39
|
+
.vscode/
|
|
40
|
+
.idea/
|
|
41
|
+
*.swp
|
|
42
|
+
*.swo
|
|
43
|
+
.DS_Store
|
|
44
|
+
|
|
45
|
+
# uv
|
|
46
|
+
uv.lock
|
|
47
|
+
.python-version
|
|
48
|
+
__marimo__/
|
|
49
|
+
|
|
50
|
+
# hatch-vcs build hook output — version materialised at build time
|
|
51
|
+
src/marimo_book/_version.py
|
|
52
|
+
|
|
53
|
+
# Browser-automation artifacts (Playwright MCP screenshots, snapshots)
|
|
54
|
+
.playwright-mcp/
|
|
55
|
+
# Stray screenshots at repo root only — leading slash anchors to root,
|
|
56
|
+
# so legit assets under .github/, docs/, src/, etc. are unaffected.
|
|
57
|
+
/*.png
|
|
58
|
+
/*.jpg
|
|
59
|
+
/*.jpeg
|