Metadata-Version: 2.5
Name: reproducible-science-ui
Version: 0.7.0
Summary: Experimental. A local web page over a project's Reproducible Science records: claims, files, runs, quotations and re-runs
Project-URL: Changelog, https://github.com/elliottower/reproducible-science/blob/main/CHANGELOG.md
Project-URL: Homepage, https://github.com/elliottower/reproducible-science
Project-URL: Issues, https://github.com/elliottower/reproducible-science/issues
Project-URL: Source, https://github.com/elliottower/reproducible-science/tree/main/packages/ui
Author-email: Elliot Tower <elliot@elliottower.ai>
License-Expression: MIT
Keywords: lineage,provenance,reproducibility,ui
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.11
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: reproducible-science<0.8,>=0.7
Description-Content-Type: text/markdown

# reproducible-science-ui

**Experimental.** The page's layout and options may change between releases.

A local web page over a project's [Reproducible Science](https://reproducible.science) records:
the claims a manuscript makes and whether each still holds, the files each claim reads, the runs
that wrote them, the quotations pinned from cited sources, and the rebuild steps with their
re-runs.

```sh
pip install "reproducible-science[ui]"
repro ui                 # in a folder holding repro.yaml; opens http://localhost:5190/
```

`repro ui` builds the page's data from what `repro verify`, `repro stale`, `prereg check` and
`results verify` report, and from the project's ledger, check history, record of re-runs,
manifest and manuscript, then serves it on localhost only.

| Tab | What it shows |
|---|---|
| Overview | the status of the plan, the ledger, the quotations, the claims and the re-runs |
| Prereg | what `prereg check` reports for each plan |
| Results | each run, the files it wrote, whether they still hold those bytes, the outside records linked to them, and the claims that read them |
| Citations | each source, its pinned quotations, the reading the paper takes of them, and the sentences that cite it, by section |
| Claims | every claim with its check history |
| Reproduce | each rebuild step, what changed since its last re-run, and every re-run |
| Graph | the files and runs behind each claim, as a lineage graph grouped automatically |

## What it writes

- The page re-reads the records by itself, which writes nothing to the project: when its tab
  comes back into view, and every 30 seconds while it is in view.
- **repro verify** checks every claim again, which adds one line to the project's local check
  history, kept inside `.git` and never committed. It asks first.
- **repro reproduce** runs the rebuild steps you choose with `repro reproduce`, which executes the
  commands `repro.yaml` declares and adds the re-run to `.repro/reproductions.jsonl`. It lists
  each command before anything runs, streams the output while it runs, and shows how long each
  step took. **Copy command** gives the same re-run as a line to paste into any terminal:
  `cd '<project>' && repro reproduce --only <step>`.
- **Copy prompt**, on a failing claim or on all of them in the Claims tab, puts a prompt on the
  clipboard to paste into Claude Code, Codex or any other agent. The prompt asks the agent to
  look into the failure and lay out the options, then to wait for you to choose; it never asks
  the agent to change anything. Copying writes nothing.

The page's own data and caches are kept inside the project's git directory
(`.git/repro/ui/`), or under `~/.cache/reproducible-science-ui/` for a project outside git.

## Options

```sh
repro ui [project] [--port 5190] [--offline] [--no-browser] [--groups groups.yaml]
```

`--offline` looks up no DOI: by default the publisher's landing page of each DOI a source names
is looked up once and cached, so the page can link to it. `--groups` takes a YAML list of
`{group, match}`, putting each file whose id matches the pattern into that group of the graph.

## Development

The page is a Vite project in `web/`. Its build goes into `src/repro_ui/static/`, which is not
in git; the build hook makes it with npm whenever a wheel or an sdist is built.

```sh
cd web && npm ci && npm run build       # or: npm run dev
```
