demolab-cli 2.2.1__tar.gz → 2.3.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.
Potentially problematic release.
This version of demolab-cli might be problematic. Click here for more details.
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/PKG-INFO +1 -1
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/CHANGELOG.md +8 -0
- demolab_cli-2.3.0/demolab_cli/VERSION +1 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/guides/RULES.md +9 -1
- demolab_cli-2.3.0/demolab_cli/scaffold/demo/artifacts/pdfs/ar027.pdf +0 -0
- demolab_cli-2.3.0/demolab_cli/scaffold/demo/writings/ar027.typ +77 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/demolab.yaml +5 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/test_engine_build.py +24 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/typ/entry.typ +2 -1
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/typ/lib.typ +11 -3
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/typ/main.typ +3 -2
- demolab_cli-2.2.1/demolab_cli/VERSION +0 -1
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/.gitattributes +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/.github/workflows/landing-preview.yml +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/.github/workflows/landing.yml +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/.github/workflows/publish.yml +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/.github/workflows/tests.yml +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/.gitignore +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/AGENTS.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/CLAUDE.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/DEVELOPING.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/LICENSE +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/README.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/AGENT.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/__init__.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/_paths.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/build.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/cli.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/deploy/deploy.yml +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/deploy/preview.yml +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/devserver.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/guides/AUTORESEARCH-RULES.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/guides/GLOSSARY.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/guides/HOUSESTYLE.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/guides/SLIDES.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/guides/STRUCTURE.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/guides/SUPPORT.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/overlay.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/runbooks/AUTORESEARCH.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/runbooks/DOCTOR.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/runbooks/EMBED-DOCS.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/runbooks/FROM-JUPYTER.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/runbooks/GETTING-STARTED.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/runbooks/LINT.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/runbooks/LITERATURE-SEARCH.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/runbooks/MIGRATE-CODE.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/runbooks/MIGRATE-STACK.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/runbooks/TOUR.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/runbooks/UPDATE.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/data/ar018/swe-bench.svg +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar004.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar005.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar010.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar011.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar012.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar013.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar014.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar015.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar016.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar017.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar018.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar019.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar020.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar021.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar022.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar023.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar024.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar025.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/ar026.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/pdfs/book.pdf +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/demolab.yaml +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/site/CNAME +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/site/landing.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar004.slide.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar005.slide.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar010.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar011.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar012.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar013.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar014.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar015.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar016.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar017.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar018.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar019.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar020.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar021.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar022.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar023.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar024.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar025.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/writings/ar026.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/root/AGENTS.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/root/CLAUDE.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/root/README.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/root/github/workflows/tests.yml +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/root/gitignore +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/root/pyproject.toml +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/.gitattributes +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/HOUSESTYLE.local.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/artifacts/data/.gitkeep +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/artifacts/pdfs/.gitkeep +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/experiments/helpers/__init__.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/experiments/helpers/provenance.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/experiments/helpers/style.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/experiments/helpers/test_provenance.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/tools/.gitkeep +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/writings/.gitkeep +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/starters/monte-carlo-pi/README.md +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/starters/monte-carlo-pi/exp000.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/starters/monte-carlo-pi/exp000.typ +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/slides.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/test_build_resilience.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/test_cli.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/test_command_catalog.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/test_devserver.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/test_init_and_staging.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/test_overlay.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/test_slide_catalog.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/test_slides.py +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/typ/cite-popover.js +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/typ/favicon.svg +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/typ/style.css +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/pyproject.toml +0 -0
- {demolab_cli-2.2.1 → demolab_cli-2.3.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: demolab-cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Lab notebook for computational science: Python tools produce per-run artifacts; Typst publishes them as a web bundle, per-entry PDFs, and a book.
|
|
5
5
|
Project-URL: Homepage, https://github.com/eoinmurray/demolab
|
|
6
6
|
Project-URL: Changelog, https://github.com/eoinmurray/demolab/blob/main/demolab_cli/CHANGELOG.md
|
|
@@ -13,6 +13,14 @@ the runbook shows the entries between your version and the latest.
|
|
|
13
13
|
|
|
14
14
|
## [Unreleased]
|
|
15
15
|
|
|
16
|
+
## [2.3.0] — 2026-08-07
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- **Optional collaborative inline annotations with Hypothesis.** Set `annotations: hypothesis`
|
|
20
|
+
lab-wide in `demolab.yaml` or `annotations: "hypothesis"` on one writing's `meta`; web readers
|
|
21
|
+
can highlight text and use Hypothesis threads and private groups, while PDFs remain unchanged.
|
|
22
|
+
The new `ar027` demo article documents the workflow and opts itself in as a live example.
|
|
23
|
+
|
|
16
24
|
## [2.2.1] — 2026-08-07
|
|
17
25
|
|
|
18
26
|
### Fixed
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.3.0
|
|
@@ -31,7 +31,7 @@ The concrete annotated file tree is in [`STRUCTURE.md`](STRUCTURE.md); this sect
|
|
|
31
31
|
|
|
32
32
|
**3.2 — Machine-managed staging** (gitignored, owned by the CLI — never hand-edit): `.demolab/` at the lab root holds the few engine files Typst must read from inside the lab tree (`lib.typ`, the web assets, a `VERSION` stamp); every build refreshes it when the installed engine version changes. `temp/bundle/` holds the staged bundle root (`main.typ`) plus build scratch. Local edits to either are overwritten without warning — a customisation that seems to need them is a missing config knob (see 3.3, or propose it upstream).
|
|
33
33
|
|
|
34
|
-
**3.3 — Your root overrides, optional** (root files the framework reads; never overwritten by updates): `demolab.yaml` (wordmark + PDF titles + collections — also the **lab marker**: the CLI finds the lab root by walking up to it, so don't delete it) and `HOUSESTYLE.local.md` (your house-style overrides, which extend or replace the default `HOUSESTYLE.md`; an agent reads it). Every key defaults ⇒ a minimal file is fine. The root stubs (`AGENTS.md`, `CLAUDE.md`, `README.md`, `pyproject.toml`, `.gitignore`, CI) are laid down once by `demolab init` and are yours from then on.
|
|
34
|
+
**3.3 — Your root overrides, optional** (root files the framework reads; never overwritten by updates): `demolab.yaml` (wordmark + PDF titles + collections + optional web annotations — also the **lab marker**: the CLI finds the lab root by walking up to it, so don't delete it) and `HOUSESTYLE.local.md` (your house-style overrides, which extend or replace the default `HOUSESTYLE.md`; an agent reads it). Every key defaults ⇒ a minimal file is fine. The root stubs (`AGENTS.md`, `CLAUDE.md`, `README.md`, `pyproject.toml`, `.gitignore`, CI) are laid down once by `demolab init` and are yours from then on.
|
|
35
35
|
|
|
36
36
|
**3.4 — User content** (100% the user's — freely deletable and replaceable): `tools/*`, `experiments/*` (runners, plus `playground.py` — the Streamlit demo, exempt from the contract), `writings/*` (`.typ` writeups), `artifacts/*` (`data/` per-run figures + `numbers.json`, `pdfs/` compiled PDFs; `artifacts/site/` is a gitignored build), `temp/*` (regenerable scratch).
|
|
37
37
|
|
|
@@ -118,6 +118,14 @@ Numbers must come from the run (§5.4) — never hand-type a literal that could
|
|
|
118
118
|
|
|
119
119
|
See `ar006` for a worked example — ten references with DOIs, inline cites throughout, and the reference list at the foot of the body.
|
|
120
120
|
|
|
121
|
+
**6.7 — Collaborative annotations are opt-in and web-only.** Set `annotations: hypothesis`
|
|
122
|
+
in root `demolab.yaml` to embed the hosted Hypothesis client on every article and experiment,
|
|
123
|
+
or put `annotations: "hypothesis"` in one writing's `meta` block to enable only that entry. An
|
|
124
|
+
entry-level `annotations: none` disables a lab-wide setting. The client is never emitted into PDFs.
|
|
125
|
+
Hypothesis owns annotation accounts, storage, private-group membership, anchoring, and threads;
|
|
126
|
+
collaborators must choose their private group before posting if the discussion is not public. See
|
|
127
|
+
demo article `ar027` for the complete setup and a live example.
|
|
128
|
+
|
|
121
129
|
## 7. Adding an experiment
|
|
122
130
|
|
|
123
131
|
**7.1 — Tool subcommand.** Add a subcommand (or reuse one) in the relevant `tools/<tool>/tool.py`. Pass a `manifest` to `write_output` declaring the headline metrics (and a video, for a rendering tool).
|
|
Binary file
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#let meta = (
|
|
2
|
+
title: "Discussing a writeup inline",
|
|
3
|
+
date: "2026-08-07",
|
|
4
|
+
description: "Optional Hypothesis annotations let collaborators highlight a passage in a web article or experiment and discuss it in a private, threaded margin conversation.",
|
|
5
|
+
collection: "documentation",
|
|
6
|
+
status: "final",
|
|
7
|
+
order: 17,
|
|
8
|
+
annotations: "hypothesis",
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
#let hypothesis = "https://web.hypothes.is"
|
|
12
|
+
|
|
13
|
+
#let body = [
|
|
14
|
+
A published result often needs a conversation before it needs another revision. Hypothesis adds
|
|
15
|
+
that conversation directly to a demolab web page: select a passage, attach a comment, and reply
|
|
16
|
+
in a shared thread. The annotation stays outside the scientific record, while the experiment,
|
|
17
|
+
figures, and PDF remain reproducible and unchanged.
|
|
18
|
+
|
|
19
|
+
This page is itself an example. Its `meta` block contains `annotations: "hypothesis"`, so the
|
|
20
|
+
Hypothesis control appears at the right edge of the web edition. Select this sentence and attach
|
|
21
|
+
a private note to test the complete path.
|
|
22
|
+
|
|
23
|
+
== Set up a private reading group
|
|
24
|
+
|
|
25
|
+
+ Create free Hypothesis accounts for each collaborator.
|
|
26
|
+
+ #link(hypothesis + "/help/how-to-create-a-private-group/")[Create a private group], then send
|
|
27
|
+
its invitation link to the people who should read and reply.
|
|
28
|
+
+ Open an annotated demolab page, sign in through the sidebar, and select that private group
|
|
29
|
+
before posting. The public layer is a different destination; check the group name on every
|
|
30
|
+
new top-level comment when the discussion must remain private.
|
|
31
|
+
|
|
32
|
+
Replies form a thread beneath the selected passage. Hypothesis also supports page notes for
|
|
33
|
+
comments about the whole experiment and LaTeX between double dollar signs for mathematical
|
|
34
|
+
discussion.
|
|
35
|
+
|
|
36
|
+
== Enable annotations
|
|
37
|
+
|
|
38
|
+
To annotate every article and experiment, add one field to the root `demolab.yaml`:
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
annotations: hypothesis
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
To enable only selected entries, omit the root field and add the provider to a writing's
|
|
45
|
+
metadata instead:
|
|
46
|
+
|
|
47
|
+
```typ
|
|
48
|
+
#let meta = (
|
|
49
|
+
title: "A result to review",
|
|
50
|
+
date: "2026-08-07",
|
|
51
|
+
annotations: "hypothesis",
|
|
52
|
+
)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Entry metadata wins over the lab setting. Set `annotations: none` on one entry to keep it
|
|
56
|
+
unannotated when the rest of the lab has Hypothesis enabled.
|
|
57
|
+
|
|
58
|
+
== What gets published
|
|
59
|
+
|
|
60
|
+
The setting adds the hosted Hypothesis client to web entry pages only. It does not add scripts
|
|
61
|
+
to the homepage, collection listings, standalone PDFs, or the combined book. Comments and group
|
|
62
|
+
membership live in Hypothesis rather than the git repository, so rebuilding the site does not
|
|
63
|
+
publish a private discussion or alter a recorded result.
|
|
64
|
+
|
|
65
|
+
An annotation targets the page URL and records several descriptions of the selected text. Small
|
|
66
|
+
layout changes and unrelated edits usually leave it attached. Moving the page to another URL,
|
|
67
|
+
deleting the selected passage, or substantially rewriting its context can orphan it. Keep entry
|
|
68
|
+
IDs stable and resolve important review comments before replacing the prose they target.
|
|
69
|
+
|
|
70
|
+
== Operational boundary
|
|
71
|
+
|
|
72
|
+
This option loads JavaScript from `hypothes.is` and sends annotation content to the Hypothesis
|
|
73
|
+
service. That is an intentional external dependency, not part of demolab's committed research
|
|
74
|
+
record. Do not enable it for material whose hosting or data policy forbids that service. Review
|
|
75
|
+
#link(hypothesis + "/privacy/")[Hypothesis privacy information] with your collaborators before
|
|
76
|
+
using it for sensitive or unpublished work.
|
|
77
|
+
]
|
|
@@ -14,6 +14,11 @@ description: A lab notebook for computational science — reproducible results,
|
|
|
14
14
|
# author: Your Name
|
|
15
15
|
# contact: you@example.com
|
|
16
16
|
|
|
17
|
+
# Optional collaborative inline comments on web articles and experiments. Readers select text
|
|
18
|
+
# and discuss it through Hypothesis accounts and groups; PDFs are unchanged. Set this lab-wide,
|
|
19
|
+
# or omit it here and add `annotations: "hypothesis"` to selected writings' `meta` blocks.
|
|
20
|
+
# annotations: hypothesis
|
|
21
|
+
|
|
17
22
|
# Optional custom landing page — not a config key: create a `landing.typ` at the repo root
|
|
18
23
|
# exporting `#let body = [...]` and the homepage renders it (web only) instead of the collection
|
|
19
24
|
# directory, below the title/tagline/byline above. Delete the file to get the directory back.
|
|
@@ -102,6 +102,30 @@ def test_demo_fixture_builds_full_site(tmp_path: Path) -> None:
|
|
|
102
102
|
assert '<ul class="coll-list"' in index, "collection directory visible in a user lab"
|
|
103
103
|
entry = (site / "ar018.html").read_text()
|
|
104
104
|
assert "<img" in entry or "<svg" in entry, "a figure made it into the entry page"
|
|
105
|
+
annotated = (site / "ar027.html").read_text()
|
|
106
|
+
assert 'src="https://hypothes.is/embed.js"' in annotated, "opted-in entry embeds Hypothesis"
|
|
107
|
+
assert 'src="https://hypothes.is/embed.js"' not in entry, "annotations remain opt-in"
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def test_lab_wide_hypothesis_annotations_only_touch_entries(tmp_path: Path) -> None:
|
|
111
|
+
root = tmp_path / "repo"
|
|
112
|
+
root.mkdir()
|
|
113
|
+
_assemble(root, demo=True)
|
|
114
|
+
with (root / "demolab.yaml").open("a", encoding="utf-8") as config:
|
|
115
|
+
config.write("\nannotations: hypothesis\n")
|
|
116
|
+
opted_out = root / "writings" / "ar018.typ"
|
|
117
|
+
opted_out.write_text(
|
|
118
|
+
opted_out.read_text(encoding="utf-8").replace("order: 1,", "order: 1,\n annotations: none,"),
|
|
119
|
+
encoding="utf-8",
|
|
120
|
+
)
|
|
121
|
+
_build(root)
|
|
122
|
+
|
|
123
|
+
site = root / "artifacts" / "site"
|
|
124
|
+
embed = 'src="https://hypothes.is/embed.js"'
|
|
125
|
+
assert embed in (site / "ar019.html").read_text(), "root config enables normal entries"
|
|
126
|
+
assert embed not in (site / "ar018.html").read_text(), "entry metadata can opt out"
|
|
127
|
+
assert embed not in (site / "index.html").read_text(), "homepage remains annotation-free"
|
|
128
|
+
assert embed not in (site / "documentation.html").read_text(), "listings remain annotation-free"
|
|
105
129
|
|
|
106
130
|
|
|
107
131
|
def test_curated_collection_lists_in_reading_order(tmp_path: Path) -> None:
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
#let has-brand = sys.inputs.at("has-brand", default: "false") == "true"
|
|
6
6
|
#let config = if has-brand { yaml("/demolab.yaml") } else { (:) }
|
|
7
7
|
#let brand = default-brand + config
|
|
8
|
+
#let annotations = config.at("annotations", default: none)
|
|
8
9
|
#import "/writings/" + entry-id + ".typ" as writing
|
|
9
10
|
|
|
10
11
|
#set document(title: writing.meta.title)
|
|
11
|
-
#numbered-pages(entry-page(writing.meta, writing.body, id: entry-id, brand: brand))
|
|
12
|
+
#numbered-pages(entry-page(writing.meta, writing.body, id: entry-id, brand: brand, annotations: annotations))
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// --- web-styles: inject the stylesheet + head meta into HTML pages (ignored in the PDF pass) ---
|
|
34
|
-
#let web-styles(brand: default-brand) = context {
|
|
34
|
+
#let web-styles(brand: default-brand, annotations: none) = context {
|
|
35
35
|
if target() == "html" {
|
|
36
36
|
html.elem("link", attrs: (rel: "icon", type: "image/svg+xml", href: "favicon.svg"))
|
|
37
37
|
html.elem("style", read("/.demolab/style.css"))
|
|
@@ -42,6 +42,11 @@
|
|
|
42
42
|
}
|
|
43
43
|
// hover popovers for inline citations (no-op on pages without cites)
|
|
44
44
|
html.elem("script", attrs: (src: "cite-popover.js", defer: ""))[]
|
|
45
|
+
// Optional collaborative web annotations. The hosted Hypothesis client owns accounts,
|
|
46
|
+
// private groups, storage, anchoring, and threads; demolab only opts this page into it.
|
|
47
|
+
if annotations == "hypothesis" {
|
|
48
|
+
html.elem("script", attrs: (src: "https://hypothes.is/embed.js", async: ""))[]
|
|
49
|
+
}
|
|
45
50
|
}
|
|
46
51
|
}
|
|
47
52
|
|
|
@@ -393,8 +398,11 @@
|
|
|
393
398
|
html.elem("p", attrs: (class: "page-foot"), html.elem("a", attrs: (href: "index.html"), [← back to all entries]))
|
|
394
399
|
}
|
|
395
400
|
|
|
396
|
-
#let entry-page(meta, body, id: none, brand: default-brand) = {
|
|
397
|
-
|
|
401
|
+
#let entry-page(meta, body, id: none, brand: default-brand, annotations: none) = {
|
|
402
|
+
// Entry metadata can override the lab-wide provider. `none` disables a global provider for
|
|
403
|
+
// one entry; absent metadata inherits the root demolab.yaml setting.
|
|
404
|
+
let annotation-provider = meta.at("annotations", default: annotations)
|
|
405
|
+
web-styles(brand: brand, annotations: annotation-provider)
|
|
398
406
|
set text(font: "New Computer Modern", size: 11pt)
|
|
399
407
|
// Restart figure numbering per entry: the whole bundle is one compile, so Typst's global
|
|
400
408
|
// figure counter would otherwise carry across every document. Each entry (its page + its
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
// read from it too. Absent ⇒ engine defaults + derivation-only collections.
|
|
25
25
|
#let config = if manifest.has_brand_config { yaml("/demolab.yaml") } else { (:) }
|
|
26
26
|
#let brand = default-brand + config
|
|
27
|
+
#let annotations = config.at("annotations", default: none)
|
|
27
28
|
#let collection-order = config.at("collection-order", default: ())
|
|
28
29
|
#let collection-meta = config.at("collections", default: (:))
|
|
29
30
|
|
|
@@ -79,8 +80,8 @@
|
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
82
|
#for e in entries {
|
|
82
|
-
[#document(e.id + ".html", title: [#e.meta.title])[#entry-page(e.meta, e.body, id: e.id, brand: brand)]]
|
|
83
|
-
[#document("pdfs/" + e.id + ".pdf", title: [#e.meta.title])[#numbered-pages(entry-page(e.meta, e.body, id: e.id, brand: brand))]]
|
|
83
|
+
[#document(e.id + ".html", title: [#e.meta.title])[#entry-page(e.meta, e.body, id: e.id, brand: brand, annotations: annotations)]]
|
|
84
|
+
[#document("pdfs/" + e.id + ".pdf", title: [#e.meta.title])[#numbered-pages(entry-page(e.meta, e.body, id: e.id, brand: brand, annotations: annotations))]]
|
|
84
85
|
}
|
|
85
86
|
// stub pages for entries that failed to build — a visible "this page failed" placeholder at the
|
|
86
87
|
// entry's own URL (web only; excluded from listings + the book), so the rest of the site is fine.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.2.1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/demo/artifacts/data/ar018/swe-bench.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/root/github/workflows/tests.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/artifacts/data/.gitkeep
RENAMED
|
File without changes
|
{demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/artifacts/pdfs/.gitkeep
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/skeleton/experiments/helpers/style.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/starters/monte-carlo-pi/README.md
RENAMED
|
File without changes
|
{demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/starters/monte-carlo-pi/exp000.py
RENAMED
|
File without changes
|
{demolab_cli-2.2.1 → demolab_cli-2.3.0}/demolab_cli/scaffold/starters/monte-carlo-pi/exp000.typ
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|