From 3f2b0106dabfb60c806e607a372e67bbf0696381 Mon Sep 17 00:00:00 2001 From: Florent Pollet Date: Sun, 8 Nov 2026 15:30:10 -0500 Subject: [PATCH 1/2] Move ecosystem documentation to core and redirect the former site --- .github/workflows/ci.yml | 9 +- .github/workflows/docs.yml | 12 +- .github/workflows/publish.yml | 12 +- .gitignore | 3 + README.md | 267 +-------------- RELEASING.md | 14 +- TESTING.md | 38 +-- docs/assets/prompt-builder.css | 19 -- docs/assets/prompt-builder.js | 173 ---------- docs/concepts.md | 207 ----------- docs/core-package.md | 25 -- docs/examples/manual-supervised.sh | 216 ------------ docs/faq.md | 88 ----- docs/hooks.py | 40 --- docs/index.md | 75 ---- docs/manual-example.md | 177 ---------- docs/migration-v4.md | 103 ------ docs/profiles.md | 67 ---- docs/prompt-builder.md | 88 ----- docs/publishing-algorithms.md | 13 - docs/reference/api.md | 44 --- docs/reference/architecture.md | 3 - docs/reference/manifest.md | 19 -- docs/reference/spec.md | 6 - docs/reference/tests.md | 3 - docs/releasing.md | 4 - docs/running.md | 130 ------- docs/shared-package-assessment.md | 42 --- docs/testing.md | 10 - docs/workflow.md | 146 -------- docs/zero-shot.md | 202 ----------- mkdocs.yml | 93 ----- package-lock.json | 532 ----------------------------- package.json | 13 - pyproject.toml | 4 +- redirects/index.html | 20 ++ redirects/paths.json | 26 ++ scripts/build_docs_redirects.py | 25 ++ template/README.md.jinja | 2 +- template/docs/TESTING.md | 2 +- tests/prompt_builder.test.cjs | 189 ---------- tests/test_docs.py | 55 --- tests/test_render.py | 8 +- uv.lock | 410 ---------------------- 44 files changed, 124 insertions(+), 3510 deletions(-) delete mode 100644 docs/assets/prompt-builder.css delete mode 100644 docs/assets/prompt-builder.js delete mode 100644 docs/concepts.md delete mode 100644 docs/core-package.md delete mode 100644 docs/examples/manual-supervised.sh delete mode 100644 docs/faq.md delete mode 100644 docs/hooks.py delete mode 100644 docs/index.md delete mode 100644 docs/manual-example.md delete mode 100644 docs/migration-v4.md delete mode 100644 docs/profiles.md delete mode 100644 docs/prompt-builder.md delete mode 100644 docs/publishing-algorithms.md delete mode 100644 docs/reference/api.md delete mode 100644 docs/reference/architecture.md delete mode 100644 docs/reference/manifest.md delete mode 100644 docs/reference/spec.md delete mode 100644 docs/reference/tests.md delete mode 100644 docs/releasing.md delete mode 100644 docs/running.md delete mode 100644 docs/shared-package-assessment.md delete mode 100644 docs/testing.md delete mode 100644 docs/workflow.md delete mode 100644 docs/zero-shot.md delete mode 100644 mkdocs.yml delete mode 100644 package-lock.json delete mode 100644 package.json create mode 100644 redirects/index.html create mode 100644 redirects/paths.json create mode 100644 scripts/build_docs_redirects.py delete mode 100644 tests/prompt_builder.test.cjs delete mode 100644 tests/test_docs.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 918d818..d8aacdc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,13 +12,8 @@ jobs: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v6 - run: uv sync --group dev - - run: uv run ruff check src tests scripts docs/hooks.py - - run: uv run ruff format --check src tests scripts docs/hooks.py - - uses: actions/setup-node@v4 - with: - node-version: "24" - - run: npm ci --ignore-scripts - - run: npm test + - run: uv run ruff check src tests scripts + - run: uv run ruff format --check src tests scripts - run: uv run pytest -q - run: uv build - run: uvx --from 'twine>=6' twine check --strict dist/* diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 21dd163..6ddb9bf 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,7 +1,7 @@ -name: Docs +name: Documentation redirects -# Builds the documentation site on every pull request (strict: warnings fail the build) and publishes it to -# GitHub Pages on pushes to main. Publishing requires Pages to be enabled with "GitHub Actions" as source. +# The full site is maintained in meds-algorithm and hosted on Read the Docs. +# Keep Pages enabled to redirect existing bookmarks, including page fragments. on: pull_request: @@ -16,13 +16,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v6 - - run: uv sync --group docs - - run: uv run --group docs mkdocs build --strict + - run: python scripts/build_docs_redirects.py - if: github.event_name == 'push' uses: actions/upload-pages-artifact@v3 with: - path: site + path: site-redirects deploy: if: github.event_name == 'push' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2411b75..46b69ea 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -38,16 +38,10 @@ jobs: PY git merge-base --is-ancestor HEAD origin/main - run: python scripts/check_release.py - - run: uv sync --locked --group dev --group docs - - run: uv run ruff check src tests scripts docs/hooks.py - - run: uv run ruff format --check src tests scripts docs/hooks.py - - uses: actions/setup-node@v4 - with: - node-version: "24" - - run: npm ci --ignore-scripts - - run: npm test + - run: uv sync --locked --group dev + - run: uv run ruff check src tests scripts + - run: uv run ruff format --check src tests scripts - run: uv run pytest -q - - run: uv run mkdocs build --strict - run: uv build - run: uvx --from 'twine>=6' twine check --strict dist/* - name: Verify the installed generator diff --git a/.gitignore b/.gitignore index a0cb3ae..a96314b 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,6 @@ site/ # Documentation JavaScript tests node_modules/ + +site-redirects/ +.cache/ diff --git a/README.md b/README.md index 52bbcbc..531d936 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Python 3.11+](https://img.shields.io/badge/Python-3.11%2B-blue?logo=python&logoColor=white)](https://www.python.org/downloads/) [![PyPI](https://img.shields.io/pypi/v/meds-algorithm-template)](https://pypi.org/project/meds-algorithm-template/) [![Tests and code quality](https://github.com/McDermottHealthAI/MEDS_algorithm_template/actions/workflows/ci.yml/badge.svg)](https://github.com/McDermottHealthAI/MEDS_algorithm_template/actions/workflows/ci.yml) -[![Documentation](https://github.com/McDermottHealthAI/MEDS_algorithm_template/actions/workflows/docs.yml/badge.svg)](https://McDermottHealthAI.github.io/MEDS_algorithm_template/) +[![Documentation](https://readthedocs.org/projects/meds-algorithm/badge/?version=latest)](https://meds-algorithm.readthedocs.io/en/latest/) [![Contributors](https://img.shields.io/github/contributors/McDermottHealthAI/MEDS_algorithm_template)](https://github.com/McDermottHealthAI/MEDS_algorithm_template/graphs/contributors) [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen)](https://github.com/McDermottHealthAI/MEDS_algorithm_template/pulls) [![License: MIT](https://img.shields.io/badge/License-MIT-green)](https://github.com/McDermottHealthAI/MEDS_algorithm_template/blob/main/LICENSE) @@ -23,17 +23,13 @@ the generated repository. ## Documentation -For setup and every command in execution order, see the [fully manual example](https://github.com/McDermottHealthAI/MEDS_algorithm_template/blob/main/docs/manual-example.md). +For setup and every command in execution order, see the [fully manual example](https://meds-algorithm.readthedocs.io/en/latest/manual-example/). It includes a complete tutorial implementation and synthetic data, so it runs without an agent or cluster. -This README is written for coding agents that port algorithms. For a human-oriented explanation of the -contract (concepts, choosing a profile, zero-shot algorithms, the gate workflow, running, and reference), read -the documentation site: https://McDermottHealthAI.github.io/MEDS_algorithm_template/ (built from `docs/` by -`.github/workflows/docs.yml`). Preview it locally with: - -```bash -uv run --group docs mkdocs serve -``` +The [unified documentation](https://meds-algorithm.readthedocs.io/en/latest/) is maintained and built in +[`meds-algorithm`](https://github.com/McDermottHealthAI/meds-algorithm). It includes concepts, profiles, +implementation workflow, running, publishing and API references. This repository retains template-specific +contributor instructions and the documents rendered into generated algorithm repositories. ## Render a repository @@ -113,7 +109,7 @@ The two zero-shot profiles also receive the task itself: an ACES criteria file p `relaxations.yaml` ledger stating how the answered task differs from the requested one. They differ in how the algorithm answers. `zero_shot_direct` algorithms answer task-derived queries directly (MOTOR, EveryQuery), recommended as an `aces-to-` adapter on aces-relaxations. `zero_shot_materialized` algorithms generate -futures in a task-independent `infer_trajectories`, and `predict_zero_shot_materialized` evaluates the task on them. See [Zero-shot in practice](https://github.com/McDermottHealthAI/MEDS_algorithm_template/blob/main/docs/zero-shot.md) for the design, algorithm examples, and the MEDS-DEV +futures in a task-independent `infer_trajectories`, and `predict_zero_shot_materialized` evaluates the task on them. See [Zero-shot in practice](https://meds-algorithm.readthedocs.io/en/latest/zero-shot/) for the design, algorithm examples, and the MEDS-DEV passthrough this needs. ## Work in the generated repository @@ -138,243 +134,10 @@ end-to-end tests report explicit `algorithm_stub` skips. Start with these render A completed implementation removes each profile from `STUB_PROFILES` only after that profile works. - -## Copyable algorithm-implementation prompt - -Use the [interactive prompt builder](https://McDermottHealthAI.github.io/MEDS_algorithm_template/prompt-builder/) -or fill in the fields below. The agent inspects sources and selects profiles before generating a new -local or GitHub repository. The builder runs locally in your browser; it does not launch an agent. -The provided `real_data` test remains the MIMIC-IV demo smoke test, independent of supplied evaluation tasks. - -The prompt adapts [Ponytail's implementation principles](https://github.com/DietrichGebert/ponytail/blob/main/skills/ponytail/SKILL.md) -to scientific algorithm development. It works with Claude and other coding agents without installing a plugin. - -```text -Implement a MEDS algorithm from the following inputs. - -Paper(s), supplementary material and versions: - - -Code/repository source(s), revisions, configurations and checkpoints: - - -Destination (a NEW local repository or a NEW GitHub repository, including visibility): - - -Local working directory for the new repository: - - -Profile selection (automatic, or an explicit list of one or more profiles): - - -Dataset context (name, revision and MEDS path, if available): - - -Already prepared evaluation tasks (labels location, task-config location, bundle revision and -optional task subset; or explicitly not supplied): - - -Work scope (implementation/local tests, also MEDS-DEV integration, or preparation for full evaluation): - - -Scientific ambiguity mode (confirmation required by default; exploratory only if explicitly enabled): - - -Additional implementation constraints: - - -Inspect the supplied sources before generating the repository. If both paper and code are provided, -compare them, record discrepancies and identify which behavior is implemented; do not silently assume -one always overrides the other. If only a paper is provided, distinguish source-backed choices from -necessary assumptions. If only code is provided, inspect its revision, configuration and checkpoint -requirements; do not claim fidelity to an unavailable paper. - -Resolve scientific ambiguities before implementing the affected behavior. Check the paper, supplements, -official code and available configurations first; record sources and material conflicts. Ask whether two -reasonable interpretations could produce materially different algorithms or change what evaluation measures. -A missing learning rate or batch size can usually use a plausible, configurable default with its rationale -recorded, unless that choice is central to the scientific claim. Missing feature construction, temporal -aggregation, architecture components or training objectives are material ambiguities, not routine defaults. - -In confirmation-required mode (also the default if no mode is supplied), pause dependent implementation -and request confirmation for a material unresolved ambiguity. Explain what is missing, the evidence -consulted, plausible interpretations and their consequences; recommend an option when justified. Continue -independent work while waiting. An earlier explicit decision covering the same choice is sufficient unless -new evidence or a scope change invalidates it; silence is not confirmation. - -Only when exploratory mode is explicitly enabled may you implement provisional interpretations of material -algorithm-design ambiguities without first obtaining a decision. Record each as provisional before using -it, expose the choice in configuration where appropriate, and label affected code, tests and results as an -exploratory adaptation. Require review of these decisions before claiming faithful reproduction. Do not -present an assumption as source-backed behavior or silently substitute a familiar method for a missing one. - -In BOTH modes, ambiguities about leakage, permitted label access, cohort/target definitions or evaluation -validity remain blocking for dependent work until explicitly resolved. Exploratory mode does not authorize -changing supplied tasks, weakening acceptance tests, accessing data or running demo/full-data/cluster jobs -without the existing approvals. Record the mode, routine defaults, unresolved questions, provisional choices -and explicit decisions in IMPLEMENTATION_REPORT.md under "Scientific assumptions and decisions"; update the -existing report rather than creating another specification file. - -For automatic profile selection, choose one or more profiles supported by documented source behavior: -supervised, finetune, probe, zero_shot_direct, zero_shot_materialized or predict_only. Record evidence for -each choice and proceed when the evidence is clear. Do not add speculative capabilities merely because -a profile exists. For an explicit list, implement that scope; report material incompatibilities before -implementing unsupported behavior, and do not silently replace or expand it. Shared methods may be -implemented once through multiple profile inheritance when their semantics match, or through separate -classes with shared components. Each selected profile gets its own MEDS-DEV YAML and acceptance tests. - -Generate the new repository with the MEDS algorithm template at -https://github.com/McDermottHealthAI/MEDS_algorithm_template using a reviewed immutable revision, and -record it in .copier-answers.yml. Pass the selected profiles explicitly; do not accidentally accept the -single-profile default. Never overwrite an existing local directory or GitHub repository. For a local -destination, initialize Git without creating a remote. For a GitHub destination, create the specified -repository with the specified visibility and connect the local checkout; report missing access without -changing the destination or visibility. Respect any more specific workspace repository-routing rules. - -Supplied evaluation tasks are already prepared: use their labels and task configs as fixed inputs. -Verify their dataset/revision, task identities, splits, prediction times and consistency before use. -An optional task subset selects only tasks already present in that bundle. Do not generate new tasks, -extract new labels, relabel examples or silently modify the task definitions. Use supplied indices or -read only the supplied prediction keys through the core index reader; evaluation outcomes must never -enter scoring. Zero-shot profiles additionally require executable task criteria and matching predicates. -If the bundle is not supplied, continue implementation and synthetic tests; report evaluation as -pending. An incomplete bundle blocks only the dependent evaluation, not unrelated implementation. - -Read AGENTS.md, SPEC.md, README.md, and docs/IMPLEMENTATION_GUIDE.md in the generated repository -completely before writing code. Inspect the paper, supplementary material, source repository, -configuration files, checkpoints, preprocessing code, and evaluation code available from the supplied -source. - -Apply the Ponytail principle of the smallest complete change: implement the complete source-defined -algorithm with the least additional infrastructure. Check meds-algorithm, existing algorithm-family code, -standard libraries and installed dependencies before creating helpers. If the source ships an installable -package or executable, depend on it pinned to the exact reviewed revision and call it; write only contract -glue (label-free preprocessing, cohort/key adaptation, explicit key association, coverage). Install it in the -algorithm environment; if it breaks meds-algorithm within core's declared dependency ranges, fix core. For a -genuine conflict with core, run the source as an external executable from a separate environment that the -algorithm package creates and manages (committed lockfile, built at install or first use, digest recorded in -manifests; MEDS-DEV installs only requirements.txt). Reimplement only when the source cannot run even in -isolation or its code cannot meet the contract even with glue, and record why in IMPLEMENTATION_REPORT.md; -local hardware alone is not a reason, since CPU or other hardware is acceptable. -Choose an algorithm_slug that does not shadow the source's distribution or import name (for example -genhpf_meds, not genhpf), so both can be installed together. Keep shared fixes in their -owning package; do not copy core utilities into the algorithm repository. Avoid speculative wrappers, -configuration options and compatibility layers. Trace affected commands, callers, fixtures and -documentation, and finish all required changes. Simplicity must preserve scientific fidelity, temporal -and label isolation, artifact validation, reproducibility, required evaluation evidence and human -review gates. Write focused tests for new behavior and failure cases. Report deviations and checks -that were not run. - -Write minimalist, auditable, object-oriented algorithm code. Put source-defined hyperparameters and defaults -in the algorithm-owned frozen Config class in config.py; validate values and prove -serialization round trips. Keep the implementation in .py and expose the named algorithm -and configuration classes from the package, so callers can import them meaningfully. -Keep the public API intentional and small. Classes, functions and modules used only inside the implementation -should use a single leading underscore (for example _FeatureEncoder or _features.py) and should not be -re-exported from the package __init__.py. List only intended public exports in __all__. Keep contract-required -methods and integration hooks publicly named where required. A leading underscore signals an internal, -unstable interface in Python; it does not enforce access control. Prefer it over double-underscore name -mangling unless avoiding a specific inheritance collision. Do not create extra classes just to organize -private helpers, and do not hide the algorithm/configuration classes callers are expected to import. -For neural algorithms with matching semantics, extend core NNConfig rather than -duplicating shared capacity, learning_rate, batch_size, weight_decay and dropout settings. Define -source-backed defaults and the capacity-multiplier mapping (reference architecture, dimensions, rounding -and minimums); call super().validate() for inherited -constraints. Test that the settings actually control construction/training. See the installed architecture -guide for units, extension examples and scaling ownership. Keep cohort selection upstream; record actual -parameter counts and consumed data separately rather than inferring them from capacity or a data fraction. -Use inherited additional_predicates_file for dataset-specific feature additions when needed. Read the -runner-resolved request.predicates_file in preprocessing; do not override base definitions, merge again, -or change task predicates. Preserve temporal isolation and use the same configuration across steps. -Implement the selected Algorithm profile methods with their typed request classes. Prefer small cohesive -components and explicit constructor dependencies; use inheritance for the profile contract and composition -for algorithm internals. Do not add unnecessary classes, wrappers, mutable module-level runtime state, hidden -singletons, import-time work, broad exception swallowing, or duplicated contract tables. Declarative -constants and the profile-to-implementation association are appropriate; fitted state belongs in artifacts. -Use core's runner for both CLI execution and tests. Algorithm methods write only to its staging destination -and return PayloadMetadata; do not reimplement publication, measurements or manifest/config/request writing. -Implement explicit payload compatibility checks. Prediction outputs contain keys and probabilities; -only the runner attaches evaluation truth after scoring. Demonstrate that saved configuration and requests -can be reloaded in a fresh process and executed without an earlier call on the same algorithm instance. - -Preserve all selected algorithm profiles and standardized command arguments, MEDS input boundary, artifact -manifest envelopes, MEDS-DEV model.yaml interface, and final MEDS prediction output. Intermediate payload -formats and execution mechanisms are algorithm-owned: choose whatever preprocessing, featurization, framework, -batching or non-batching strategy, external executable, storage format, and algorithm architecture most -faithfully reproduce the source. - -When predicates are needed, reuse MEDS-DEV predicates for the selected dataset if available; otherwise, -use reviewed external predicates for that dataset and record their provenance. Decide within the algorithm -how those predicates become inputs. Validate dataset-specific codes, units, task definitions, and label mappings; -do not assume MIMIC mappings apply to another dataset. Keep such mappings in dataset-specific -configuration or algorithm-owned code. Do not introduce a generic predicate-derived feature representation -into the contract package. Keep the provided MIMIC-IV demo code, task, and MEDS-DEV predicates as the -canonical smoke test, regardless of the full-data target. - -For a zero_shot_direct algorithm (answers queries directly, e.g. MOTOR, EveryQuery) or a zero_shot_materialized -algorithm (generates futures and evaluates the task on them; infer is task-independent and only predict -receives the task): the algorithm receives the original ACES task through -external_task_criteria_file (with the dataset predicates) and the upstream-built index through -external_index_dir. Never build, filter, or extend the cohort, and read the index only through -meds_algorithm.read_index. Reuse an existing aces-to- adapter for this algorithm if one exists; -otherwise write one on aces-relaxations, pinned to an exact version: reject tasks that are not future-only -or are degenerate, normalize, then apply only the approximations and assumptions the algorithm's query -language forces. Publish relaxations.yaml with each zero-shot prediction artifact, and report per task whether -the answer is exact. -A materialized algorithm evaluates the task on generated futures instead and needs no relaxation beyond -sampling. Follow the shape for the selected profile in docs/IMPLEMENTATION_GUIDE.md. -Do not omit source behavior because it is inconvenient for a fixture; adapt the implementation or fixture -instead. - -Record every material source element as ported, adapted, or omitted, with evidence and justification, in -IMPLEMENTATION_REPORT.md. Implement every selected typed algorithm method, finalize the implementation-specific -command strings in model.yaml, and implement tests/e2e.py. Configure representative config instances -in tests/conftest.py. Keep TestConformance inheriting the shared meds-algorithm acceptance suite; -do not copy its test bodies or override its checks to suppress failures. Remove each profile from STUB_PROFILES only -after that profile completes and produces standards-conformant predictions; complete every selected profile. - -Always run: - - uv run pytest -rs - -Also run `bash scripts/check_distribution.sh` to verify installed imports, CLI commands and bundled -defaults outside the checkout. Extend `tests/wheel_smoke.py` for required algorithm configuration or -resources. Follow RELEASING.md for publication readiness; package publication itself requires an explicit -user request. Do not choose a license on the user's behalf or bundle datasets, credentials or fitted weights. - -If the selected scope includes MEDS-DEV integration or full-evaluation preparation, also run: - - uv run pytest -m meds_dev -rs - -For implementation/local-tests scope, finish with implementation and local validation evidence. For -MEDS-DEV integration scope, finish after its integration evidence. Report unavailable dependencies or -adapters explicitly; do not weaken tests. The following demo and full-data stages apply only when the -selected scope is preparation for full evaluation; selecting that scope is not execution approval. - -Complete the pre-demo sections of IMPLEMENTATION_REPORT.md and ask for human review of source fidelity, -predicate interpretation, and the proposed MIMIC-IV demo execution. Only after approval, run: - - uv run pytest -m real_data -rs - -There must be zero algorithm_stub skips. Report exact pass/skip counts and account for every remaining skip. -Update IMPLEMENTATION_REPORT.md with the demo cohort, final-output coverage, predicate provenance, -environment, wall time, peak process-tree PSS/RSS, GPU measurements when available, failures, and fixes. -Ask for a second human review before launching the selected full dataset through the repository's SLURM -interface. Review target-dataset compatibility, access, and resources separately from the MIMIC-IV demo. -Use the supplied, already prepared task bundle for the selected dataset. It must contain task configs, -per-task labels/keys and split assignments; zero-shot runs additionally require the original ACES criteria -and matching predicates. Do not generate or extract replacement evaluation tasks. Canonical synthetic -fixtures and the built-in MIMIC-IV demo smoke task remain separate from this supplied evaluation bundle. If the bundle is absent -or inconsistent, report the evaluation blocker and the exact missing inputs. -Record the dataset name/revision, predicate provenance, bundle location, supplied bundle revision and -available upstream build provenance, and a digest of its task definitions. Keep the bundle external to Git. -Commit the implementation, configuration and report-so-far; push when a remote is configured. Run the -cluster job from that exact clean commit. After the authorized run, complete the report with full-data evidence, scientific deviations, and known limitations, then -synchronize structured results through the GitHub workflow when the destination has a GitHub remote. -For a local-only repository, retain the committed report and run evidence locally. Treat -docs/IMPLEMENTATION_GUIDE.md as the authority for the ordered gates and their evidence. -``` - +## Implementation prompt + +Use the [interactive prompt builder](https://meds-algorithm.readthedocs.io/en/latest/prompt-builder/) or the +[copyable implementation prompt](https://meds-algorithm.readthedocs.io/en/latest/implementation-prompt/) maintained in `meds-algorithm`. See [the test catalogue](TESTING.md) for each template test and its purpose; generated repositories include `docs/TESTING.md` describing every acceptance test. @@ -447,14 +210,16 @@ The authority is [`template/SPEC.md`](template/SPEC.md), which Copier renders as repositories. Files under `template/` are the generated payload; root tests validate that payload without imposing a algorithm implementation. -Profile selection and the distinct version 4 step names are described in [profiles](https://github.com/McDermottHealthAI/MEDS_algorithm_template/blob/main/docs/profiles.md). -See the [software contract](https://github.com/McDermottHealthAI/meds-algorithm/blob/v0.4.0a5/src/meds_algorithm/CONTRACT.md), [migration guide](https://github.com/McDermottHealthAI/MEDS_algorithm_template/blob/main/docs/migration-v4.md), -and [shared-package assessment](https://github.com/McDermottHealthAI/MEDS_algorithm_template/blob/main/docs/shared-package-assessment.md). +Profile selection and the distinct version 4 step names are described in [profiles](https://meds-algorithm.readthedocs.io/en/latest/profiles/). +See the [software contract](https://github.com/McDermottHealthAI/meds-algorithm/blob/v0.4.0a5/src/meds_algorithm/CONTRACT.md), [migration guide](https://meds-algorithm.readthedocs.io/en/latest/migration-v4/), +and [shared-package assessment](https://meds-algorithm.readthedocs.io/en/latest/shared-package-assessment/). ## Changes ### Unreleased +- Move the documentation site and prompt builder to `meds-algorithm` on Read the Docs, and replace + this repository's Pages site with redirects. Generated-repository guides remain template-owned. - Require confirmation for material scientific ambiguities by default; offer explicitly enabled exploratory assumptions in the prompt builder while preserving evaluation and execution approval gates. diff --git a/RELEASING.md b/RELEASING.md index 6e035a0..be62114 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -12,6 +12,11 @@ project `meds-algorithm-template`, owner `McDermottHealthAI`, repository `MEDS_a workflow `publish.yml`, and environments `testpypi` / `pypi`. The workflow must be merged into `main` before GitHub exposes its manual dispatch action. +The documentation site is built in `meds-algorithm`. When changing these release instructions or the +generated release/test guides, update `docs/template-source.json` in that repository to the reviewed +template commit and file checksums; its strict docs build verifies the sources. The template's own +documentation workflow now publishes only redirects for old GitHub Pages links. + ## 1. Switch generated projects to the published shared package Generator `0.4.0a2` pins the published `meds-algorithm==0.4.0a5` release. For future updates, @@ -36,13 +41,10 @@ Validate before merging: ```bash uv lock -uv sync --locked --group dev --group docs -uv run ruff check src tests scripts docs/hooks.py -uv run ruff format --check src tests scripts docs/hooks.py -npm ci --ignore-scripts -npm test +uv sync --locked --group dev +uv run ruff check src tests scripts +uv run ruff format --check src tests scripts uv run pytest -q -uv run mkdocs build --strict uv run python scripts/check_release.py uv build uvx --from 'twine>=6' twine check --strict dist/* diff --git a/TESTING.md b/TESTING.md index 85d9e31..f25a56d 100644 --- a/TESTING.md +++ b/TESTING.md @@ -2,21 +2,18 @@ These tests validate the generator and rendered repository structure. Shared runtime/contract tests have [their own catalogue](https://github.com/McDermottHealthAI/meds-algorithm/blob/main/src/meds_algorithm/TESTING.md), -rendered from the installed package on the documentation site's Shared-package tests page. +rendered from the core checkout on the documentation site's Shared-package tests page. Generated algorithm acceptance tests are documented separately in the next section of the site and in `docs/TESTING.md` inside each generated repository. Keep these three scopes distinct. ## Running template tests ```bash -uv sync --group dev --group docs -uv run ruff check src tests scripts docs/hooks.py -uv run ruff format --check src tests scripts docs/hooks.py -npm ci --ignore-scripts -npm test +uv sync --group dev +uv run ruff check src tests scripts +uv run ruff format --check src tests scripts uv run pytest -q uv run pytest tests/test_profiles.py -q -uv run mkdocs build --strict ``` Tests use temporary renders, toy implementations and synthetic data. MEDS-DEV provisioning is mocked or @@ -25,29 +22,8 @@ run. Parametrized functions produce several pytest cases. Helper fixtures are no ## Test inventory -### test_docs.py - -| Test | What it checks | Why it exists | -|---|---|---| -| `test_prompt_builder_embeds_the_canonical_readme_prompt` | Decodes the embedded browser prompt and compares it with the README's canonical block. | Prevent the static prompt and interactive builder from drifting apart. | -| `test_prompt_source_cannot_close_its_json_script_element` | Embeds source text containing HTML script closers and checks the decoded value and element boundary. | Keep prompt text inert when included in the documentation HTML. | - -### prompt_builder.test.cjs - -Run with `npm test` on Node 24 after `npm ci --ignore-scripts`. jsdom is development-only; the shipped -builder uses plain JavaScript without runtime dependencies, network calls or persisted form inputs. - -| Test | What it checks | Why it exists | -|---|---|---| -| All choice combinations | Exercises all 144 source/destination/profile/task/scope/ambiguity-mode combinations and common instructions. | Preserve scientific review and execution gates in both confirmation-required and exploratory modes. | -| Ambiguity-mode default and validation | Confirms omitted/false mode requires confirmation and rejects non-boolean opt-ins. | Avoid enabling exploratory assumptions through an absent or truthy string value. | -| Exploratory checkbox lifecycle | Checks unchecked defaults, explicit opt-in, stale-output invalidation, toggling back and reset in a DOM. | Require an intentional selection and restore confirmation mode on reset. | -| Invalid plans | Rejects missing sources, destination, manual profiles or prepared-bundle metadata. | Avoid an apparently ready prompt with incomplete required inputs. | -| Task subsets and literal text | Retains existing task identifiers and arbitrary input text without recursive replacement. | Keep the user's supplied scope and constraints intact. | -| Conditional form fields | Exercises visibility, required fields and multi-profile generation in a DOM. | Prevent hidden fields or single-profile defaults from overriding the selected options. | -| Edits, copy, download and reset | Copies/downloads the exact edited text, invalidates stale output after input changes and clears state on reset. | Avoid handing the agent outdated or unreviewed prompt text. | -| Clipboard fallback | Simulates denied clipboard access and checks that the complete prompt is selected. | Keep the offline preview usable when browser clipboard permissions are unavailable. | -| Inert HTML and repeated initialization | Supplies HTML-like source text and initializes the form again. | Prevent text injection and avoid losing edits when docs navigation reinitializes scripts. | +Documentation and prompt-builder tests now live in +[meds-algorithm](https://meds-algorithm.readthedocs.io/en/latest/documentation-tests/). ### test_generator.py @@ -91,7 +67,7 @@ builder uses plain JavaScript without runtime dependencies, network calls or per | `test_example_signal_dataset_has_no_length_or_position_leak` | Checks that labels match signal-code presence, with variable history lengths and both classes. | Sanity-check the example signal fixture; this is not a statistical proof that all shortcuts are absent. | | `test_primary_behavior_is_a_required_failing_placeholder` | Checks the generated test requires real signal binding and a shuffled-label control. | Do not let an unimplemented scientific behavior test pass by default. | | `test_predicates_are_external_not_a_rendered_semantic_format` | Renders without predicates and checks the descriptor and absence of a semantics file. | Avoid inventing an algorithm feature representation in the template. | -| `test_implementation_prompt_belongs_to_template_readme_not_rendered_repo` | Checks the copyable implementation prompt exists only in the template README. | Avoid shipping duplicate agent instructions into each generated project. | +| `test_implementation_prompt_links_to_core_docs_not_rendered_repo` | Checks the README links to the core prompt and generated repositories do not duplicate it. | Avoid shipping duplicate agent instructions into each generated project. | | `test_spec_has_one_template_source_and_renders_to_root` | Checks the generated SPEC uses the single template source. | Prevent competing copies of generated specification guidance. | | `test_prediction_keys_are_compared_directly` | Parametrizes reordered, missing, extra and duplicate prediction rows. | Judge cohort coverage by keys rather than row count or row order. | | `test_meds_dev_predicates_capability_is_explicit` | Checks MEDS-DEV capability detection for predicate passthrough. | Fail unsupported integrations instead of silently dropping dataset semantics. | diff --git a/docs/assets/prompt-builder.css b/docs/assets/prompt-builder.css deleted file mode 100644 index c7da175..0000000 --- a/docs/assets/prompt-builder.css +++ /dev/null @@ -1,19 +0,0 @@ -.prompt-builder { --pb-line: var(--md-default-fg-color--lightest, #dce5eb); --pb-bg: var(--md-default-bg-color, #fff); --pb-ink: var(--md-default-fg-color, #182b3d); color: var(--pb-ink); } -.prompt-builder fieldset { min-width: 0; border: 1px solid var(--pb-line); border-radius: 8px; margin: 1.6em 0; padding: 1em 1.25em; } -.prompt-builder legend { padding: 0 .4em; font-weight: 700; } -.prompt-builder label { display: block; margin: .8em 0; font-weight: 600; } -.prompt-builder .pb-hint { display: block; font-size: .86em; font-weight: 400; opacity: .8; margin: .3em 0; } -.prompt-builder input:not([type="checkbox"]), .prompt-builder select, .prompt-builder textarea { display: block; width: 100%; min-width: 0; margin-top: .4em; padding: .65em .75em; border: 1px solid var(--pb-line); border-radius: 5px; color: var(--pb-ink); background: var(--pb-bg); font: inherit; font-weight: 400; } -.prompt-builder input:not([type="checkbox"]) { line-height: 1.4; } -.prompt-builder textarea { resize: vertical; line-height: 1.5; } -.prompt-builder [data-prompt-output] { font: .85em/1.6 Consolas, monospace; white-space: pre-wrap; } -.prompt-builder .pb-check { display: flex; align-items: baseline; gap: .6em; font-weight: 400; } -.prompt-builder input[type="checkbox"] { flex: 0 0 auto; width: 1em; height: 1em; } -.prompt-builder .pb-actions { display: flex; flex-wrap: wrap; gap: .7em; margin: 1em 0; } -.prompt-builder button { padding: .6em 1em; border: 1px solid var(--pb-line); border-radius: 5px; color: var(--pb-ink); background: var(--pb-bg); cursor: pointer; font: inherit; } -.prompt-builder [data-generate] { background: #116b7b; color: #fff; border-color: #116b7b; } -.prompt-builder button:disabled { opacity: .45; cursor: not-allowed; } -.prompt-builder :focus-visible { outline: 3px solid #208bba; outline-offset: 3px; } -.prompt-builder .pb-status { min-height: 1.6em; } -.prompt-builder [hidden] { display: none !important; } -@media (max-width: 600px) { .prompt-builder fieldset { padding: .75em; } } diff --git a/docs/assets/prompt-builder.js b/docs/assets/prompt-builder.js deleted file mode 100644 index 11eca1d..0000000 --- a/docs/assets/prompt-builder.js +++ /dev/null @@ -1,173 +0,0 @@ -/* No network calls or persisted inputs: the documentation embeds the canonical README prompt. */ -(function () { - "use strict"; - const profiles = ["supervised", "finetune", "probe", "zero_shot_direct", "zero_shot_materialized", "predict_only"]; - const scopes = { - local: "Implementation and local tests only.", - integration: "Implementation, local tests and MEDS-DEV integration; stop before the demo.", - full: "Implementation, local tests, MEDS-DEV integration and preparation for demo/full-data evaluation; wait for the existing execution approvals." - }; - const clean = (value) => String(value ?? "").trim(); - function required(value, label) { - const result = clean(value); - if (!result) throw new Error(`Supply ${label}.`); - return result; - } - function choice(value, allowed, label) { - if (!allowed.includes(value)) throw new Error(`Choose a valid ${label}.`); - return value; - } - function renderPrompt(template, values) { - const source = choice(values.source_kind, ["paper", "code", "both"], "source type"); - const destination = choice(values.destination_kind, ["local", "github"], "destination"); - const mode = choice(values.profile_mode, ["automatic", "manual"], "profile selection"); - const tasks = choice(values.tasks_mode, ["none", "ready"], "task-input option"); - const scope = choice(values.scope, Object.keys(scopes), "work scope"); - if (values.exploratory_mode !== undefined && typeof values.exploratory_mode !== "boolean") { - throw new Error("Exploratory mode must be an explicit checkbox selection."); - } - let repository = "New local Git repository only; do not create a GitHub repository."; - if (destination === "github") { - const name = required(values.github_repo, "the new GitHub repository") - .replace(/^https:\/\/github\.com\//, "").replace(/\/$/, ""); - if (!/^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\/[A-Za-z0-9_.-]+$/.test(name) - || [".", ".."].includes(name.split("/")[1])) { - throw new Error("Use owner/name or https://github.com/owner/name for the new repository."); - } - const visibility = choice(values.visibility, ["private", "public"], "repository visibility"); - repository = `New GitHub repository: https://github.com/${name}; visibility: ${visibility}.`; - } - let selection = "automatic"; - if (mode === "manual") { - const selected = Array.isArray(values.profiles) ? [...new Set(values.profiles)] : []; - if (!selected.length || selected.some((name) => !profiles.includes(name))) { - throw new Error("Select at least one supported profile."); - } - selection = `Explicit profiles: ${selected.join(", ")}.`; - } - let bundle = "Not supplied. Continue implementation and synthetic tests; defer evaluation on external task bundles."; - if (tasks === "ready") { - required(values.dataset, "the dataset name, revision and MEDS path for these tasks"); - bundle = [ - `Prepared labels: ${required(values.labels_path, "the prepared labels location")}`, - `Prepared task configs: ${required(values.configs_path, "the prepared task-config location")}`, - `Bundle revision/identifier: ${required(values.bundle_revision, "the bundle revision or identifier")}`, - `Task subset: ${clean(values.task_subset) || "All tasks already present in this bundle."}` - ].join("\n"); - } - const replacements = { - PAPER_REFERENCES_OR_NOT_SUPPLIED: source === "code" ? "Not supplied." : required(values.papers, "at least one paper reference"), - CODE_REFERENCES_OR_NOT_SUPPLIED: source === "paper" ? "Not supplied." : required(values.code, "at least one code/repository reference"), - NEW_REPOSITORY_DESTINATION: repository, - NEW_LOCAL_REPOSITORY_PATH: required(values.local_path, "a new local repository path"), - PROFILE_SELECTION: selection, - DATASET_CONTEXT_OR_NOT_SUPPLIED: clean(values.dataset) || "Not supplied; use synthetic data for local implementation tests.", - PREPARED_TASK_BUNDLE_OR_NOT_SUPPLIED: bundle, - WORK_SCOPE: scopes[scope], - SCIENTIFIC_AMBIGUITY_MODE: values.exploratory_mode === true - ? "Exploratory mode explicitly enabled: provisional algorithm-design assumptions are permitted under the policy below." - : "Confirmation required (default): ask before implementing material unresolved scientific choices.", - ADDITIONAL_CONSTRAINTS_OR_NONE: clean(values.constraints) || "None." - }; - return template.replace(/<([A-Z][A-Z0-9_]*)>/g, (token, key) => { - if (!Object.hasOwn(replacements, key)) throw new Error(`Unknown prompt field: ${token}`); - return replacements[key]; - }); - } - function init(root) { - if (root.dataset.initialized) return; - const source = root.querySelector("[data-prompt-template]"); - if (!source) return; - const template = JSON.parse(source.textContent); - const form = root.querySelector("[data-builder-form]"); - const output = root.querySelector("[data-prompt-output]"); - const status = root.querySelector("[data-status]"); - const copy = root.querySelector("[data-copy]"); - const download = root.querySelector("[data-download]"); - const generate = root.querySelector("[data-generate]"); - const reset = root.querySelector("[data-reset]"); - root.dataset.initialized = "true"; - let stale = true; - const field = (name) => form.elements.namedItem(name); - function section(name, visible, requiredNames = []) { - const block = root.querySelector(`[data-section="${name}"]`); - block.hidden = !visible; - block.querySelectorAll("input, textarea, select").forEach((input) => { - input.disabled = !visible; - input.required = visible && requiredNames.includes(input.name); - }); - } - function update() { - section("papers", field("source_kind").value !== "code", ["papers"]); - section("code", field("source_kind").value !== "paper", ["code"]); - section("github", field("destination_kind").value === "github", ["github_repo"]); - section("profiles", field("profile_mode").value === "manual"); - const ready = field("tasks_mode").value === "ready"; - section("tasks", ready, ["labels_path", "configs_path", "bundle_revision"]); - field("dataset").required = ready; - } - form.addEventListener("input", () => { - update(); - stale = true; - copy.disabled = download.disabled = true; - status.textContent = output.value ? "Inputs changed. Generate again to update the prompt; existing edits remain below." : "Fill in the inputs, then generate your prompt."; - }); - form.addEventListener("submit", (event) => { - event.preventDefault(); - if (!form.reportValidity()) return; - const data = new FormData(form); - const values = Object.fromEntries(data.entries()); - values.profiles = data.getAll("profiles"); - values.exploratory_mode = field("exploratory_mode").checked; - try { - output.value = renderPrompt(template, values); - output.readOnly = false; - stale = false; - copy.disabled = download.disabled = false; - status.textContent = "Prompt ready. Review or edit it, then copy or download."; - } catch (error) { - copy.disabled = download.disabled = true; - status.textContent = error.message; - } - }); - output.addEventListener("input", () => { - download.disabled = copy.disabled = stale || !output.value.trim(); - }); - copy.addEventListener("click", async () => { - try { - await navigator.clipboard.writeText(output.value); - status.textContent = "Prompt copied."; - } catch (_) { - output.focus(); - output.select(); - status.textContent = "Clipboard access is unavailable. The prompt is selected; use Ctrl+C or Command+C."; - } - }); - download.addEventListener("click", () => { - const url = URL.createObjectURL(new Blob([output.value], {type: "text/plain;charset=utf-8"})); - const anchor = document.createElement("a"); - anchor.href = url; - anchor.download = "meds-algorithm-implementation.txt"; - anchor.click(); - setTimeout(() => URL.revokeObjectURL(url), 0); - }); - reset.addEventListener("click", () => { - form.reset(); - stale = true; - update(); - output.value = ""; - output.readOnly = true; - copy.disabled = download.disabled = true; - status.textContent = "Reset. Fill in the inputs, then generate your prompt."; - }); - update(); - generate.disabled = reset.disabled = false; - } - if (typeof module !== "undefined" && module.exports) module.exports = {renderPrompt, init}; - if (typeof document !== "undefined") { - const start = () => document.querySelectorAll("[data-prompt-builder]").forEach(init); - if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", start); - else start(); - if (typeof document$ !== "undefined") document$.subscribe(start); - } -})(); diff --git a/docs/concepts.md b/docs/concepts.md deleted file mode 100644 index efbe2db..0000000 --- a/docs/concepts.md +++ /dev/null @@ -1,207 +0,0 @@ -# Concepts - -This page walks through the objects the contract talks about, in the order data flows through an algorithm: -the dataset, the task, the predicates, the task specification (zero-shot only), the artifacts each -command publishes, the final predictions, and the measurements attached to all of them. - -## The MEDS dataset and its splits - -The input data is a split-sharded [MEDS](https://medical-event-data-standard.github.io/) dataset, passed -as `external_meds_dir`. MEDS fixes what `subject_id`, `time`, `code`, the value columns, static events -(`time = null`) and code metadata mean; an algorithm may not reinterpret them. - -The dataset comes with three splits: `train`, `tuning` and `held_out`. They are a **boundary**: - -!!! warning "Fit population statistics on `train` only" - Anything fitted over a population — vocabularies, code frequencies, quantile bins, normalization - constants, feature selections — must be fitted on the training split alone. Fitting over all splits is - *transductive leakage*. It is easy to miss because it is not label leakage: code frequencies do not - depend on labels, so an algorithm can pass every label-leakage check and still carry it. If preprocessing - is delegated upstream and the scope is not yours to control, declare which quantity was fitted over - which population. - -The generated end-to-end test checks this: it plants a canary code in every tuning and held-out subject of -its fixture, and none may appear among the codes the algorithm fitted statistics for (see the -[FAQ](faq.md#how-do-the-tests-catch-label-leakage-and-transductive-fitting)). - -The MIMIC-IV demo in MEDS form is the canonical real-data example used by the tests; it is not a separate -schema. - -## The task index (built upstream) - -An upstream task extraction can store both keys and outcomes. Inference/scoring receives its key-only -view as `external_index_dir`; training receives permitted targets through `external_labels_dir`: - -- **keys**: `(subject_id, prediction_time)`, the rows to predict, in every split; -- **labels**: a value column such as `boolean_value`. - -### Who reads which labels - -Keys identify where to predict; ground-truth values describe what happened. They are not interchangeable. -The [canonical argument table](reference/spec.md#step-arguments-and-artifacts) defines each step's access. -Inference and ordinary scoring read only keys. The core index reader projects those columns at Parquet -read time, even when MEDS-DEV supplies a directory whose files also contain outcomes. - -The index is never built in the algorithm repository. One ACES extraction, run upstream, applies the task's -trigger, inclusion/exclusion criteria and splits, so every algorithm scores exactly the same rows: - -| Run | Who builds the index | -|---|---| -| MIMIC-IV demo (smoke test) | MEDS-DEV's `meds-dev-task`, task `mortality/in_icu/first_24h` | -| Full-data evaluation | a shared, reviewed task bundle for the target dataset, built once upstream: clinical tasks defined and extracted with [ACES](https://eventstreamaces.readthedocs.io/), or randomly sampled code-by-horizon tasks (generated with [meds-random-task-sampler](https://github.com/florian6973/meds-random-task-sampler) and selected with [meds-task-selection](https://github.com/florian6973/meds-task-selection)), containing each task's definition and its per-task index and labels | - -Every algorithm compared on a dataset uses the same bundle. Zero-shot runs additionally need each task's ACES -criteria file. - -An algorithm repository must not re-extract, filter or extend the index. If an algorithm rebuilt the cohort itself, -two algorithms could silently be evaluated on different patients, and a zero-shot algorithm would read the labels -it is supposed to be blind to. - -### Reading labels: the one rule - -The contract rule is: evaluated-split labels are never read, and only `train_supervised` / `train_finetune` / `train_probe` -and a `predict_only` in-context learner read train/tuning labels. There is exactly one sanctioned exception: once every probability is final, `predict` may join the label column onto the predictions by -key (`attach_ground_truth`), because meds-evaluation reads ground truth from the predictions file. Nothing -computed from that join may feed back into a prediction. - -## Dataset predicates - -Tasks are written against named *predicates* (for example `icu_admission`, `death`, or -`abnormally_low_sodium` with a value threshold). A dataset's predicates file binds those names to that -dataset's codes. It is passed as `external_predicates_file` (MEDS-DEV's `{predicates_path}`). - -- When MEDS-DEV provides predicates for a dataset, reuse them; the MIMIC-IV demo must use MEDS-DEV's - MIMIC-IV predicates. -- The algorithm decides whether and how to use them: selecting tokens, building SQL or columns, matching - events directly, or not at all. -- Any command that consumes the file records its digest and origin in its manifest. -- An algorithm that relies on particular predicate names declares and validates them in its own configuration. - The contract deliberately has no generic "predicate features" format. - -### Additional feature predicates per dataset - -Every generated configuration inherits optional `additional_predicates_file` from `AlgorithmConfig`. -Select the dataset configuration explicitly, for example `config_file=/repo/dataset_configs/mimic_iv.yaml`: - -```yaml -additional_predicates_file: ../predicates/mimic_iv_additional.yaml -``` - -Paths resolve relative to the configuration file. The additional file has the same predicate-only -shape as MEDS-DEV's dataset file: - -```yaml -predicates: - algorithm_specific_event: - code: YOUR_DATASET_EVENT_CODE -``` - -During `preprocess_data`, core combines this file with `external_predicates_file`, or uses it alone if -no base was supplied. Duplicate names are errors even if their definitions agree; duplicate YAML keys -and task/cohort sections are also rejected. Expression semantics and dataset compatibility remain the -algorithm's responsibility. The runner passes the resolved path as `request.predicates_file` to both -the compatibility hook and preprocessing. Implementations must read that path rather than merge files. - -Core saves `resolved_feature_predicates.yaml` in the prepared-data artifact, records both source paths -and content digests plus the resolved digest, and includes them in the configuration digest. The source -additions file can be temporary: later steps use persisted features and do not reopen or merge it. -Keep the same configuration across the lifecycle; use a separate config file for each dataset. - -These are feature additions only. They never modify `TaskSpec`, evaluated labels, or the cohort. Task -predicates continue to reach only the task-conditioned commands through the original task binding. -Preprocessing must not include outcome-dependent definitions or read events beyond each permitted cutoff. -For a changed target or cohort, update the shared upstream task bundle instead. - -## The task specification (zero-shot only) - -A supervised algorithm learns *what* to predict from labels. A zero-shot algorithm never sees labels, so the task -itself must be an input. The task language is [ACES](https://eventstreamaces.readthedocs.io/): a criteria -file passed as `external_task_criteria_file`, bound to the dataset predicates. The pair is the **task -specification** (`TaskSpec`). - -```mermaid -flowchart LR - crit[ACES criteria file
e.g. mortality/in_icu/first_24h.yaml] --> spec[TaskSpec] - pred[Dataset predicates
e.g. MIMIC-IV predicates.yaml] --> spec - spec --> digest["semantics_digest
sha256 of criteria + predicates"] -``` - -The **semantics digest** hashes the criteria bytes together with the predicates bytes. MEDS-DEV task files -leave dataset codes as `???`, so the same criteria bound to MIMIC-IV and to eICU predicates are different -tasks with different digests. Every task-conditioned artifact records this digest, so an artifact can never -be silently reused for another task. See [Zero-shot in practice](zero-shot.md). - -## Artifacts and the manifest envelope - -Every command publishes one **artifact**: a directory containing whatever payload the algorithm wants plus a -`manifest.yaml` that follows a fixed envelope. - -```mermaid -flowchart LR - p[preprocess_data] -->|patients| pt[pretrain] - pt -->|pretrained_algorithm| i[infer_embeddings] - i -->|embeddings| st[train_probe] - st -->|probe_algorithm| pr[predict_probe] - pr -->|predictions| out[(final output)] -``` - -*(The `probe` profile shown; other profiles skip some commands. See [Choosing a profile](profiles.md).)* - -| Artifact type | Produced by | Meaning | -|---|---|---| -| `patients` | `preprocess_data` | the algorithm's own representation of the dataset | -| `pretrained_algorithm` | `pretrain` | a task-independent algorithm | -| `embeddings` / `trajectories` | `infer_embeddings` / `infer_trajectories` | separate task-independent representations and generated futures | -| `supervised_algorithm` / `finetuned_algorithm` / `probe_algorithm` | `train_supervised` / `train_finetune` / `train_probe` | a complete task-specific inference bundle | -| `predictions` | `predict` | the normative final output | - -Four properties hold for every artifact: - -- **The payload format is the algorithm's.** The manifest declares it (`payload_format: name/version`), and - consumers reject an incompatible type, contract version or payload format *before* doing expensive work. -- **Publication preserves complete artifacts.** The command writes its manifest last in unique staging. - New outputs appear by one rename. Overwrite retains the old output until replacement succeeds and - restores it on failure; readers may briefly see no destination during the two renames. Process crashes - can leave recovery files. See [publication behavior](reference/manifest.md). -- **Inputs and configuration are traceable.** The manifest records stable identifiers or digests of its - inputs (including the predicates digest and, for task-conditioned artifacts, the task's provenance and - digest), a `config_digest` over the command's arguments and resolved settings, and the git commit and - dirty state of the code that produced it. -- **Artifacts are never nested.** Each artifact is its own directory; `infer_embeddings`, for example, writes a - sibling of the data artifact rather than a subdirectory of it, so runs over different indexes cannot - overwrite each other. - -Core's `StepRunner` owns this work through `measured_artifact(...)`; algorithm methods write payloads into -the supplied staging directory. See the [manifest reference](reference/manifest.md). - -## Final predictions - -`predict` writes `predictions.parquet` in the -[meds-evaluation](https://github.com/kamilest/meds-evaluation) prediction schema of the version MEDS-DEV -evaluates with (currently `meds-evaluation==0.0.3`, checked with `validate_binary_classification_schema`): - -- exactly **one row per requested key**, with **unique keys**; -- row order means nothing and must never be used to match outputs to keys; -- conformance tests compare the written keys directly with the requested index — a self-reported count is - not proof of coverage; -- rows may be left out only under an explicitly declared exclusion policy that lists the excluded keys; -- every parquet file in the predictions artifact is read as predictions (MEDS-DEV evaluates - `**/*.parquet`), so supporting tables use another format. - -For zero-shot algorithms, predictions are always evaluated against the labels of the *requested* task, and the -predictions artifact carries or references the `relaxations.yaml` describing what the algorithm actually -answered. - -## Measurements - -Every command invocation records its resource use in the manifest, wherever it runs (tests, MEDS-DEV, -SLURM): - -- **wall time** on a monotonic clock; -- **memory** sampled over the whole process tree; on Linux, PSS (which apportions shared pages) is the - comparison value and RSS is kept as a diagnostic; -- **GPU** peak allocated/reserved memory when measured; -- optional work units (subjects, events, rows, optimizer steps). - -`null` means *not measured*; `0` means *measured, nothing used*. Measurements are observations for -comparing algorithms, never pass/fail thresholds. diff --git a/docs/core-package.md b/docs/core-package.md deleted file mode 100644 index 8369f88..0000000 --- a/docs/core-package.md +++ /dev/null @@ -1,25 +0,0 @@ -# Shared core package - -The core lives in its own [repository](https://github.com/McDermottHealthAI/meds-algorithm), pinned by the template to PyPI version `0.4.0a5`. -See its [layout and usage](https://github.com/McDermottHealthAI/meds-algorithm/blob/v0.4.0a5/README.md) for its artifact, runtime, task, evaluation, integration and conformance APIs. -The [specification](reference/spec.md) below is rendered from the installed dependency, so the site -and generated algorithms use the same version without copying the contract into this repository. -The [architecture and UML](reference/architecture.md) are also rendered from the pinned core wheel. - -`AlgorithmConfig` is the shared configuration parent. Neural implementations can extend `NNConfig`; -the [neural configuration and scaling guide](reference/architecture.md#neural-network-configuration-and-scaling-experiments) -shows a concrete subclass, YAML settings and a capacity sweep. It also explains why data-subset selection -belongs upstream and which measurements an algorithm must report for a later scaling-law analysis. -The template keeps this example in the core guide rather than maintaining a second specification. - -Family-specific sharing belongs in one algorithm-family repository with multiple profiles and shared internal -modules. Tokenizers, neural architectures, objectives and algorithm-specific task translators stay there. - -Generated repositories import `meds_algorithm` directly. Their package contains a typed algorithm -implementation and an algorithm-owned immutable configuration. `tests/e2e.py` invokes the same shared runner -as the CLI and supplies fitted-feature inspection hooks. -Reusable assertions, fixtures and MEDS-DEV provisioning live in core. No compatibility package is copied. - -Publication uses exclusive writers and overwrite rollback. Algorithm provenance must be supplied explicitly; -the installed package cannot infer an algorithm checkout. See the core README for crash recovery, reader -visibility during overwrite, optional dependencies, and measurement limits. diff --git a/docs/examples/manual-supervised.sh b/docs/examples/manual-supervised.sh deleted file mode 100644 index 3c6255e..0000000 --- a/docs/examples/manual-supervised.sh +++ /dev/null @@ -1,216 +0,0 @@ -#!/usr/bin/env bash -# --8<-- [start:setup] -# A complete local tutorial. Prerequisites: Bash, Git, uv, and network access for dependencies. -set -euo pipefail -command -v git >/dev/null -command -v uv >/dev/null - -# Use a NEW directory. Nothing is deleted or overwritten outside this tutorial. -WORKSPACE="${1:-$PWD/manual-meds-example}" -if [[ -e "$WORKSPACE" ]]; then - echo "Choose a new directory: $WORKSPACE already exists" >&2 - exit 1 -fi -mkdir -p "$WORKSPACE" -cd "$WORKSPACE" -WORKSPACE="$PWD" - -# 1. Render a named, single-profile repository from a reproducible template revision. -cat > answers.yaml <<'YAML' -algorithm_name: Manual baseline -algorithm_slug: manual_baseline -algorithm_class: ManualBaseline -algorithm_description: Synthetic tutorial estimating training-label prevalence. -profiles: [supervised] -uses_predicates: true -implementation_source: This tutorial; not a reproduction of a published clinical algorithm. -YAML -uvx --from 'copier==9.17.1' copier copy --defaults --trust \ - --vcs-ref=55ddd290d20a39dd19954321580c616cc11a74ae \ - --data-file answers.yaml \ - https://github.com/McDermottHealthAI/MEDS_algorithm_template.git manual-baseline -cd manual-baseline -# --8<-- [end:setup] - -# --8<-- [start:environment] -# 2. Create the Python environment and install the generated package and test dependencies. -uv python install 3.11 -uv sync --python 3.11 --extra test -uv run manual-baseline profiles -uv run manual-baseline commands --profile supervised -uv run meds-algorithm-spec > installed-contract.txt -# --8<-- [end:environment] - -# 3. Implement the generated stubs manually. No agent or MEDS-DEV runner is involved. -# --8<-- [start:configuration] -cat > src/manual_baseline/config.py <<'PY' -from dataclasses import dataclass -from meds_algorithm import AlgorithmConfig - - -@dataclass(frozen=True) -class ManualBaselineConfig(AlgorithmConfig): - smoothing: float = 1.0 - - def validate(self): - if self.smoothing <= 0: - raise ValueError("smoothing must be positive") -PY -# --8<-- [end:configuration] - -# --8<-- [start:algorithm] -cat > src/manual_baseline/manual_baseline.py <<'PY' -import json -from pathlib import Path - -import polars as pl -import yaml - -from meds_algorithm import AlgorithmRepository, PayloadMetadata, SupervisedAlgorithm -from meds_algorithm.requests import ( - PreprocessDataRequest, TrainSupervisedRequest, PredictSupervisedRequest, -) -from .config import ManualBaselineConfig - - -class ManualBaseline(SupervisedAlgorithm): - name = "manual_baseline" - config_type = ManualBaselineConfig - - def preprocess_data(self, request: PreprocessDataRequest) -> PayloadMetadata: - events = pl.read_parquet(str(request.meds_dir / "data" / "*.parquet")) - events.write_parquet(request.output.directory / "events.parquet") - # Core supplies the composed feature predicates; keep its reserved file unchanged. - predicates = yaml.safe_load(request.predicates_file.read_text())["predicates"] - (request.output.directory / "summary.json").write_text(json.dumps({ - "events": events.height, "predicate_names": sorted(predicates), - })) - return PayloadMetadata("tutorial-events") - - def train_supervised(self, request: TrainSupervisedRequest) -> PayloadMetadata: - outcomes = request.labels.read("train")["boolean_value"] - if len(outcomes) == 0: - raise ValueError("Training labels must not be empty") - alpha = self.config.smoothing - probability = (outcomes.sum() + alpha) / (len(outcomes) + 2 * alpha) - (request.output.directory / "probability.json").write_text(json.dumps(probability)) - return PayloadMetadata("tutorial-prevalence") - - def predict_supervised(self, request: PredictSupervisedRequest) -> PayloadMetadata: - probability = json.loads((request.fitted_algorithm.directory / "probability.json").read_text()) - request.index.read().with_columns( - pl.lit(probability).alias("predicted_boolean_probability") - ).write_parquet(request.output.directory / "predictions.parquet") - return PayloadMetadata("tutorial-predictions") - - -IMPLEMENTATIONS = {"supervised": ManualBaseline} -PROFILES = tuple(IMPLEMENTATIONS) -# Keep the completion gate: this tutorial does not implement the full conformance adapters/report. -STUB_PROFILES = set(PROFILES) - - -def create_repository(): - return AlgorithmRepository(IMPLEMENTATIONS, repo=Path(__file__).resolve().parents[2]) -PY -# --8<-- [end:algorithm] - -# --8<-- [start:inputs] -# 4. Create tiny synthetic MEDS events and an upstream label/index bundle. -# Real work should reuse a reviewed task bundle, not derive labels inside the algorithm. -mkdir -p inputs/meds/data inputs/labels dataset_configs predicates -uv run python - <<'PY' -from datetime import datetime -import polars as pl - -pl.DataFrame({ - "subject_id": [1, 2, 3, 4, 5], - "time": [datetime(2020, 1, 1)] * 5, - "code": ["DEMO//encounter"] * 5, - "numeric_value": [None] * 5, -}, schema_overrides={"numeric_value": pl.Float64}).write_parquet("inputs/meds/data/events.parquet") -for split, ids, outcomes in ( - ("train", [1, 2, 3], [True, True, False]), - ("held_out", [4, 5], [True, False]), -): - pl.DataFrame({ - "subject_id": ids, - "prediction_time": [datetime(2020, 1, 2)] * len(ids), - "boolean_value": outcomes, - }).write_parquet(f"inputs/labels/{split}.parquet") -PY -cat > predicates/base.yaml <<'YAML' -predicates: - encounter: - code: DEMO//encounter -YAML -cat > predicates/demo_additional.yaml <<'YAML' -predicates: - demo_measurement: - code: DEMO//measurement -YAML -cat > dataset_configs/demo.yaml <<'YAML' -smoothing: 1.0 -additional_predicates_file: ../predicates/demo_additional.yaml -YAML -# --8<-- [end:inputs] - -# --8<-- [start:paths] -# 5. Run the complete supervised lifecycle, one independent process per step. -CONFIG="$PWD/dataset_configs/demo.yaml" -MEDS="$PWD/inputs/meds" -LABELS="$PWD/inputs/labels" -BASE_PREDICATES="$PWD/predicates/base.yaml" -ARTIFACTS="$PWD/runs/manual/supervised/artifacts" -# --8<-- [end:paths] - -# --8<-- [start:preprocess] -uv run manual-baseline preprocess_data --profile supervised \ - "config_file=$CONFIG" "external_meds_dir=$MEDS" \ - "external_predicates_file=$BASE_PREDICATES" "output_data_dir=$ARTIFACTS/data" -# --8<-- [end:preprocess] - -# --8<-- [start:train] -uv run manual-baseline train_supervised --profile supervised \ - "config_file=$CONFIG" "input_data_dir=$ARTIFACTS/data" \ - "external_labels_dir=$LABELS" "output_supervised_algorithm_dir=$ARTIFACTS/algorithm" -# --8<-- [end:train] - -# --8<-- [start:predict] -uv run manual-baseline predict_supervised --profile supervised \ - "config_file=$CONFIG" "input_data_dir=$ARTIFACTS/data" \ - "input_supervised_algorithm_dir=$ARTIFACTS/algorithm" "external_index_dir=$LABELS" \ - 'splits=[held_out]' "output_predictions_dir=$ARTIFACTS/predictions" \ - "external_evaluation_labels_dir=$LABELS" -# --8<-- [end:predict] - -# --8<-- [start:verify] -# 6. Inspect and verify the outputs. Only the runner attaches the held-out truth after scoring. -uv run python - <<'PY' -from pathlib import Path -import polars as pl -import yaml -from meds_algorithm import read_manifest -from meds_algorithm.conformance.assertions import assert_prediction_schema -from manual_baseline import ManualBaseline, ManualBaselineConfig - -root = Path("runs/manual/supervised/artifacts") -predictions = pl.read_parquet(root / "predictions/predictions.parquet") -assert predictions["subject_id"].to_list() == [4, 5] -assert predictions["predicted_boolean_probability"].to_list() == [0.6, 0.6] -assert predictions["boolean_value"].to_list() == [True, False] -assert_prediction_schema(predictions) -print(predictions) -for stage in ("data", "algorithm", "predictions"): - manifest = read_manifest(root / stage) - assert (root / stage / "config.json").is_file() - assert (root / stage / "request.json").is_file() - print(stage, manifest["command"]["name"], manifest["resources"]["wall_seconds"]) -resolved = yaml.safe_load((root / "data/resolved_feature_predicates.yaml").read_text()) -assert set(resolved["predicates"]) == {"encounter", "demo_measurement"} -config = ManualBaselineConfig.load(root / "algorithm/config.json") -assert ManualBaseline(config).name == "manual_baseline" -PY -uv run pytest -q tests/test_contract.py tests/test_operations.py -printf 'Tutorial completed in %s\n' "$PWD" -# --8<-- [end:verify] diff --git a/docs/faq.md b/docs/faq.md deleted file mode 100644 index 7726567..0000000 --- a/docs/faq.md +++ /dev/null @@ -1,88 +0,0 @@ -# FAQ - -## Why can't my algorithm build or filter its own cohort? - -Because then two algorithms could be evaluated on different patients and nobody would notice. The index and -its labels come from one extraction run upstream (MEDS-DEV's `meds-dev-task` for the demo, a shared, -reviewed task bundle for full data). An algorithm predicts every requested row; rows can be left out -only under a declared exclusion policy that lists them. - -## My algorithm needs a statistic over the whole dataset. Can I compute it on all splits? - -No. Fit vocabularies, frequencies, bins and normalizers on `train` only. Computing them over all splits is -transductive leakage: it uses held-out patients' data even though it never touches a label. - -## Why do some algorithms run in two Python environments? - -Because their dependencies cannot coexist. An algorithm's training stack may pin an older `meds` (for example -femr 0.2.4 requires `meds==0.3.3`), while the ACES tooling a zero-shot adapter uses for task translation -(aces-relaxations, es-aces ≥ 0.7.3) requires `meds ≥ 0.4`. The two sides can run in separate environments -and exchange only files. The contract does not care how a command -is executed, so this is allowed; document it in the repository. - -## What does it mean that a task is "refused"? - -A zero-shot algorithm must raise rather than answer a task it cannot pose; the command fails and writes no -predictions. The common case is a direct algorithm given a task whose label is not *future-only* in -aces-relaxations' structural sense — for example MEDS-DEV's `mortality/in_icu/first_24h`, whose `gap` -window is anchored at the trigger and straddles the prediction time. A re-anchoring step makes it -posable; see [Zero-shot in practice](zero-shot.md#windows-that-straddle-the-prediction-time). -Materialized algorithms are not affected. - -## Why is the AUROC on the MIMIC-IV demo undefined (or meaningless)? - -The demo has 100 patients. For `mortality/in_icu/first_24h` the held-out split has a handful of rows and -may have no positive label at all, in which case AUROC is undefined. Training rows cannot stand in for a -pretrained algorithm: pretraining saw those patients' futures. The demo gate validates that the pipeline runs -on real data — formats, scale transitions, coverage, resources — not how good the algorithm is. Performance -comes from the full-data run. - -## My algorithm writes several files next to `predictions.parquet`. Is that allowed? - -Yes, with one rule: every parquet file in the predictions artifact must be a predictions file. MEDS-DEV -evaluates every `**/*.parquet` under the predictions directory, and the key check does the same. Store -supporting tables — a zero-shot query bundle, a coverage table — in another format such as Arrow IPC; -`relaxations.yaml` and JSON files are fine. - -## How do the tests catch label leakage and transductive fitting? - -The end-to-end check validates the original run and a fresh full-lifecycle rerun: - -- **Label leakage:** every stage runs again with evaluated outcome columns removed (all outcomes for - zero-shot). Separate input roots remain separate; permitted training/context labels are retained. - Both runs use the recorded fixture seed and deterministic settings. They must produce the same keyed - scores within the contract's tolerance. Original and rerun probabilities are checked across every shard. -- **Transductive fitting:** `meds_algorithm.conformance.signal.add_split_canaries` gives every tuning and held-out subject a - canary code that no training subject has. Your `fitted_codes(artifacts)` hook reports every code the - algorithm fitted a statistic for (vocabulary, frequencies, bins); no canary may appear in it. - -## Can a non-zero-shot algorithm use the ACES task? - -Only `predict_only` may accept optional `external_task_criteria_file` as provenance, with -`semantics_digest: null`. Other non-zero-shot commands reject it. Supervised, finetune and probe algorithms -learn the task from its labels. - -## What does `scripts/github-sync.sh` push? - -Only `runs//spec.yaml` (dataset name and counts, task, predicates digest), `runs//result.yaml` -(status, git commit and dirty state, environment, SLURM job id, per-command resource summary) and -`runs//manifests/*.yaml`, on a `runs//` branch with a draft PR. It never pushes -predictions, labels, data, checkpoints, raw logs or metrics. The template computes no metrics at all: -MEDS-DEV's evaluation step (meds-evaluation) does. - -## How do I bring template changes into an existing repository? - -Review your working tree, then run in the generated repository: - -```bash -copier update --trust -``` - -The repository's `.copier-answers.yml` records the template source, revision and answers, so Copier can -apply the template's changes as a three-way merge. Render from the Git URL rather than a local checkout so -updates work on every machine. - -## Where is the authoritative rule for X? - -In the [specification](reference/spec.md), which this site includes verbatim from `template/SPEC.md`. -Generated repositories carry the same file as their `SPEC.md`. diff --git a/docs/hooks.py b/docs/hooks.py deleted file mode 100644 index b3029d0..0000000 --- a/docs/hooks.py +++ /dev/null @@ -1,40 +0,0 @@ -"""Render the installed core specification without maintaining a second source.""" - -import json -import re -from pathlib import Path - -from jinja2 import Environment, StrictUndefined -from meds_algorithm.spec import architecture, orchestration_guide, specification, validation_guide - - -def on_page_markdown(markdown, page, **kwargs): - if page.file.src_uri == "publishing-algorithms.md": - source = Path(__file__).resolve().parents[1] / "template" / "RELEASING.md.jinja" - guide = ( - Environment(undefined=StrictUndefined) - .from_string(source.read_text(encoding="utf-8")) - .render(algorithm_name="My Algorithm", algorithm_slug="my_algorithm", package_name="my-algorithm") - ) - return markdown.replace("", guide) - if page.file.src_uri == "running.md": - return markdown.replace("", orchestration_guide()) - if page.file.src_uri == "reference/spec.md": - return markdown + "\n\n" + specification() - if page.file.src_uri == "reference/architecture.md": - return architecture().replace("(src/meds_algorithm/CONTRACT.md)", "(spec.md)") - if page.file.src_uri == "reference/tests.md": - return validation_guide() - if page.file.src_uri == "prompt-builder.md": - readme = (Path(__file__).resolve().parents[1] / "README.md").read_text(encoding="utf-8") - section = readme.split("", 1)[1].split( - "", 1 - )[0] - prompt = re.search(r"```text\n(.*?)\n```", section, re.DOTALL).group(1) - # JSON lives inside an HTML script element: escape '<' so source text cannot close it. - payload = json.dumps(prompt).replace("<", "\\u003c") - return markdown.replace( - "", - f'', - ) - return markdown diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 2203cfb..0000000 --- a/docs/index.md +++ /dev/null @@ -1,75 +0,0 @@ -# MEDS algorithm template - -The MEDS algorithm template is a [Copier](https://copier.readthedocs.io) template for packaging a clinical -prediction algorithm as a repository that anyone can run, compare, and audit the same way. You render a new -repository from it, implement your algorithm inside a fixed set of commands, and get, for free, the parts -that make algorithms comparable: a standard input and output, artifact manifests with measurements, MEDS-DEV -registration, a SLURM interface, and a staged test workflow ending in a full-data run. - -!!! note "Who this site is for" - The repository's `README.md`, `AGENTS.md` and `SPEC.md` are written as instructions for coding - agents that port algorithms. This site explains the same contract to people: algorithm implementers, - reviewers, and benchmark organizers. The [specification](reference/spec.md) remains the normative - source; where this site and the spec differ, the spec wins. - -## The picture in one diagram - -```mermaid -flowchart LR - subgraph upstream["Upstream (shared by every algorithm)"] - meds[(MEDS dataset
train / tuning / held_out)] - task[ACES task
criteria + predicates] - aces[[ACES extraction]] - index[(Task index
subject_id, prediction_time,
boolean_value)] - meds --> aces - task --> aces - aces --> index - end - subgraph repo["Algorithm repository (rendered from the template)"] - cmds["Commands of the selected profile
preprocess_data → … → predict"] - end - meds --> cmds - index --> cmds - task -. zero-shot only .-> cmds - cmds --> preds[(predictions.parquet
one row per requested key)] - preds --> eval[[meds-evaluation / MEDS-DEV]] -``` - -Everything left of the algorithm repository is built **once, upstream**: the dataset, the task definition, -and the cohort (which patients, at which prediction times, with which labels). Every algorithm receives the -same inputs and must return one prediction for every requested `(subject_id, prediction_time)`. That is -what makes results comparable. - -## Fixed by the contract, owned by the algorithm - -| Fixed by the contract | Owned by the algorithm | -|---|---| -| Inputs: a split-sharded MEDS dataset, a task index, optional dataset predicates, and (zero-shot) an ACES task | Preprocessing, featurization, tokenization | -| Six **algorithm profiles**, each a fixed sequence of commands | Architecture, framework, batching, hardware | -| Standard command arguments (`external_meds_dir`, `output_predictions_dir`, …) | Intermediate payload formats (checkpoints, embeddings, caches) | -| A `manifest.yaml` envelope on every artifact, written last and published with rollback | How the payload inside an artifact is laid out | -| Wall time and memory measurements on every command | How fast the algorithm is | -| Final predictions in the meds-evaluation schema, keyed and complete | How probabilities are computed | -| `algorithms//model.yaml` for MEDS-DEV, SLURM scripts, GitHub result sync | The command strings inside them, once finalized | - -The contract fixes **boundaries**, not methods. An algorithm can be a PyTorch transformer, a gradient-boosted -tree, an external executable or a call to a service; the template only cares that each command consumes -the right artifacts and publishes the right one. - -## Where to go next - -- **Getting started:** read [Concepts](concepts.md), [Choosing a profile](profiles.md), then the - [Workflow](workflow.md) from implementation to validation. -- **Building an algorithm:** prepare instructions with the [prompt builder](prompt-builder.md), - learn the [run commands](running.md), or follow the [fully manual example](manual-example.md). -- **Development:** explore the [core package](core-package.md) and - [what belongs in the template or shared package](shared-package-assessment.md). Use the - [migration guide](migration-v4.md) and [publishing guide](releasing.md) when maintaining packages. -- **Reference:** consult the [specification](reference/spec.md), - [tests and acceptance](testing.md), or [zero-shot guide](zero-shot.md) for the details. - -## Preview this site locally - -```bash -uv run --group docs mkdocs serve -``` diff --git a/docs/manual-example.md b/docs/manual-example.md deleted file mode 100644 index cb0ac16..0000000 --- a/docs/manual-example.md +++ /dev/null @@ -1,177 +0,0 @@ -# Fully manual example: setup to predictions - -This walkthrough generates a repository, implements its three supervised methods by hand, creates -synthetic inputs, and runs **preprocessing → training → prediction** locally. No coding agent, MEDS-DEV -installation, clinical dataset, GPU or cluster is needed. All commands appear in execution order below. - -The example is a **constant-prevalence baseline**, not a clinical algorithm reproduction. It learns one -smoothed probability from the training labels and emits it for every requested held-out key. It copies -events during preprocessing but does not use event features to predict. Additional predicates are -included to demonstrate composition and provenance, not to claim feature-dependent behavior. - -## Setup and expected result - -Use Bash on Linux/macOS or inside WSL on Windows, with **Git and uv installed** and network access for -Python/packages. Run the commands in a new workspace; the script refuses an existing directory. -`uv python install 3.11` installs the tutorial's Python, and `uv sync --extra test` installs the generated -package, core, Polars and the conformance dependencies into its `.venv`. No global Python environment -is modified. Copier and the template revision are pinned so the tutorial can be reproduced. - -Run the numbered sections below **in order, in the same Bash session**. Alternatively, expand -[All commands](#all-commands) at the end to copy the complete script, or download the -[same script](examples/manual-supervised.sh) and run -`bash manual-supervised.sh /absolute/path/to/a/new/tutorial-directory`. - -The generated package is `manual_baseline`, its class is `ManualBaseline`, and its named command is -`manual-baseline`. Each lifecycle command starts a fresh -process, using the same `config_file`. There are three training outcomes (`true, true, false`) and a -smoothing value of 1, so the resulting probability is `(2 + 1) / (3 + 2) = 0.6` for both held-out rows. - ---- - -## 1. Create the workspace and generate the repository - -Choose a new directory and render the supervised profile. These commands create `manual-baseline/` -and change into it; all subsequent paths are relative to that generated repository. - -```bash ---8<-- "docs/examples/manual-supervised.sh:setup" -``` - ---- - -## 2. Install the environment - -Install Python and the generated package, then inspect its profiles, commands and installed contract. - -```bash ---8<-- "docs/examples/manual-supervised.sh:environment" -``` - ---- - -## 3. Implement the algorithm - -The code-writing commands below intentionally replace the generated tutorial stubs. The template alone -does not contain an implemented algorithm. Leave its completion gate in place: this short tutorial does -not implement `tests/e2e.py`, the full implementation report, or the MEDS-DEV/demo acceptance tiers. -The final pytest command runs only the generated contract and operations checks; its success does not -mean a production port has passed the [complete workflow](workflow.md). - -### Typed configuration - -Define the smoothing parameter and validate it when configuration is loaded. - -```bash ---8<-- "docs/examples/manual-supervised.sh:configuration" -``` - -### Algorithm class - -Implement preprocessing, supervised training and prediction. The learned probability is saved to disk -so prediction can run in a separate process. - -```bash ---8<-- "docs/examples/manual-supervised.sh:algorithm" -``` - ---- - -## 4. Prepare synthetic inputs and dataset settings - -Create the event table, separate training and held-out label/index files, base and additional -predicates, and the dataset configuration that refers to those additions. - -```bash ---8<-- "docs/examples/manual-supervised.sh:inputs" -``` - ---- - -## 5. Run each lifecycle step - -Set the shared paths once. Each command below then starts its own process. - -```bash ---8<-- "docs/examples/manual-supervised.sh:paths" -``` - -### Preprocess the data - -Compose the feature predicates and write the prepared data artifact. - -```bash ---8<-- "docs/examples/manual-supervised.sh:preprocess" -``` - -### Train the algorithm - -Estimate the smoothed probability from the training outcomes and persist it in the algorithm artifact. - -```bash ---8<-- "docs/examples/manual-supervised.sh:train" -``` - -### Predict on the held-out index - -Load the saved probability and emit one prediction per requested key. The runner attaches evaluation -labels after scoring. - -```bash ---8<-- "docs/examples/manual-supervised.sh:predict" -``` - ---- - -## 6. Inspect and verify the outputs - -Check the two expected probabilities, the prediction schema, artifact metadata and composed predicates. -Then run the generated contract and operations checks. - -```bash ---8<-- "docs/examples/manual-supervised.sh:verify" -``` - ---- - -## What was produced - -Under `manual-meds-example/manual-baseline/` (or your chosen workspace): - -| Path | Contents | -|---|---| -| `src/manual_baseline/manual_baseline.py` | Concrete algorithm methods and profile association | -| `src/manual_baseline/config.py` | Named, typed configuration with positive smoothing validation | -| `dataset_configs/demo.yaml` | Dataset-specific settings and relative additional-predicates path | -| `inputs/meds/data/`, `inputs/labels/` | Synthetic events and the separate label/index bundle | -| `runs/manual/supervised/artifacts/data/` | Prepared events, summary, resolved feature predicates and core metadata | -| `runs/manual/supervised/artifacts/algorithm/` | Persisted learned probability and core metadata | -| `runs/manual/supervised/artifacts/predictions/` | Held-out probabilities, post-score truth and core metadata | - -Each artifact has `manifest.yaml`, `config.json` and `request.json`. The manifest records measurements, -input identities and the configuration. Because this example does not create a Git commit for the -generated implementation, its commit provenance may be unavailable; commit reviewed implementation -code before reproducible production runs. Keep input data and artifact payloads out of source control. - -The index and evaluation labels happen to share a directory in this example. Prediction reads only -keys through `request.index.read()`; the runner attaches `boolean_value` afterward. In real work, -reuse the upstream reviewed task bundle, respect all temporal cutoffs, and do not create labels inside -the algorithm. Additional feature predicates must not redefine the evaluated task. - -To rerun, choose fresh output paths. Explicit `do_overwrite=true` opts into replacing an artifact with -rollback; do not add it automatically to every command. Other profiles have different intermediate -steps: use the [profile lifecycle table](reference/spec.md#3-commands-and-algorithm-profiles) and -[per-step arguments](reference/spec.md#9-software-interfaces) when adapting this example. - ---- - -## All commands - -This is the complete script used by the sections above. Run it from a fresh workspace instead of -running it again in the directory you just created. - -??? example "All commands — complete runnable script" - - ```bash - --8<-- "docs/examples/manual-supervised.sh" - ``` diff --git a/docs/migration-v4.md b/docs/migration-v4.md deleted file mode 100644 index 602671d..0000000 --- a/docs/migration-v4.md +++ /dev/null @@ -1,103 +0,0 @@ -# Migrating to algorithm terminology and typed profiles - -Version 4 changes command names, artifact types, descriptor locations and repository dispatch. Do not -reuse version 2 or 3 artifacts by editing their manifest version: validate or rebuild their payloads against -the new contract. The template emits and reads version 4 envelopes. - -## From version 3 - -This is an intentional naming change, with no old-name aliases: - -| Previous name | Current name | -|---|---| -| `meds-model-core`, `meds_model_core` | `meds-algorithm`, `meds_algorithm` | -| `ModelConfig`, `MODEL_PROFILES` | `AlgorithmConfig`, `ALGORITHM_PROFILES` | -| `ModelRepository` (mapping-based adapter) | Replace with typed `AlgorithmRepository` | -| `SupervisedModelArtifact` (and pretrained/finetuned/probe equivalents) | `SupervisedAlgorithmArtifact` (and corresponding equivalents) | -| Request field `model` or `algorithm` for fitted prediction state | `fitted_algorithm` | -| `meds-model`, `meds-model-*` helper commands | `meds-algorithm`, `meds-algorithm-*` | -| `input_*_model_dir`, `output_*_model_dir`, `*_model` artifact types | `input_*_algorithm_dir`, `output_*_algorithm_dir`, `*_algorithm` | -| Copier `model_name`, `model_slug`, `model_description` | `algorithm_name`, `algorithm_slug`, `algorithm_description` | -| `commands.py` with `ModelAlgorithm` and generic `Config` | `.py` with `` and `Config` | -| `models//model.yaml` | `algorithms//model.yaml` | - -Set the new `algorithm_class` answer explicitly for acronyms, such as `RETAIN`. Update imports, scripts, -SLURM environment variables (`MEDS_ALGORITHM_*`), lockfiles and persisted invocation descriptions together. -Serialization records concrete class identifiers; old JSON envelopes require an explicit migration. -MEDS-DEV still owns `model.yaml`, its `models/` directory, `meds-dev-model`, `model=`, and -`{model_initialization_dir}`. Those upstream names are intentionally unchanged. - -## From older single-profile repositories - -1. Replace the Copier `profile` answer with `profiles: [, ...]`. Rename `packaged` to `predict_only`. - Keep the original source/revision metadata in `.copier-answers.yml` and review the Copier update diff. -2. Implement the selected profile ABCs and associate profiles with concrete classes in `IMPLEMENTATIONS`. - Shared methods appear once where their semantics match. -3. Rename commands according to the table below. Split previously conditional implementations into - distinct profile methods, sharing cohesive components where their semantics really match. -4. Update every invocation, manifest producer, output argument, test adapter and SLURM stage selection. -5. Move the MEDS-DEV descriptor to `algorithms//model.yaml`; add one for each declared profile. - Register them independently using `--profile`; the registered name is `__`. -6. Supply explicit split lists for inference and prediction. Supervised/fine-tuned prediction receives `input_data_dir`; probe prediction receives - `input_embeddings_dir`. Scoring and inference use `external_index_dir`, not the training-label argument. -7. Replace the global `IS_STUB` boolean with `STUB_PROFILES`. Run the acceptance suite for every profile. - Record the profile in `write_run_result(..., profile=...)`. - -| Profile | Old command | New command | -|---|---|---| -| All | `preprocess_data`, `pretrain` where present | Unchanged | -| supervised | `supervised_train`, `predict` | `train_supervised`, `predict_supervised` | -| finetune | `supervised_train`, `predict` | `train_finetune`, `predict_finetune` | -| probe | `infer`, `supervised_train`, `predict` | `infer_embeddings`, `train_probe`, `predict_probe` | -| zero_shot_direct | `predict` | `predict_zero_shot_direct` | -| zero_shot_materialized | `infer`, `predict` | `infer_trajectories`, `predict_zero_shot_materialized` | -| predict_only (formerly packaged) | `predict` | `predict_only` | - -`inference` splits into `embeddings` and `trajectories`, with matching -`input_embeddings_dir`/`output_embeddings_dir` and `input_trajectories_dir`/`output_trajectories_dir`. -Task-algorithm artifacts split into `supervised_algorithm`, `finetuned_algorithm`, and `probe_algorithm`, with matching -input/output argument names. Prediction output remains `output_predictions_dir`. - -Use Copier 9.17.1 or newer; the template uses its yield extension to generate a directory for each -selected profile. A single-profile repository may omit CLI `--profile`; a repository with multiple -profiles must select one. There is no ambiguous compatibility alias for the old generic command names. - -This revision supplies the interfaces and tests. It does not automatically migrate downstream algorithm -implementations or publish a shared runtime package. See the [package assessment](shared-package-assessment.md). - -The core package now owns the single normative `CONTRACT.md`. Generated `SPEC.md` is a pointer to the -installed package version, readable with `meds-algorithm-spec`. The template and generated projects -install the alpha from an immutable Git commit in the separate core repository; no PyPI release is required. - -Replace imports from `meds_model_contract` with `meds_algorithm` and remove the generated compatibility -package. Core supplies the registration/input-resolution CLI entry points; keep only the algorithm's own -CLI in its project configuration. Import shared fixtures and checks from `meds_algorithm.conformance`. -For the typed API, pass algorithm provenance explicitly to `AlgorithmRepository(..., repo=algorithm_root)`. -Return `E2EResult` from core's `conformance.types`, recording all external inputs; -the lifecycle checker now reruns every step with forbidden outcomes absent and fresh output paths. -Existing algorithm repositories are not migrated by this template change. - -## From mapping-based commands to typed algorithms - -Core 0.4.0a5 removes `Command` and `LegacyAlgorithmRepository`. The supported execution path is -`AlgorithmRepository` with typed requests and `StepRunner`. Migrate deliberately: - -1. Move command bodies to the selected `Algorithm` profile methods. Use their typed request fields. -2. Put algorithm settings/defaults in a frozen `AlgorithmConfig` subclass; test validation and JSON round trips. -3. Replace internal publication contexts with writes to `request.output.directory` and a returned - `PayloadMetadata`. Remove algorithm-written manifests and truth attachment; the runner owns those. -4. Extend `validate_inputs` for payload compatibility. Document any override of its default same-algorithm, - same-config rule, especially for external pretrained artifacts or legacy manifests without config. -5. Route the CLI and end-to-end adapters through `AlgorithmRepository`/`StepRunner`. Verify saved - requests/configuration and fitted artifacts work in a fresh process. - -See [architecture and UML](reference/architecture.md). No private algorithm migration is included here. - - -## Fitted prediction requests in core 0.4.0a5 - -`PredictSupervisedRequest`, `PredictFinetuneRequest` and `PredictProbeRequest` now name their saved fitted -artifact `fitted_algorithm`, distinguishing it from the executing Python algorithm instance. Their JSON -schema version is 2; version 1 envelopes are rejected. Reconstruct requests with the current typed API -rather than editing version numbers. External `input_*_algorithm_dir` names are unchanged. Fitted input -manifests must contain the complete resolved config; missing historical fields are no longer filled in. diff --git a/docs/profiles.md b/docs/profiles.md deleted file mode 100644 index e8662a2..0000000 --- a/docs/profiles.md +++ /dev/null @@ -1,67 +0,0 @@ -# Choosing profiles - -A profile describes an algorithm's lifecycle. A repository may declare several profiles and implement them -in one package. Choose them with Copier's `profiles` multiselect, or supply a data file: - -```yaml -profiles: [finetune, probe, zero_shot_direct] -``` - -The [prompt builder](prompt-builder.md) supports automatic selection from paper/code evidence or an -explicit selection of several profiles before repository generation. - -The [canonical lifecycle table](reference/spec.md#3-commands-and-algorithm-profiles) lists the exact steps. - -Only preprocessing and pretraining share command names. They may share artifacts when input identities, -configuration, payload format and training scope match. Selecting two profiles does not automatically -make their artifacts compatible. - -| Profile | Use when | -|---|---| -| `supervised` | Learning a task-specific algorithm directly from the dataset's training labels. | -| `finetune` | Updating a pretrained encoder together with a task-specific head. | -| `probe` | Fitting a task-specific head on frozen encoder representations. | -| `zero_shot_direct` | Translating an ACES task into direct algorithm queries and decoding probabilities without labels. | -| `zero_shot_materialized` | Generating task-independent futures, then evaluating the task on history plus those futures. | -| `predict_only` | Preprocessing then applying a supplied fixed algorithm or an in-context learner, without a training command. | - -`predict_only` is the renamed packaged profile. It does not mean probe training. In-context learners may -read explicitly selected train/tuning examples; fixed scores need no labels. Neither may read evaluated -labels before its probabilities are final. - -## Select a profile when running commands - -Each invocation selects one of the repository's declared profiles. The executable is named after your -algorithm's slug, with underscores replaced by hyphens: `algorithm_slug: my_algorithm` creates the -command `my-algorithm`. Substitute your own command name below. - -From the generated repository's root, with the `probe` profile declared: - -```bash -uv sync --extra test - -# List the profiles implemented by this repository. -uv run my-algorithm profiles - -# List the commands in the probe lifecycle. -uv run my-algorithm commands --profile probe - -# Register its descriptor in an existing MEDS-DEV checkout. -uv run meds-algorithm-add-to-meds-dev \ - --meds-dev /path/to/MEDS-DEV --name my-algorithm --profile probe -``` - -Replace `/path/to/MEDS-DEV` with your checkout. Registration copies -`algorithms/probe/model.yaml` into MEDS-DEV under `my-algorithm__probe`. -Here `--name my-algorithm` chooses the registration name; it does not rename the executable. -For SLURM, select the profile with `PROFILE=probe`; see [Running an algorithm](running.md) -for input paths, dry runs and execution settings. - -The probe's `infer_embeddings` stage materializes keyed representations without labels. `train_probe` -fits a head on training representations, and `predict_probe` applies it to explicit evaluated embeddings. -Supervised/fine-tuned prediction instead takes `input_data_dir` and the fitted algorithm. Neither dependency -is assumed to disappear just because training recorded its path. - -The [software contract](reference/spec.md#9-software-interfaces) gives every command's arguments, artifact type, label -access, class responsibilities, compatibility checks, and acceptance requirements. See -[migration](migration-v4.md) for an existing repository. diff --git a/docs/prompt-builder.md b/docs/prompt-builder.md deleted file mode 100644 index b035ce8..0000000 --- a/docs/prompt-builder.md +++ /dev/null @@ -1,88 +0,0 @@ -# Implementation prompt builder - -Prepare instructions for Claude or another coding agent. Choose paper/code sources, a **new local or -GitHub repository**, and automatic or explicit profile selection. Evaluation tasks, if supplied, must -already have **labels and task configs**. This form assembles text locally; it does not read your files, -contact GitHub, upload inputs or run an agent. - -The generated prompt uses the same maintained instructions as the [static workflow prompt](workflow.md#copyable-algorithm-implementation-prompt). -You can edit the result before copying. Demo and full-data execution retain their human review gates. - -
- - -
-
-1. Sources - -
- -
-
- -
-
-
-2. New repository - - - -
-
-3. Profiles - -

Automatic selection happens in the implementation agent, before generation. It may select several profiles when the sources support them.

- -
-
-4. Dataset and prepared tasks - - - -

The prompt does not ask the agent to invent tasks or extract labels. Missing or inconsistent inputs defer only the dependent evaluation.

-
-
-5. Scope and constraints - -

Preparing for full evaluation does not authorize a demo, dataset download or cluster run. The existing review gates still apply.

- -

Off by default. The agent normally asks before implementing a major unresolved scientific choice, such as unspecified feature construction; routine defaults may proceed with documentation. When enabled, provisional design choices must be recorded and reviewed before claiming faithful reproduction. Leakage, cohort/target definitions, evaluation validity and execution approvals still require resolution.

- -
-
-
-

Fill in the inputs, then generate your prompt.

- -
-
diff --git a/docs/publishing-algorithms.md b/docs/publishing-algorithms.md deleted file mode 100644 index 84e488a..0000000 --- a/docs/publishing-algorithms.md +++ /dev/null @@ -1,13 +0,0 @@ -# Publishing an implemented algorithm - -Newly generated repositories include package metadata, a distribution check, a manual publishing -workflow, and their own `RELEASING.md`. Copier asks for `package_name`, `repository_url`, and -`license_expression`; the latter two may remain blank during implementation, but must be completed -before publishing. Licensing remains the algorithm author's choice. - -The guide below is rendered directly from the generated guide with example names, so these instructions -are maintained in one place. For an existing generated repository, use `copier update` and review its -changes, especially existing metadata and CI customizations. The current published generator 0.4.0a2 -predates this support; use the template revision containing this change until the next generator release. - - diff --git a/docs/reference/api.md b/docs/reference/api.md deleted file mode 100644 index 3e999a5..0000000 --- a/docs/reference/api.md +++ /dev/null @@ -1,44 +0,0 @@ -# Contract API - -The [normative software interfaces](spec.md#9-software-interfaces) define the public classes, arguments, -label-access rules and artifact compatibility requirements. Import them directly from `meds_algorithm`. -There is no generated compatibility package. - -| Module | Responsibility | -|---|---| -| `algorithms` | Algorithm/profile ABCs and ordered lifecycles | -| `requests` | Typed per-step inputs and CLI field mappings | -| `configuration`, `serialization` | Algorithm-owned config base, strict versioned JSON round trips | -| `runner` | Shared execution, validation, staging, measurements and publication | -| `contracts.commands` | Derived compatibility views and legacy dispatch | -| `artifacts` | Manifests, publication with rollback, upstream references and run results | -| `runtime` | Explicit algorithm provenance, memory measurement and subprocess execution | -| `data` | Strict split selection, key-only index reads and permitted context targets | -| `tasks.spec` | Task identity and relaxation ledgers | -| `evaluation.predictions` | Keyed probabilities and post-score truth attachment | -| `integrations.meds_dev` | Per-profile registration | -| `conformance` | Reusable assertions, synthetic fixtures and explicitly selected integration tests | - -See the [architecture and UML](architecture.md) for profile inheritance and request/artifact types. -Pass the algorithm checkout as `repo=` to `AlgorithmRepository` or `StepRunner`; unavailable provenance is -recorded as null. Algorithm methods return `PayloadMetadata`, while the runner returns a typed published -artifact. Low-level `measured_artifact` remains for legacy callers; new methods must not publish twice. -Use explicit `splits` for outcome attachment. Install the `data` extra for dataframe helpers and the -`conformance` extra for shared tests. The base package does not import data or algorithm frameworks. - -`meds-algorithm-spec` prints the installed specification. `meds-algorithm-resolve-input -` resolves a recorded upstream path and checks its envelope type; the consumer still -validates scientific compatibility. Core also supplies `meds-algorithm-add-to-meds-dev`. - -Algorithm-owned adapters remain `run_e2e(tmp_path, *, profile, **inputs)`, `fitted_codes(artifacts)`, and -`prepare_meds_dev_run(meds_dev, tmp_path, *, profile)`. The shared lifecycle check reruns the selected -profile with evaluated labels removed and fresh outputs; adapters must honor those input overrides, -record and apply the fixture seed, and produce reproducible keyed scores. Use `read_predictions` from -`conformance.assertions` to validate all shards. For separate context/evaluation directories, supply -`evaluation_index_dir` to `read_context_labels`. `conformance.reports.assert_implementation_report` -validates shared evidence and completed profiles independently of unfinished profiles. - -`conformance.cases.AlgorithmCase` connects those adapters and representative configurations to -`conformance.suite.AlgorithmConformanceTests`. Generated tests inherit the suite, with a session-scoped -`algorithm_case` fixture and a `profile` fixture parametrized from repository registration. See the -[canonical acceptance inventory](tests.md#downstream-acceptance-suite) for each check and its purpose. diff --git a/docs/reference/architecture.md b/docs/reference/architecture.md deleted file mode 100644 index 4b19065..0000000 --- a/docs/reference/architecture.md +++ /dev/null @@ -1,3 +0,0 @@ -# Architecture - -This page is rendered from the pinned core package; do not duplicate the UML here. diff --git a/docs/reference/manifest.md b/docs/reference/manifest.md deleted file mode 100644 index bea4f45..0000000 --- a/docs/reference/manifest.md +++ /dev/null @@ -1,19 +0,0 @@ -# Reading artifact manifests - -The [normative manifest schema](spec.md#4-intermediate-artifacts) and -[measurement schema](spec.md#6-measurements) live in the core contract. This page does not duplicate -their field tables. - -When comparing runs, check the producer and payload format, configuration digest, source revision, -input content identities, and task semantics before comparing measurements. A configuration hash alone -does not identify the dataset or weights. A copied path is provenance, not proof of compatibility. - -`null` means not measured or not applicable; zero is an observed value. Sampled live process-tree -memory and scheduler peak memory measure different things. Coverage counts are diagnostics; compare -actual prediction keys with the requested index. - -Core's runner uses `measured_artifact` for publication and measurements. Pass `repo=algorithm_root` explicitly -to identify the algorithm checkout. Overwrite preserves a backup until publication succeeds; a failed -replacement restores it, or reports its recovery path if restoration also fails. New outputs use one -rename; overwrite uses two and can briefly hide the destination. Prefer immutable artifact paths for -concurrent readers. See the [core package](../core-package.md) for implementation ownership and limits. diff --git a/docs/reference/spec.md b/docs/reference/spec.md deleted file mode 100644 index bd6591f..0000000 --- a/docs/reference/spec.md +++ /dev/null @@ -1,6 +0,0 @@ -# Specification (normative) - -This page includes the same contract source shipped in the core wheel. Generated algorithm repositories -refer to their installed core version rather than copying the specification. - - diff --git a/docs/reference/tests.md b/docs/reference/tests.md deleted file mode 100644 index 9cb6a28..0000000 --- a/docs/reference/tests.md +++ /dev/null @@ -1,3 +0,0 @@ -# Shared-package tests - -This page is rendered from the installed core package; do not duplicate its catalogue here. diff --git a/docs/releasing.md b/docs/releasing.md deleted file mode 100644 index 9d1ac7e..0000000 --- a/docs/releasing.md +++ /dev/null @@ -1,4 +0,0 @@ -For an implemented algorithm repository, follow [Publishing an algorithm](publishing-algorithms.md). -This page is for maintainers releasing the shared core and template generator themselves. - ---8<-- "RELEASING.md" diff --git a/docs/running.md b/docs/running.md deleted file mode 100644 index 8e18c04..0000000 --- a/docs/running.md +++ /dev/null @@ -1,130 +0,0 @@ -# Running an algorithm - -A generated repository exposes one command-line entry point, a MEDS-DEV descriptor, and a SLURM -interface. All three run the same commands with the same standard arguments. - -For a copyable sequence from an empty directory to verified predictions, start with the -[fully manual example](manual-example.md). It includes setup, implementation code and synthetic inputs. - - - -## Individual step commands - -Run these commands from the generated repository after `uv sync --extra test`. The examples assume -`algorithm_slug: my_algorithm`, which installs the command `my-algorithm`; replace it with your own -algorithm's command (the slug with underscores changed to hyphens). - -Pass `config_file=/absolute/path/dataset_configs/mimic_iv.yaml` to each lifecycle invocation to select -algorithm settings, including optional `additional_predicates_file`. See [feature additions](concepts.md#additional-feature-predicates-per-dataset). -For MEDS-DEV, add the same `config_file=...` argument to each command in the selected descriptor; use a -path accessible inside its execution environment. MEDS-DEV still supplies the base `{predicates_path}`. -For SLURM, set `ALGORITHM_CONFIG_FILE` to an absolute configuration path; generated `stage_args` passes -it to every selected step. No dataset is inferred from a directory name, and no upstream file is edited. - -```bash -uv run my-algorithm profiles -uv run my-algorithm commands --profile zero_shot_direct -uv run my-algorithm predict_zero_shot_direct --profile zero_shot_direct \ - input_data_dir=runs/x/data input_pretrained_algorithm_dir=runs/x/pretrained \ - external_index_dir=/task/index external_task_criteria_file=/task/criteria.yaml \ - splits=[held_out] output_predictions_dir=runs/x/predictions -``` - -Multiple profiles require explicit selection; a single-profile repository may omit `--profile`. -Arguments are `key=value`; booleans and numeric values are decoded, and `splits=[train,tuning]` is a list. -Inference and prediction require a nonempty explicit split list. Additional algorithm settings must be -validated and included in the resolved configuration digest. See the -[per-step argument table](reference/spec.md#9-software-interfaces). - -Scoring and inference take `external_index_dir` (keys only). Training and optional in-context examples -use `external_labels_dir`. `external_evaluation_labels_dir` is optional and only attaches outcomes after -scores are fixed. The two directories may physically share files; their reader roles remain separate. - -Supervised/fine-tuned prediction requires `input_data_dir`; probe prediction requires -`input_embeddings_dir`. MEDS-DEV resolves recorded upstream paths into explicit CLI arguments with -`meds-algorithm-resolve-input`; SLURM passes the chosen artifact paths directly. - -## MEDS-DEV - -`algorithms//model.yaml` is the [MEDS-DEV](https://github.com/Medical-Event-Data-Standard/MEDS-DEV) descriptor. Its -`unsupervised` / `supervised` × `train` / `predict` slots hold command strings with these template -variables: - -| Variable | Filled by MEDS-DEV with | -|---|---| -| `{dataset_dir}` | the MEDS dataset | -| `{labels_dir}` | the task's labels (the index) | -| `{output_dir}` | this stage's output directory | -| `{model_initialization_dir}` | the previous stage's `{output_dir}` | -| `{split}` | the split to predict (`held_out` in full mode) | -| `{predicates_path}` | the dataset's predicates file (`predicates_path` argument; MEDS-DEV PR #325) | -| `{task_criteria_path}` | the task's ACES criteria: the `task_criteria_path` argument, else the registered criteria file of `task_name` (MEDS-DEV PR #330) | - -Every artifact gets its own subdirectory of the MEDS-DEV run directory: `data/`, `pretrained/`, `algorithm/`, -`embeddings/` or `trajectories/`, `predictions/`. Nothing is written to `{output_dir}` itself, because MEDS-DEV keeps its own -`cmd.sh` and `.done` marker there and artifacts are published by publishing their destination -directory. Artifacts are never nested inside one another, so runs over different indexes or splits cannot -overwrite each other's outputs. - -MEDS-DEV evaluates every `**/*.parquet` under the predictions directory with meds-evaluation 0.0.3, so -every parquet file there must be a predictions file (see the [FAQ](faq.md)). - -Register a completed repository with MEDS-DEV by copying its descriptor into a MEDS-DEV checkout: - -```bash -uv run meds-algorithm-add-to-meds-dev --meds-dev /path/to/MEDS-DEV --name my_algorithm --profile probe -``` - -This registers `algorithms/probe/model.yaml` as `my_algorithm__probe`. Register each desired profile separately. - -The `meds_dev` test tier -provisions MEDS-DEV at a pinned commit that supplies both passthroughs (currently the head of PR #330, which -builds on PR #325); set `MEDS_DEV_REF` to use another revision. A checkout supplied through -`MEDS_DEV_DIR` is capability-checked rather than silently used; only zero-shot repositories require -`{task_criteria_path}`. - -## SLURM - -`slurm/config.sh` is the only SLURM file meant for routine edits: partitions, time limits, CPUs, memory, -GPUs, and `stage_args`, which prints each command's `key=value` arguments from environment variables -(`MEDS_ROOT`, `INDEX_DIR`, `LABELS_DIR`, `TASK_CRITERIA_FILE`, `RUN_DIR`). - -```bash -$EDITOR slurm/config.sh -PROFILE=probe ./slurm/submit.sh --dry-run # prints every sbatch call and each command's arguments; changes nothing -PROFILE=probe ./slurm/submit.sh # submits the profile as dependent jobs -``` - -- `stage_args` covers the declared union; submission validates and lists only the selected profile's commands. -- Each command is one job; later commands depend on earlier ones (`afterok`). `preprocess_data` runs on the - CPU partition, the others on the GPU partition. -- Submission refuses a dirty working tree, so every cluster run corresponds to a commit. `--dry-run` only - warns, so a run can be reviewed before it is committed. -- Artifacts land under `runs///artifacts`. - -## Run results and GitHub sync - -`write_run_result(..., profile="probe")` assembles a run's structured evidence under `runs//`, and - -```bash -scripts/github-sync.sh -``` - -commits exactly these files on a new `runs//` branch, pushes that branch, and opens a draft -PR for it. It changes nothing else. - -| Pushed | Contents | -|---|---| -| `runs//spec.yaml` | the dataset (name and counts as given), the task, and the predicates file's path and digest | -| `runs//result.yaml` | status; git commit and dirty state; environment (host, platform, Python, CPU count, SLURM job id); per-command resource summary | -| `runs//manifests/*.yaml` | a copy of every command's `manifest.yaml` | - -| Never pushed | Why | -|---|---| -| predictions | they are artifacts under `runs///artifacts`, not evidence files | -| labels, datasets | patient data stays where it is | -| checkpoints and other artifact payloads | large and algorithm-owned | -| raw logs, credentials | may contain anything | -| metrics (AUROC, …) | the template computes no metrics; MEDS-DEV's evaluation step (meds-evaluation) does | - -If the push fails, the result stays committed locally on the run branch. diff --git a/docs/shared-package-assessment.md b/docs/shared-package-assessment.md deleted file mode 100644 index e6ef40f..0000000 --- a/docs/shared-package-assessment.md +++ /dev/null @@ -1,42 +0,0 @@ -# Template and shared package - -The template should generate repository structure, algorithm command stubs, profile descriptors, test -adapters, CI and cluster configuration. Executable infrastructure that needs coordinated bug fixes -belongs in the versioned `meds-algorithm` dependency. The [shared core package](core-package.md) now -contains the reusable template infrastructure and conformance helpers, and owns the canonical -specification. It is available from its public Git repository; downstream migrations remain separate. - -An inspection of 12 local algorithm-repository snapshots found 5,087 lines across their copied contract -modules. Four modules are byte-identical in all 12: `contract.py` (86 lines), `results.py` (76), -`meds_dev.py` (31), and `__init__.py` (16). `manifest.py` has four variants across groups of 5, 3, 2 and 2 -repositories. These are physical source-line counts, not a claim that every line is safely extractable. -The private remotes could not be refreshed during this assessment; conclusions concern the inspected -local `origin/main` snapshots, not verified current remote heads. - -| Destination | Candidates | Qualification | -|---|---|---| -| Core runtime | Profile ABCs, typed requests/configuration, shared runner, manifest schema and compatibility checks, provenance, artifact publication, wall-time and process-tree measurements, structured results, MEDS-DEV registration | Core owns these implementations, including replacement rollback and worker-thread child discovery; downstream algorithms still need migration. Keep GPU/framework integrations optional. | -| Optional conformance package | Prediction schema/key checks, integration provisioning, train-only canaries, generic synthetic signal fixture | `meds_algorithm.conformance.meds_dev` and `meds_algorithm.conformance.signal` are identical in 11 repositories. Keep algorithm execution and feature inspection as adapters. | -| Shared data-boundary helpers | Explicit split selection, label-blind index reading, uniqueness/conflict validation, keyed prediction writing | Existing helpers disagree on duplicate and split behavior. Specify one fail-closed policy before extraction. | -| Family repositories | MOTOR FT/LP backend/provenance utilities; MEDS-Tab large/LR tabularization and runtime; MEDS-EIC-AR and supervised variant tokenization/I/O/runtime | Prefer one repository per family with multiple profiles and shared internal modules; keep algorithms outside the generic core. | -| Template/algorithm repository | Algorithm architectures, objectives, feature semantics, task translators, pooling, trajectory generation, tuned defaults, concrete integration adapters | Their apparent similarity does not make them backend-neutral. | - -Examples of exact family-level copies include MEDS-Tab runtime (159 lines), MOTOR FT/LP provenance -(86 lines), and MEDS-EIC-AR I/O (224 lines). Additional identical functions occur across algorithm families, -including dataset identity and artifact checks. Some dataset-identity helpers hash only paths and file -sizes, which is insufficient to prove content equality. A common implementation must first resolve -that semantic problem rather than preserve it more widely. - -## Update algorithm - -1. Publish the audited runtime with a documented supported contract version and optional test extras. -2. Pilot two structurally different algorithms and test a multi-profile family repository before migrating all. -3. Replace copied contract/runtime modules with pinned package dependencies. Keep the import - namespace stable where possible, and verify installed package discovery cannot select a stale local copy. -4. Use dependency-update PRs in every private algorithm repository to move runtime versions and rerun its - conformance adapters. Use Copier updates for changes to scaffolding and workflow files. -5. Treat contract-major upgrades as explicit migrations, not automatic cross-repository rewrites. - -This avoids maintaining an updater that copies Python implementation files into every algorithm. One -shared-package release makes a fix available everywhere; each repository adopts it through a visible, -tested dependency change. Algorithm implementations retain their own release and scientific-validation gates. diff --git a/docs/testing.md b/docs/testing.md deleted file mode 100644 index 9ed65a0..0000000 --- a/docs/testing.md +++ /dev/null @@ -1,10 +0,0 @@ -# Tests and acceptance - -The following catalogues separate template checks from algorithm acceptance checks. -The [shared acceptance inventory](reference/tests.md#downstream-acceptance-suite) describes the eight -inherited checks. Generated repositories keep only fixture wiring, execution adapters and scientific -tests. See also [Shared-package tests](reference/tests.md) for tests of the runtime and suite itself. - ---8<-- "TESTING.md" - ---8<-- "template/docs/TESTING.md" diff --git a/docs/workflow.md b/docs/workflow.md deleted file mode 100644 index 38c3304..0000000 --- a/docs/workflow.md +++ /dev/null @@ -1,146 +0,0 @@ -# Workflow: from render to full-data run - -A port moves through a fixed sequence of gates. Each automated gate must pass before the next starts, with -human reviews before the demo and before full-data execution. The generated repository's -`docs/IMPLEMENTATION_GUIDE.md` is the authority for the ordered gates and their evidence; this page explains -what each gate is for. - -```mermaid -flowchart TD - r[1. Supply sources and choose profiles
manually or through the agent] --> i[2. Agent: implement commands,
tests/e2e.py, model.yaml, slurm/config.sh] - i --> g1[3. Agent: local gate
uv run pytest -rs] - g1 --> g2[4. Agent: MEDS-DEV gate
uv run pytest -m meds_dev -rs] - g2 --> h1{{5. Pre-demo human review
source fidelity, predicates, demo plan}} - h1 --> g3[6. MIMIC-IV demo gate
uv run pytest -m real_data -rs] - g3 --> h2{{7. Demo human review
target dataset, task bundle, resources}} - h2 --> c[8. Commit and push
clean tree, immutable SHA] - c --> f[9. Full-data run via SLURM
shared reviewed task bundle] - f --> rep[10. Final report +
scripts/github-sync.sh RUN_ID] -``` - -## 1. Render - -The [implementation prompt builder](prompt-builder.md) can ask the agent to create a **new local or -GitHub repository**. Supply paper/code references, choose profiles automatically or explicitly, and -optionally identify an already prepared task bundle with labels and configs. The agent inspects sources -and selects profiles before rendering. To render manually instead: - -```bash -uv tool install copier -copier copy --trust https://github.com/McDermottHealthAI/MEDS_algorithm_template ../my-meds-algorithm -``` - -Copier asks for the algorithm name and slug, the **profiles**, whether MEDS-DEV commands should pass -predicates, and the implementation source (paper and/or repository). The answers are recorded in -`.copier-answers.yml`, so `copier update` can bring later template changes in. - -The generated commands are deliberately stubs: `STUB_PROFILES = set(PROFILES)` in `src//.py` makes the -end-to-end tests skip with an explicit `algorithm_stub` reason until the real algorithm runs. - -## 2. Implement - -### Using an agent for automated implementation - -Use the [implementation prompt builder](prompt-builder.md) to prepare input for a coding agent such -as Claude. The prompt supports paper references, code/repositories, or both. Its destination is a new -local repository or a new GitHub repository with an explicit local checkout and visibility. -Automatic profile selection must follow source evidence; manual selection may include several profiles. -The agent records the choice before generation, then implements every selected profile. - -By default, the agent asks for confirmation before implementing a material unresolved scientific choice -(for example, unspecified featurization). Routine defaults such as a missing learning rate may proceed -with a documented rationale unless central to the paper's claim. The builder's **Exploratory mode** -checkbox is unchecked by default: enabling it permits provisional design assumptions, which must be -recorded and reviewed before claiming faithful reproduction. In both modes, unresolved leakage, -cohort/target definitions or evaluation validity block dependent work. Independent work can continue. - -Evaluation tasks, when supplied, are already ready: labels plus task configs, bundle identity and dataset -context. The builder does not ask the agent to invent tasks or extract new labels. Missing tasks defer -only the corresponding evaluation. Choose the intended work scope explicitly; demo and full-data runs -still require their existing human approvals. The [static prompt](#copyable-algorithm-implementation-prompt) -below is the same maintained source used by the builder. - -The template supplies instructions, interfaces and executable checks. It does **not** launch an agent -or run an unattended implementation service. The prompt works as ordinary agent input and includes -the Ponytail implementation principles; installing a separate agent plugin is not required. - -| Stage | Agent's work | Human's responsibility | -|---|---|---| -| Handoff | Read `AGENTS.md`, `SPEC.md`, `README.md` and `docs/IMPLEMENTATION_GUIDE.md`; inspect the paper, source code and configurations; identify missing evidence. | Supply the intended source, profiles and dataset context; resolve scientific choices the source leaves ambiguous. | -| Implementation | Implement the algorithm and every declared profile's commands, descriptors, fixture adapter and primary-behavior tests. Reuse `meds-algorithm` for shared contract behavior. Record source fidelity and deviations in `IMPLEMENTATION_REPORT.md`. | Resolve missing inputs or consequential departures from the source when the agent raises them. | -| Automated verification | Run the local and MEDS-DEV gates, inspect failures, fix their causes and rerun the affected checks. Report exact commands, results, skips and remaining limitations. | Review the evidence, source fidelity, predicates and demo plan at the pre-demo gate. | -| Approved demo | After approval, run the MIMIC-IV demo gate and report execution, coverage and resource evidence. | Review the demo results and approve the full dataset, task bundle, access and resource plan separately. | -| Approved full run | Commit and push the completed implementation, run the approved SLURM job from its immutable commit, and prepare the final report and permitted structured run evidence. | Assess the scientific results and review the implementation and run evidence before merging. | - -Within the implementation and verification stages, the agent should continue the edit–test–inspect -cycle without asking for approval for each routine change. It must surface missing source material, -credentials or task bundles as blockers, and wait at the two human review gates before the corresponding -data run. If work spans several sessions, the next agent reads the repository's implementation report -and recorded evidence, identifies the last completed gate, and resumes there. Approval must be explicit; -a passing test or an agent-written report does not grant it. - -Tests must exercise the real algorithm behavior, including negative controls. The agent must not make a gate -pass by weakening checks, substituting fixture-only behavior, or hiding an unfinished profile with a -stub skip. Passing automated checks establishes the properties listed below; it does not independently -establish fidelity to the paper or scientific validity. Keep the detailed instructions in the shared -prompt and generated implementation guide rather than maintaining a separate prompt for each agent. - -### Typed implementation and audit trail - -The generated algorithm owns its named class and frozen configuration (for example, `RETAIN` and -`RETAINConfig` in the `retain` package). Profile ABCs require its -methods; typed request objects carry artifact references and permitted inputs. The shared runner owns -validation, measurement, staging, metadata and publication. Agents should implement cohesive algorithm -components with explicit dependencies, without mutable global runtime state, unnecessary wrappers or -copies of core utilities. Test config/request serialization and execution in a fresh process. See the -[shared architecture and UML](reference/architecture.md) for the implemented design. - -### Implementation deliverables - -Implement every command in the union of declared profiles, `tests/e2e.py`, `algorithms//model.yaml`, and `slurm/config.sh`. In -`tests/e2e.py`, `run_e2e` runs the real profile on a small fixture to which it applies -`meds_algorithm.conformance.signal.add_split_canaries`, and returns the artifacts, the evaluated index and splits, the exact -external inputs, deterministic fixture seed and the canaries; `fitted_codes` reports every code the algorithm fitted a population -statistic for; `prepare_meds_dev_run` configures the MEDS-DEV run. Complete `tests/test_primary_behavior.py`, -which fails on purpose until it shows the algorithm's claimed behavior on a known signal, with a negative -control. Record every source element as ported, adapted or omitted in `IMPLEMENTATION_REPORT.md`. - -## What each gate proves - -| Gate | Proves | Does not prove | -|---|---|---| -| **Local** (`pytest -rs`) | the contract holds (command registry, manifests and `config_digest`, publication and rollback, measurements, key coverage, prediction schema), the real profile runs end to end on a synthetic fixture with no evaluated-split label read across a fresh full-lifecycle rerun (no label at all for zero-shot) and no statistic fitted on tuning or held-out subjects, and the primary behavior appears | anything about real data | -| **MEDS-DEV** (`-m meds_dev`) | the package installs in MEDS-DEV's isolated environment and the `algorithms//model.yaml` command strings run | scale or real-data behavior | -| **Pre-demo review** (human) | the port is faithful to the source, predicates are interpreted correctly, the demo plan is sound | — | -| **MIMIC-IV demo** (`-m real_data`) | the pipeline survives real data: serialization, scale transitions, resources, key coverage on MEDS-DEV's `mortality/in_icu/first_24h` with MEDS-DEV's MIMIC-IV predicates | **algorithm quality**: the demo validates execution only (its held-out split is tiny and may have no positives) | -| **Demo review** (human) | the evidence is sufficient; target-dataset, task and predicate compatibility; access and resources for the full run | — | -| **Full data** (SLURM) | the scientific result on the shared task bundle | — | - -A plain `pytest` run never clones MEDS-DEV or downloads data: the `meds_dev` and `real_data` tiers are -opt-in markers. Set `MEDS_DEV_DIR` to reuse a MEDS-DEV checkout and `MEDS_DEMO_DIR` to reuse a built -demo. - -## The full-data run - -- The cluster runs an **immutable commit** from a clean checkout: `slurm/submit.sh` refuses to submit from - a dirty tree. -- The tasks come from a shared, reviewed task bundle for the target dataset, built once upstream: clinical tasks defined and extracted with [ACES](https://eventstreamaces.readthedocs.io/), or randomly sampled code-by-horizon tasks (generated with [meds-random-task-sampler](https://github.com/florian6973/meds-random-task-sampler) and selected with [meds-task-selection](https://github.com/florian6973/meds-task-selection)), containing each task's definition and its per-task index and labels. Zero-shot runs additionally need each task's ACES criteria. - Every algorithm compared on a dataset uses the same bundle, and the bundle stays outside Git. -- Record the dataset name and revision, predicate provenance, bundle location, the commit of the tool that built the bundle, - a digest of its task definitions, algorithm commit, configuration and job IDs. - -## Reporting results - -`scripts/github-sync.sh ` pushes only the run's structured evidence (`spec.yaml`, `result.yaml` and -the command manifests) on a `runs//` branch and opens a draft PR. Predictions, labels, data, -checkpoints, raw logs and metrics are never pushed; metrics come from MEDS-DEV's evaluation step. See -[Running an algorithm](running.md#run-results-and-github-sync) for the exact list. - ---8<-- "README.md:implementation-prompt" - -## Optional profile-runner prototype - -After implementation and the required review gates, the [profile runner](running.md#profile-runner-prototype) -can orchestrate local or SLURM execution from `configs/runs/run.yaml`. Start with `--dry-run` to inspect -all step arguments and resources. It changes how steps are launched; it does not bypass acceptance tests, -source-fidelity reviews or dataset/cluster approvals. Per-step commands remain the MEDS-DEV interface. diff --git a/docs/zero-shot.md b/docs/zero-shot.md deleted file mode 100644 index 04c23c0..0000000 --- a/docs/zero-shot.md +++ /dev/null @@ -1,202 +0,0 @@ -# Zero-shot in practice - -A zero-shot algorithm answers a downstream task without fitting on that task's labels. This guide explains -the two [zero-shot profiles](profiles.md), task translation, and how to read their results. -The core contract owns the normative [task interface](reference/spec.md#24-task-specification-zero-shot-profiles), -[prediction requirements](reference/spec.md#31-zero-shot-prediction), and -[per-command arguments](reference/spec.md#step-arguments-and-artifacts). Examples here illustrate those rules. - -## Who builds what - -| Product | Owner | -|---|---| -| Cohort, prediction index and evaluation labels | Upstream task extraction, shared across algorithms | -| Algorithm query and any task approximations | The algorithm's task adapter | -| Probabilities for the supplied index | The algorithm's prediction command | - -The task definition tells the algorithm what to predict for the supplied rows. It is not permission to -rebuild the cohort: doing so could change the population being compared or expose evaluation labels. - -## What a zero-shot algorithm receives - -```mermaid -flowchart LR - crit[ACES criteria
external_task_criteria_file] --> pr - pred[Dataset predicates
external_predicates_file] --> pr - idx[(Index
external_index_dir)] -- keys only --> pr - data[(MEDS data /
algorithm's own artifacts)] --> pr - pr[zero-shot prediction command] --> out[(predictions.parquet)] - pr --> led[relaxations.yaml] -``` - -| Input | Why | -|---|---| -| The **ACES task** (criteria + predicates) | without labels, this is the only way to know *what* to predict | -| The **index**, keys only | the rows to predict, built upstream; read with `read_index`, which never loads a label column | -| The algorithm's artifacts (and, for materialized algorithms, the raw MEDS dataset) | the history to predict from | - -The task is the *original* task; adapting it to what the algorithm can answer is the algorithm's job. -The [MEDS-DEV integration](#meds-dev-integration) must supply it as `{task_criteria_path}`. - -Criteria and predicates jointly identify a task. Criteria can leave dataset-specific event codes open; -the predicates file supplies those bindings. Changing the bindings changes the task's meaning, even -when its criteria are unchanged. The task semantics digest therefore covers both files. - -## Direct queries or generated trajectories - -| | `zero_shot_direct` | `zero_shot_materialized` | -|---|---|---| -| Algorithm behavior | Answers a query, such as a hazard or code-in-window probability | Generates possible futures | -| Typical example | A time-to-event or code-query algorithm | An autoregressive EHR generator | -| Prediction | Translates the task into a query, then decodes algorithm outputs | Evaluates the task on history plus generated futures | -| Main approximation to inspect | Query expressiveness and decoding assumptions | Sampling, truncation and generation policies | - -Only the prediction command is task-conditioned. In `zero_shot_materialized`, `infer_trajectories` never receives -the task and records `semantics_digest: null`. Reuse across tasks still requires compatible history, -index, generation settings, and sufficient trajectory coverage for the requested windows. - -For a direct algorithm, an encode → algorithm → decode adapter is a useful internal design: encode the task -into a supported query, run the algorithm, and decode keyed probabilities. Keep query and decoding evidence -with the predictions so reviewers can inspect what was answered. These internal class boundaries and -the `ZeroShotTranslator` sketch in the generated implementation guide are recommendations, not a -required framework. Neither the template nor core requires an aces-relaxations dependency. - -The core reader projects key columns at I/O, but using that helper alone does not establish that the -whole algorithm is label-blind. Conformance must cover the preceding stages and any other reads, with -controlled randomness when comparing sampling-based runs; see [conformance](reference/spec.md#8-conformance). - -## Relaxations: what the algorithm actually answered - -Most algorithms cannot answer an arbitrary ACES task exactly. A time-to-event algorithm cannot express -"no discharge in the next 24h *and then* death before ICU discharge"; a code-in-window algorithm cannot express -"sodium below 135" when its vocabulary only has decile bins. They answer a **related** question. The -`relaxations.yaml` ledger states which one, so a reader can separate *algorithm error* from *relaxation error*. - -```yaml -query_language: MOTOR first-occurrence time-to-event over task-head codes # required -decoded_quantity: P(any of {MEDS_DEATH} first occurs before the first of {ICU_DISCHARGE, MEDS_DEATH}) # required -exact: false # required -steps: # free-form, recommended - - {name: normalize, kind: label_preserving, direction: exact, detail: re-rooted at the prediction time} - - {name: label_only, kind: algorithm_assumption, direction: unknown, detail: dropped 2 criteria branches} -``` - -`exact: true` claims that the decoded quantity *is* the requested label's probability under the algorithm. The -recommended step vocabulary separates three kinds of difference: - -| `kind` | Where it comes from | Effect on labels | Typical `direction` | -|---|---|---|---| -| `label_preserving` | a rewrite proven not to change any label on cohort rows (`normalize`, `require_bounding_events`, re-anchoring) | none | `exact` | -| `approximation` | a task rewrite with a known effect (`simplify_constraints`, `last_link_target`, a value threshold mapped onto bins) | changes labels in a stated direction | `weakening` (more positives) or `strengthening` (fewer) | -| `algorithm_assumption` | what the query language forces (vocabulary restriction, dropping criteria, independence between codes) | depends on the data | usually `unknown` | - -Rules: an algorithm **must not** omit a step because it is expected to be small, and it **must raise** rather -than answer a task it cannot pose — the command fails and writes no predictions. - -Two cases deserve particular scrutiny: a criterion sharing codes with the label cannot simply be -assumed independent of it, and a same-timestamp conjunction is not equivalent to both codes occurring -somewhere in a window. Record such substitutions explicitly rather than hiding them in decoding. - -### What ledgers look like for three kinds of algorithm - -Illustrative ledgers for MEDS-DEV's `mortality/in_icu/first_24h` and an abnormal-lab task. They show what a -reader should expect from each kind of algorithm, not values to copy. - -#### Code-in-window query algorithm (direct) - -For example EveryQuery. Its windows can start after a delay or at an event and end at a duration or a -bound event, so much of the task maps exactly. The algorithm is asked *P(death in (t₀ + 1 day, next ICU -discharge) | no ICU discharge, death or ICU admission in the first day)*. `exact: false`. - -| Step | Kind | Direction | -|---|---|---| -| re-anchor the trigger-rooted `gap` window on the prediction time | label_preserving | exact | -| normalize | label_preserving | exact | -| remove death from the window's end event (`discharge_or_death`) | approximation | exact except on timestamp ties (strengthening) | -| criteria that hold on every cohort row, given to the algorithm as answered conditions | label_preserving | exact | -| a criterion spanning several codes, which cannot be given as a condition, dropped | algorithm_assumption | unknown | - -#### Time-to-event algorithm (direct) - -For example MOTOR. The algorithm has hazards for a fixed vocabulary of codes, so predicates are restricted -to that vocabulary and criteria branches are dropped. On an abnormal-lab task such as hyponatremia, the -`< 135 mEq/L` threshold cannot be expressed over codes without values and the "measured at least once" -criterion is dropped, so the decoded quantity becomes *P(any sodium measurement in the next 24h)*. - -| Step | Kind | Direction | -|---|---|---| -| require_bounding_events, normalize | label_preserving | exact | -| vocabulary restriction (value bounds dropped) | algorithm_assumption | weakening | -| drop criteria branches | algorithm_assumption | unknown | -| single label window promoted to the prediction time (time-to-event stationarity) | approximation / algorithm_assumption | unknown unless exact | -| decode `and`/`or` under independence | algorithm_assumption | unknown | - -#### Autoregressive generator (materialized) - -For example MEDS-EIC-AR. The task is evaluated as written on real history plus each sampled future, so -the only intrinsic step is the Monte Carlo estimate. Effects that change the answer are recorded when -they happen: samples that end before the task resolves (ACES would count them as negatives), generated -events that land before the prediction time, samples that violate a future criterion (rejecting them -estimates *P(label | criteria hold)*), and rows with no usable sample (handled by a declared policy that -lists their keys). - -## Windows that straddle the prediction time - -Many MEDS-DEV tasks anchor their windows at the **trigger** (e.g. ICU admission), not at the prediction -time. In `mortality/in_icu/first_24h`, the prediction time is `trigger + 24h`, but the `gap` window spans -`(trigger, trigger + 48h]` and the label window hangs off its end: - -```text -trigger -├── (+1 day) input.end ← prediction time -└── (+2 days) gap.end (no ICU admission, discharge or death) - └── (next discharge or death) target.end ← label: death -``` - -The first half of `gap` is past history (already enforced when the cohort was extracted); the second half -is a real condition on the future. A structural future-only check can reject this layout; a rewrite -that treats the whole window as past can instead discard its future condition. Test both cases against -the adapter's pinned task-library revision, including analogous `no_discharge` windows in lab tasks. - -The fix is a **re-anchoring** step: a trigger-rooted window ending at `trigger + L` with `L > Δ` (where the -prediction time is `trigger + Δ`) becomes `(prediction time, prediction time + (L − Δ)]`; "never" -constraints can be retained over the remaining future interval. Other constraints require individual -analysis: the past portion may already satisfy them, but removing a remaining future requirement would -change the task. Claim label preservation only after checking the rewrite on the same cohort keys. -Generic, proven rewrites belong in the task library; algorithm-specific assumptions belong in the adapter. -Materialized algorithms can evaluate the original task on real history plus generated futures. - -## Adapters are algorithm-specific - -Translating an ACES task into an algorithm's query language is algorithm-specific, so it lives with the algorithm, not -in the template: - -- **Task rewriting library**, such as aces-relaxations: provides structural checks and rewrites with - documented semantic effects. Verify the available API and guarantees at the pinned revision. -- **aces-to-<algorithm>** (algorithm-specific): chooses which rewrites and assumptions the query language - forces, runs the algorithm, decodes probabilities, and writes the ledger. aces-to-motor (for MOTOR) is one - example. - -Pin aces-relaxations to an exact version or commit in the algorithm repository; the template does not depend -on it. - -## MEDS-DEV integration - -Each zero-shot descriptor in `algorithms//model.yaml` uses `{task_criteria_path}` and -`{predicates_path}`. The MEDS-DEV revision used to execute it must support these placeholders and pass -the original task definition, not an algorithm-specific relaxation. Check that capability before launching -the run; the template's integration helper records the revision used by its tests. - -`{labels_dir}` can also supply `external_index_dir`: the algorithm reads only its key columns for scoring. -This does not require generating a second physical dataset. The evaluation-only truth join happens -after scores are fixed, as specified in the [core contract](reference/spec.md#step-arguments-and-artifacts). -For SLURM, supply `TASK_CRITERIA_FILE` and the task predicate binding through the generated configuration; -see [running an algorithm](running.md). - -## Reading zero-shot results - -- Predictions are scored against the **requested** task's labels; the relaxation is part of the algorithm. -- Compare algorithms on the same task with their ledgers side by side: an algorithm that answers an easier, - relaxed question can look better or worse for reasons unrelated to its quality. -- A useful extra analysis for direct algorithms: extract the *relaxed* task's labels with - `aces_relaxations.extract_at` on the same index and report performance against both label sets. diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index 664581e..0000000 --- a/mkdocs.yml +++ /dev/null @@ -1,93 +0,0 @@ -site_name: MEDS algorithm template -site_description: >- - A contract for MEDS algorithm repositories: MEDS data and a task in, MEDS predictions out, with every step - measured and reproducible. -repo_url: https://github.com/McDermottHealthAI/MEDS_algorithm_template -repo_name: McDermottHealthAI/MEDS_algorithm_template -edit_uri: edit/main/docs/ -hooks: - - docs/hooks.py - -extra_css: - - assets/prompt-builder.css -extra_javascript: - - assets/prompt-builder.js - -docs_dir: docs -strict: true -validation: - nav: - omitted_files: warn - not_found: warn - links: - not_found: warn - anchors: warn - absolute_links: info - unrecognized_links: warn - -theme: - name: material - features: - - navigation.sections - - navigation.top - - navigation.footer - - content.code.copy - - search.highlight - palette: - - media: "(prefers-color-scheme: light)" - scheme: default - toggle: - icon: material/brightness-7 - name: Switch to dark mode - - media: "(prefers-color-scheme: dark)" - scheme: slate - toggle: - icon: material/brightness-4 - name: Switch to light mode - -markdown_extensions: - - admonition - - attr_list - - def_list - - footnotes - - tables - - toc: - permalink: true - - pymdownx.details - - pymdownx.highlight - - pymdownx.inlinehilite - - pymdownx.snippets: - base_path: ["."] - check_paths: true - - pymdownx.superfences: - custom_fences: - - name: mermaid - class: mermaid - format: !!python/name:pymdownx.superfences.fence_code_format - -nav: - - Getting started: - - Overview: index.md - - Concepts: concepts.md - - Choosing a profile: profiles.md - - Workflow: workflow.md - - Building an algorithm: - - Implementation prompt builder: prompt-builder.md - - Running an algorithm: running.md - - Fully manual example: manual-example.md - - Development: - - Core package layout: core-package.md - - Template and shared package: shared-package-assessment.md - - Migrating to version 4: migration-v4.md - - Publishing an algorithm: publishing-algorithms.md - - Releasing core and template: releasing.md - - Zero-shot algorithms: - - Zero-shot in practice: zero-shot.md - - Reference: - - Specification (normative): reference/spec.md - - Manifest fields: reference/manifest.md - - Contract API: reference/api.md - - Architecture and UML: reference/architecture.md - - Tests and acceptance: testing.md - - Shared-package tests: reference/tests.md - - FAQ: faq.md diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 65fd670..0000000 --- a/package-lock.json +++ /dev/null @@ -1,532 +0,0 @@ -{ - "name": "meds-algorithm-template-docs-tests", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "meds-algorithm-template-docs-tests", - "devDependencies": { - "jsdom": "^30.1.3" - }, - "engines": { - "node": ">=24" - } - }, - "node_modules/@asamuzakjp/css-color": { - "version": "7.1.9", - "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-7.1.9.tgz", - "integrity": "sha512-vZ6JQVq8Ivgz6b/IBlAf90wZviXdluY13cQOPO+nJHbmXwGrPl2GcpqUY7a55/8ZVdfONXpCFMpRijOBCHNlcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@csstools/css-calc": "^3.4.3", - "@csstools/css-color-parser": "^4.2.6", - "@csstools/css-parser-algorithms": "^4.0.2", - "@csstools/css-tokenizer": "^4.0.2", - "lru-cache": "^11.5.3" - }, - "engines": { - "node": "^22.22.2 || ^24.15.0 || >=26.0.0" - } - }, - "node_modules/@asamuzakjp/dom-selector": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-10.0.5.tgz", - "integrity": "sha512-EgmJ7oEaGQECTn3H3wmnQpEy4hKY66VvM7VQndwPIQob3p877BgbyOUE3EX0LgXQCciF2H8KMdR+RznqjMNOLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "bidi-js": "^1.1.0", - "css-tree": "^3.2.1", - "is-potential-custom-element-name": "^1.0.1", - "lru-cache": "^11.5.3" - }, - "engines": { - "node": "^22.22.2 || ^24.15.0 || >=26.0.0" - } - }, - "node_modules/@bramus/specificity": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@bramus/specificity/-/specificity-2.4.3.tgz", - "integrity": "sha512-0GEz8qJWokkUVYQYRukmkSHIFNoBH8QTreeHrAFbvz1XFYc3Y+puhMs8PQ5x8GNugiC2l5jvDBXKLbBIByeSBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "css-tree": "^3.2.1" - }, - "bin": { - "specificity": "bin/cli.js" - } - }, - "node_modules/@csstools/color-helpers": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.1.2.tgz", - "integrity": "sha512-grhRy3OKmniaAEKXMjua5z/EODX0MSqBGjunw8+j/3HQjOnahs2AGhvEOIYVUWcU6ScApbhLhVrQTX8XqrMrow==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", - "engines": { - "node": ">=20.19.0" - } - }, - "node_modules/@csstools/css-calc": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.4.3.tgz", - "integrity": "sha512-iex20d8CHVkyvg6B7UKV7uHnI2Bqo9g+EFfT9E0y+GvTvhZ/DwONJ+9aKb1dlqm0ZiGsL5RXjp0fCoJYnkeDjA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "engines": { - "node": ">=20.19.0" - }, - "peerDependencies": { - "@csstools/css-parser-algorithms": "^4.0.2", - "@csstools/css-tokenizer": "^4.0.2" - } - }, - "node_modules/@csstools/css-color-parser": { - "version": "4.2.7", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.2.7.tgz", - "integrity": "sha512-zgm9yjQz5iJB4VL8RyVwd71TWB8Q89FSxt/NzXoWqPSkEBOVtn9L6vAPtSc9hpKfB0Awo/AL2VKFHjYetBLFHQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "dependencies": { - "@csstools/color-helpers": "^6.1.2", - "@csstools/css-calc": "^3.4.3" - }, - "engines": { - "node": ">=20.19.0" - }, - "peerDependencies": { - "@csstools/css-parser-algorithms": "^4.0.2", - "@csstools/css-tokenizer": "^4.0.2" - } - }, - "node_modules/@csstools/css-parser-algorithms": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.2.tgz", - "integrity": "sha512-40cSKyMvK+tq4qz6Awrlye2WGuOKt3FwPgtGg6KTfbHOWNw+Rk1rzbAtZnZ6IBhsY491HLRnDXwoyBAijmmILA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "engines": { - "node": ">=20.19.0" - }, - "peerDependencies": { - "@csstools/css-tokenizer": "^4.0.2" - } - }, - "node_modules/@csstools/css-syntax-patches-for-csstree": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.16.tgz", - "integrity": "sha512-LsDbJPP/B8cPasUJyTA5S99F7C4G93ngW8hUluXz8CFeOaaRnBPtBiIlvgcPYU0HmHNz8CXg+1vwFrIB4F6Dgw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT-0", - "peerDependencies": { - "css-tree": "^3.2.1" - }, - "peerDependenciesMeta": { - "css-tree": { - "optional": true - } - } - }, - "node_modules/@csstools/css-tokenizer": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-4.0.2.tgz", - "integrity": "sha512-OoKoR0f76dCY666JlcbhmVTs2drYj1GUXZTYTcbUgJjh9Nv41aFfZ21bPQTERm5+L5cBDo466NltB2lplS5GBw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "engines": { - "node": ">=20.19.0" - } - }, - "node_modules/@exodus/bytes": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.16.0.tgz", - "integrity": "sha512-IcpW84uEn3N7ETtNZMlxKhfl6Pec8rUNGOTBtWbK1FKhJxIFAptZyVrvVRVBimAJxJCgc3PxepxkdWWG4DVzfA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=24.0.0" - }, - "peerDependencies": { - "@noble/hashes": "^1.8.0 || ^2.0.0" - }, - "peerDependenciesMeta": { - "@noble/hashes": { - "optional": true - } - } - }, - "node_modules/bidi-js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.1.0.tgz", - "integrity": "sha512-fX1Onk0tdVPC7obPWB5EbJ1z7NVhLq4m2xZLq2YXBkxzMXIGRpNMU88n0EPgWseKl12J7zXs7qrDxPK4sRs2fg==", - "dev": true, - "license": "MIT", - "dependencies": { - "require-from-string": "^2.0.2" - } - }, - "node_modules/css-tree": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz", - "integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "mdn-data": "2.27.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" - } - }, - "node_modules/data-urls": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-8.0.0.tgz", - "integrity": "sha512-JQUCCK+/CAGbGGx618PlFZMXH81Jtj7t73CHv9dd/zVWvxgGT2zLFRjnKb+Ng46GIwcy+f7f88qd4duqllK+WQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-mimetype": "^5.0.0", - "whatwg-url": "^17.1.2" - }, - "engines": { - "node": "^22.14.0 || >=24.0.0" - } - }, - "node_modules/decimal.js": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", - "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", - "dev": true, - "license": "MIT" - }, - "node_modules/entities": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-9.0.0.tgz", - "integrity": "sha512-oJFNDJg3kTPwAD1cNn2+WmUq4wFoo09npc3Ydf1D7ED4smRiWrsKnaLxykrTWgyGEcusc87P5dxlAleol9kpkg==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=20.19.0" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/html-encoding-sniffer": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-7.0.0.tgz", - "integrity": "sha512-UikN5yr7xsCDAq87Or5or0PAlD3HJJOKVzM05az588WnpDJ4Ux7a2A53Qi6gofGg2/EtvF/H4hCi/TXfCW4Y6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@exodus/bytes": "^1.15.1" - }, - "engines": { - "node": "^22.13.0 || >=24.0.0" - } - }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/jsdom": { - "version": "30.1.3", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-30.1.3.tgz", - "integrity": "sha512-hQMUPvRgN7KxsfIytDQji7bimuJeRQa6Qo5+iuiZQk5CafeRxLIA10/cG5YCBFNpD9RO3oqIiN4CO1Y44kxqXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@asamuzakjp/css-color": "^7.1.3", - "@asamuzakjp/dom-selector": "^10.0.3", - "@bramus/specificity": "^2.4.2", - "@csstools/css-syntax-patches-for-csstree": "^1.1.15", - "@exodus/bytes": "^1.16.0", - "css-tree": "^3.2.1", - "data-urls": "^8.0.0", - "decimal.js": "^10.6.0", - "html-encoding-sniffer": "^7.0.0", - "is-potential-custom-element-name": "^1.0.1", - "lru-cache": "^11.5.3", - "parse5": "^8.0.1", - "saxes": "^6.0.0", - "tough-cookie": "^6.0.2", - "undici": "^8.12.1", - "w3c-xmlserializer": "^6.0.0", - "webidl-conversions": "^8.0.1", - "whatwg-mimetype": "^5.0.0", - "whatwg-url": "^17.2.0", - "xml-name-validator": "^5.0.0" - }, - "engines": { - "node": "^22.22.2 || ^24.15.0 || >=26.0.0" - }, - "peerDependencies": { - "canvas": "^3.2.3" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/lru-cache": { - "version": "11.5.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz", - "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/mdn-data": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz", - "integrity": "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==", - "dev": true, - "license": "CC0-1.0" - }, - "node_modules/parse5": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.1.0.tgz", - "integrity": "sha512-sq3qBFpee5jeocbFbO48VHlGr8sT7mbXS0vxlKN6sottBtJzrOG3998sr0llSZcQAGgfpdmEYAIZE0P9z0dE8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "entities": "^9.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/saxes": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", - "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", - "dev": true, - "license": "ISC", - "dependencies": { - "xmlchars": "^2.2.0" - }, - "engines": { - "node": ">=v12.22.7" - } - }, - "node_modules/source-map-js": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", - "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/tldts": { - "version": "7.4.19", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.4.19.tgz", - "integrity": "sha512-48dH6aSpQnpbzDUc4vIQZ1VjB8tkK+e8c1yx05/SZK+rkssgjEOlxDd/yU8/a4vGYQ9vRgJr9dwMq9TJ0b3X2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "tldts-core": "^7.4.19" - }, - "bin": { - "tldts": "bin/cli.js" - } - }, - "node_modules/tldts-core": { - "version": "7.4.20", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.4.20.tgz", - "integrity": "sha512-C630TWXZCZmLq0F2bW4QqwnaaxCQ/svpAqvJwnC4JvgEM5ohhBnGsEzTLSOXcN+xjz+kEaHS5uoWIw2klnqd0A==", - "dev": true, - "license": "MIT" - }, - "node_modules/tough-cookie": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.2.tgz", - "integrity": "sha512-exgYmnmL/sJpR3upZfXG5PoatXQii55xAiXGXzY+sROLZ/Y+SLcp9PgJNI9Vz37HpQ74WvDcLT8eqm+kV3FzrA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tldts": "^7.0.5" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/tr46": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-7.0.0.tgz", - "integrity": "sha512-BcDSDW+SIGWVOns1Zm6Yg91q9AEj7eaID0QDY9oIqJD1A8dscNwMcl9Sms2DeuWCNov1X0/oXanHGYQBSLwZsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^2.3.1" - }, - "engines": { - "node": "^22.14.0 || >=24.0.0" - } - }, - "node_modules/undici": { - "version": "8.12.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-8.12.3.tgz", - "integrity": "sha512-+fdndUTwBP86cVjihTp21hZHo7d6oj1c/47XPA3lL8mM0XHs+C4EkcjmgRsFnFk2f/UONGDy9ItBItmXsLOQHw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=22.19.0" - } - }, - "node_modules/w3c-xmlserializer": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-6.0.0.tgz", - "integrity": "sha512-4Nsy8K5Tr6SPDH9jhKJOHf7ChDrc1zufZTVSF7x72hwuEXBqxqk9G6cK+K2NRUtB3iELRJqjXb4JPDMBjMTl2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "xml-name-validator": "^5.0.0" - }, - "engines": { - "node": "^22.22.2 || ^24.15.0 || >=26.0.0" - } - }, - "node_modules/webidl-conversions": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-8.0.1.tgz", - "integrity": "sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=20" - } - }, - "node_modules/whatwg-mimetype": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-5.0.0.tgz", - "integrity": "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20" - } - }, - "node_modules/whatwg-url": { - "version": "17.3.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-17.3.0.tgz", - "integrity": "sha512-KwOAJrpf+GTgBvcBQJcP38sMF0DsQKdwtG+TxM2pW44P6E5k0hDbWrDmyuJDIF0Uef0aQq0ZoJs+5oI+k8ddhg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@exodus/bytes": "^1.16.0", - "tr46": "^7.0.0", - "webidl-conversions": "^8.0.1" - }, - "engines": { - "node": "^22.14.0 || >=24.0.0" - } - }, - "node_modules/xml-name-validator": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", - "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true, - "license": "MIT" - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 32bae40..0000000 --- a/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "meds-algorithm-template-docs-tests", - "private": true, - "scripts": { - "test": "node --test tests/prompt_builder.test.cjs" - }, - "engines": { - "node": ">=24" - }, - "devDependencies": { - "jsdom": "^30.1.3" - } -} diff --git a/pyproject.toml b/pyproject.toml index 88a9301..0492240 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,15 +17,13 @@ meds-algorithm-template = "meds_algorithm_template.cli:main" [project.urls] Repository = "https://github.com/McDermottHealthAI/MEDS_algorithm_template" -Documentation = "https://McDermottHealthAI.github.io/MEDS_algorithm_template/" +Documentation = "https://meds-algorithm.readthedocs.io/en/latest/" [tool.hatch.build.targets.wheel] packages = ["src/meds_algorithm_template"] [dependency-groups] dev = ["meds-algorithm[conformance,orchestration]==0.4.0a5", "polars>=1", "pyarrow>=15", "pytest>=8", "pyyaml>=6", "ruff"] -# MkDocs 2.0 removes the plugin and theme systems Material depends on, so stay on 1.x. -docs = ["mkdocs>=1.6,<2", "mkdocs-material>=9.5,<10"] [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/redirects/index.html b/redirects/index.html new file mode 100644 index 0000000..827883f --- /dev/null +++ b/redirects/index.html @@ -0,0 +1,20 @@ + + + + + +Documentation moved +

The MEDS algorithms documentation has moved to +Read the Docs.

+ + diff --git a/redirects/paths.json b/redirects/paths.json new file mode 100644 index 0000000..dedba43 --- /dev/null +++ b/redirects/paths.json @@ -0,0 +1,26 @@ +[ + "catalogue-testing", + "concepts", + "core-package", + "documentation", + "faq", + "implementation-prompt", + "implemented-algorithms", + "index", + "manual-example", + "migration-v4", + "profiles", + "prompt-builder", + "publishing-algorithms", + "reference/api", + "reference/architecture", + "reference/manifest", + "reference/spec", + "reference/tests", + "releasing", + "running", + "shared-package-assessment", + "testing", + "workflow", + "zero-shot" +] diff --git a/scripts/build_docs_redirects.py b/scripts/build_docs_redirects.py new file mode 100644 index 0000000..9410398 --- /dev/null +++ b/scripts/build_docs_redirects.py @@ -0,0 +1,25 @@ +"""Build the retired GitHub Pages site's redirects using only the standard library.""" + +import json +from pathlib import Path + + +def main(): + root = Path(__file__).resolve().parents[1] + output = root / "site-redirects" + source = (root / "redirects/index.html").read_text(encoding="utf-8") + routes = json.loads((root / "redirects/paths.json").read_text(encoding="utf-8")) + files = ["index.html", "404.html"] + for route in routes: + files.extend([f"{route}/index.html", f"{route}.html"]) + for name in files: + destination = output / name + if not destination.resolve().is_relative_to(output.resolve()): + raise ValueError("Redirect route must stay inside the output directory") + destination.parent.mkdir(parents=True, exist_ok=True) + destination.write_text(source, encoding="utf-8") + (output / ".nojekyll").touch() + + +if __name__ == "__main__": + main() diff --git a/template/README.md.jinja b/template/README.md.jinja index 03c4ec1..1c51966 100644 --- a/template/README.md.jinja +++ b/template/README.md.jinja @@ -64,7 +64,7 @@ uv run {{ algorithm_slug | replace('_', '-') }} run execution=slurm output_dir=/ A dry run prints all resolved arguments, paths, configuration and resources without writing files or submitting jobs. Local execution uses fresh subprocesses; Submitit submits separate dependent SLURM -jobs. See the [shared runner guide](https://mcdermotthealthai.github.io/MEDS_algorithm_template/running/#profile-runner-prototype) +jobs. See the [shared runner guide](https://meds-algorithm.readthedocs.io/en/latest/running/#profile-runner-prototype) for stage subsets, artifact reuse, resource configuration and prototype limitations. The existing per-step CLI and shell launcher remain available for comparison. This prototype does not implement Hydra multirun, multi-node training or checkpoint/resume. diff --git a/template/docs/TESTING.md b/template/docs/TESTING.md index bdf1d02..2f672e9 100644 --- a/template/docs/TESTING.md +++ b/template/docs/TESTING.md @@ -23,7 +23,7 @@ The primary-behavior placeholder intentionally **fails**, including in a freshly `tests/test_conformance.py` inherits eight acceptance checks from `meds_algorithm.conformance.suite.AlgorithmConformanceTests`. Their implementation and -[what/why inventory](https://mcdermotthealthai.github.io/MEDS_algorithm_template/reference/tests/#downstream-acceptance-suite) +[what/why inventory](https://meds-algorithm.readthedocs.io/en/latest/reference/tests/#downstream-acceptance-suite) live in the shared package. The matching installed inventory is available in Python through `meds_algorithm.spec.validation_guide()`. diff --git a/tests/prompt_builder.test.cjs b/tests/prompt_builder.test.cjs deleted file mode 100644 index 09c2b13..0000000 --- a/tests/prompt_builder.test.cjs +++ /dev/null @@ -1,189 +0,0 @@ -const assert = require("node:assert/strict"); -const fs = require("node:fs"); -const path = require("node:path"); -const {test} = require("node:test"); -const {JSDOM} = require("jsdom"); -const {renderPrompt} = require("../docs/assets/prompt-builder.js"); -const root = path.join(__dirname, ".."); -const read = (name) => fs.readFileSync(path.join(root, name), "utf8").replace(/\r\n/g, "\n"); -const section = read("README.md").split("")[1].split("")[0]; -const template = section.match(/```text\n([\s\S]*?)\n```/)[1]; -const base = { - source_kind: "both", papers: "paper.pdf", code: "https://github.com/example/source @ abc123", - destination_kind: "local", local_path: "/work/new-algorithm", profile_mode: "automatic", - tasks_mode: "none", scope: "local", visibility: "private", profiles: ["finetune", "probe"], - github_repo: "example/new-algorithm", dataset: "Demo dataset v1 at /data/meds", - labels_path: "/data/tasks/labels", configs_path: "/data/tasks/configs", bundle_revision: "tasks-v1" -}; -function browser() { - const html = read("docs/prompt-builder.md").replace("", ``); - const dom = new JSDOM(html, {url: "https://example.test/docs/prompt-builder/", runScripts: "outside-only"}); - dom.window.eval(read("docs/assets/prompt-builder.js")); - dom.window.document.dispatchEvent(new dom.window.Event("DOMContentLoaded")); - const doc = dom.window.document; - const form = doc.querySelector("form"); - const field = (name) => form.elements.namedItem(name); - const set = (name, value) => { field(name).value = value; field(name).dispatchEvent(new dom.window.Event("input", {bubbles: true})); }; - const output = doc.querySelector("[data-prompt-output]"); - return {dom, doc, form, field, set, output}; -} -test("all source, destination, profile, task, scope and ambiguity modes preserve the shared contract", () => { - for (const source_kind of ["paper", "code", "both"]) - for (const destination_kind of ["local", "github"]) - for (const profile_mode of ["automatic", "manual"]) - for (const tasks_mode of ["none", "ready"]) - for (const scope of ["local", "integration", "full"]) - for (const exploratory_mode of [false, true]) { - const prompt = renderPrompt(template, {...base, source_kind, destination_kind, profile_mode, tasks_mode, scope, exploratory_mode}); - assert(!/<[A-Z][A-Z0-9_]*>/.test(prompt)); - assert(prompt.includes("Only after approval, run:")); - assert(prompt.includes("minimalist, auditable, object-oriented")); - assert(prompt.includes("Do not generate new tasks,")); - assert(prompt.includes("In BOTH modes, ambiguities about leakage")); - assert(prompt.includes("Require review of these decisions before claiming faithful reproduction.")); - assert.equal(prompt.includes("Exploratory mode explicitly enabled:"), exploratory_mode); - assert.equal(prompt.includes("Confirmation required (default):"), !exploratory_mode); - assert.equal(prompt.includes("paper.pdf"), source_kind !== "code"); - assert.equal(prompt.includes(base.code), source_kind !== "paper"); - assert.equal(prompt.includes("New GitHub repository:"), destination_kind === "github"); - assert.equal(prompt.includes("Explicit profiles: finetune, probe."), profile_mode === "manual"); - assert.equal(prompt.includes("Prepared labels: /data/tasks/labels"), tasks_mode === "ready"); - } -}); -test("omitted ambiguity mode defaults to confirmation and non-boolean opt-ins are rejected", () => { - assert.equal(renderPrompt(template, base), renderPrompt(template, {...base, exploratory_mode: false})); - assert(renderPrompt(template, base).includes("Confirmation required (default):")); - for (const exploratory_mode of ["false", "true", "on", null, 0, 1]) { - assert.throws(() => renderPrompt(template, {...base, exploratory_mode}), /explicit checkbox/); - } -}); -test("exploratory checkbox is opt-in, invalidates the previous prompt and resets to confirmation", () => { - const {dom, doc, form, field, set, output} = browser(); - try { - const checkbox = field("exploratory_mode"); - assert.equal(checkbox.checked, false); - assert.equal(checkbox.defaultChecked, false); - assert(doc.getElementById(checkbox.getAttribute("aria-describedby"))); - set("papers", base.papers); set("code", base.code); set("local_path", base.local_path); - form.requestSubmit(); - assert(output.value.includes("Confirmation required (default):")); - const original = output.value; - checkbox.click(); - assert.equal(checkbox.checked, true); - assert(doc.querySelector("[data-copy]").disabled && doc.querySelector("[data-download]").disabled); - assert.equal(output.value, original); - form.requestSubmit(); - assert(output.value.includes("Exploratory mode explicitly enabled:")); - assert(!output.value.includes("Confirmation required (default):")); - assert(output.value.includes("Only after approval, run:")); - checkbox.click(); - form.requestSubmit(); - assert.equal(output.value, original); - checkbox.click(); - form.requestSubmit(); - doc.querySelector("[data-reset]").click(); - assert.equal(checkbox.checked, false); - assert.equal(output.value, ""); - } finally { dom.window.close(); } -}); -test("incomplete or invalid plans fail instead of yielding an executable-looking prompt", () => { - for (const bad of [ - {papers: ""}, {code: ""}, {local_path: ""}, {source_kind: "unknown"}, - {profile_mode: "manual", profiles: []}, {profile_mode: "manual", profiles: ["invented"]}, - {destination_kind: "github", github_repo: "https://other.test/owner/repo"}, - {destination_kind: "github", visibility: "internal"}, - {tasks_mode: "ready", dataset: ""}, {tasks_mode: "ready", labels_path: ""}, - {tasks_mode: "ready", configs_path: ""}, {tasks_mode: "ready", bundle_revision: ""} - ]) assert.throws(() => renderPrompt(template, {...base, ...bad})); -}); -test("selected task subsets and literal user text are preserved without recursive substitution", () => { - const literal = ' $&'; - const prompt = renderPrompt(template, {...base, tasks_mode: "ready", task_subset: "mortality_30d", constraints: literal}); - assert(prompt.includes("Task subset: mortality_30d")); - assert(prompt.includes(literal)); - assert(prompt.includes("selects only tasks already present")); -}); -test("the form reveals only relevant required fields and renders multiple profiles", () => { - const {dom, doc, form, field, set, output} = browser(); - try { - set("source_kind", "code"); - assert(field("papers").disabled); - assert(!field("papers").required); - set("code", base.code); - set("local_path", base.local_path); - set("destination_kind", "github"); - assert(field("github_repo").required); - set("github_repo", base.github_repo); - set("profile_mode", "manual"); - form.requestSubmit(); - assert(doc.querySelector("[data-status]").textContent.includes("Select at least one")); - for (const name of ["finetune", "probe"]) doc.querySelector(`[value="${name}"]`).checked = true; - set("tasks_mode", "ready"); - assert(field("dataset").required && field("labels_path").required && field("configs_path").required); - for (const name of ["dataset", "labels_path", "configs_path", "bundle_revision"]) set(name, base[name]); - form.requestSubmit(); - assert(output.value.includes("Explicit profiles: finetune, probe.")); - assert(output.value.includes("visibility: private")); - assert(output.value.includes("Prepared task configs: /data/tasks/configs")); - assert(!doc.querySelector("[data-copy]").disabled); - set("tasks_mode", "none"); - assert(field("labels_path").disabled && !field("dataset").required); - form.requestSubmit(); - assert(!output.value.includes("Prepared labels:")); - } finally { dom.window.close(); } -}); -test("edited output copies and downloads exactly; input changes invalidate it and reset clears it", async () => { - const {dom, doc, form, set, output} = browser(); - try { - set("papers", base.papers); set("code", base.code); set("local_path", base.local_path); - form.requestSubmit(); - const copy = doc.querySelector("[data-copy]"); - const download = doc.querySelector("[data-download]"); - let copied, blob, filename; - Object.defineProperty(dom.window.navigator, "clipboard", {value: {writeText: async (value) => {copied = value;}}}); - dom.window.URL.createObjectURL = (value) => {blob = value; return "blob:test";}; - dom.window.URL.revokeObjectURL = () => {}; - dom.window.HTMLAnchorElement.prototype.click = function () { filename = this.download; }; - output.value += "\nUser edit."; - output.dispatchEvent(new dom.window.Event("input", {bubbles: true})); - copy.click(); await new Promise(setImmediate); - assert.equal(copied, output.value); - download.click(); - const downloaded = await new Promise((resolve) => { const reader = new dom.window.FileReader(); reader.onload = () => resolve(reader.result); reader.readAsText(blob); }); - assert.equal(downloaded, output.value); - assert.equal(filename, "meds-algorithm-implementation.txt"); - const previous = output.value; - set("constraints", "new constraint"); - assert(copy.disabled && download.disabled); - assert.equal(output.value, previous); - form.requestSubmit(); - output.value = ""; output.dispatchEvent(new dom.window.Event("input")); assert(copy.disabled); - output.value = "Restored edit"; output.dispatchEvent(new dom.window.Event("input")); assert(!copy.disabled); - doc.querySelector("[data-reset]").click(); - assert.equal(output.value, ""); assert(copy.disabled && output.readOnly); - } finally { dom.window.close(); } -}); -test("clipboard denial provides a selectable fallback without losing edited content", async () => { - const {dom, doc, form, set, output} = browser(); - try { - set("papers", base.papers); set("code", base.code); set("local_path", base.local_path); - form.requestSubmit(); - Object.defineProperty(dom.window.navigator, "clipboard", {value: {writeText: async () => {throw new Error("denied");}}}); - doc.querySelector("[data-copy]").click(); await new Promise(setImmediate); - assert(doc.querySelector("[data-status]").textContent.includes("Ctrl+C")); - assert.equal(output.selectionStart, 0); assert.equal(output.selectionEnd, output.value.length); - } finally { dom.window.close(); } -}); -test("HTML-like references remain inert text and repeated initialization preserves edits", () => { - const {dom, doc, form, set, output} = browser(); - try { - const hostile = ''; - set("papers", hostile); set("code", base.code); set("local_path", base.local_path); - form.requestSubmit(); - assert(output.value.includes(hostile)); assert.equal(doc.querySelector("img"), null); - assert.equal(dom.window.injected, undefined); - output.value = "My edited prompt"; - doc.dispatchEvent(new dom.window.Event("DOMContentLoaded")); - assert.equal(output.value, "My edited prompt"); - } finally { dom.window.close(); } -}); diff --git a/tests/test_docs.py b/tests/test_docs.py deleted file mode 100644 index 1d841d2..0000000 --- a/tests/test_docs.py +++ /dev/null @@ -1,55 +0,0 @@ -"""Documentation embedding keeps one canonical prompt and inert source text.""" - -import importlib.util -import json -import re -from pathlib import Path -from types import SimpleNamespace - -ROOT = Path(__file__).resolve().parents[1] - - -def load_hooks(): - spec = importlib.util.spec_from_file_location("docs_hooks", ROOT / "docs/hooks.py") - module = importlib.util.module_from_spec(spec) - spec.loader.exec_module(module) - return module - - -def test_prompt_builder_embeds_the_canonical_readme_prompt(): - hooks = load_hooks() - page = SimpleNamespace(file=SimpleNamespace(src_uri="prompt-builder.md")) - result = hooks.on_page_markdown((ROOT / "docs/prompt-builder.md").read_text(), page) - payload = re.search(r"data-prompt-template>(.*?)", result, re.DOTALL).group(1) - readme = (ROOT / "README.md").read_text() - section = readme.split("")[1].split( - "" - )[0] - expected = re.search(r"```text\n(.*?)\n```", section, re.DOTALL).group(1) - assert json.loads(payload) == expected - assert "" not in result - - -def test_algorithm_release_guide_uses_generated_source(): - hooks = load_hooks() - page = SimpleNamespace(file=SimpleNamespace(src_uri="publishing-algorithms.md")) - result = hooks.on_page_markdown((ROOT / "docs/publishing-algorithms.md").read_text(), page) - assert "" not in result - assert "{{" not in result - assert "scripts/check_distribution.sh" in result - assert "my-algorithm==$version" in result - - -def test_prompt_source_cannot_close_its_json_script_element(tmp_path, monkeypatch): - hooks = load_hooks() - monkeypatch.setattr(hooks, "__file__", str(tmp_path / "docs/hooks.py")) - prompt = '' - (tmp_path / "README.md").write_text( - "\n```text\n" - + prompt - + "\n```\n" - ) - page = SimpleNamespace(file=SimpleNamespace(src_uri="prompt-builder.md")) - result = hooks.on_page_markdown("", page) - assert result.count("") == 1 - assert json.loads(result.split("data-prompt-template>", 1)[1].split("", 1)[0]) == prompt diff --git a/tests/test_render.py b/tests/test_render.py index 87d89f9..5da58f0 100644 --- a/tests/test_render.py +++ b/tests/test_render.py @@ -176,11 +176,15 @@ def test_predicates_are_external_not_a_rendered_semantic_format(tmp_path): assert "external_predicates_file" not in (dst / "algorithms/supervised/model.yaml").read_text() -def test_implementation_prompt_belongs_to_template_readme_not_rendered_repo(tmp_path): +def test_implementation_prompt_links_to_core_docs_not_rendered_repo(tmp_path): dst = tmp_path / "prompt-location" render(dst, "supervised") prompt_token = "" - assert prompt_token in (TEMPLATE_REPO / "README.md").read_text() + assert ( + "https://meds-algorithm.readthedocs.io/en/latest/implementation-prompt/" + in (TEMPLATE_REPO / "README.md").read_text() + ) + assert prompt_token not in (TEMPLATE_REPO / "README.md").read_text() assert prompt_token not in (dst / "README.md").read_text() assert "Copyable algorithm-implementation prompt" not in (dst / "README.md").read_text() diff --git a/uv.lock b/uv.lock index a2b4d94..0f72065 100644 --- a/uv.lock +++ b/uv.lock @@ -21,194 +21,6 @@ version = "4.9.3" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/3e/38/7859ff46355f76f8d19459005ca000b6e7012f2f1ca597746cbcd1fbfe5e/antlr4-python3-runtime-4.9.3.tar.gz", hash = "sha256:f224469b4168294902bb1efa80a8bf7855f24c99aef99cbefc1bcd3cce77881b", size = 117034, upload-time = "2021-11-06T17:52:23.524Z" } -[[package]] -name = "babel" -version = "2.18.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/7d/b2/51899539b6ceeeb420d40ed3cd4b7a40519404f9baf3d4ac99dc413a834b/babel-2.18.0.tar.gz", hash = "sha256:b80b99a14bd085fcacfa15c9165f651fbb3406e66cc603abf11c5750937c992d", size = 9959554, upload-time = "2026-02-01T12:30:56.078Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/77/f5/21d2de20e8b8b0408f0681956ca2c69f1320a3848ac50e6e7f39c6159675/babel-2.18.0-py3-none-any.whl", hash = "sha256:e2b422b277c2b9a9630c1d7903c2a00d0830c409c59ac8cae9081c92f1aeba35", size = 10196845, upload-time = "2026-02-01T12:30:53.445Z" }, -] - -[[package]] -name = "backrefs" -version = "8.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/68/bc/c4b75b0279b2cf9e208c7dea5755a452d158a32abe1b7330824ff1127e86/backrefs-8.1.tar.gz", hash = "sha256:f86d9312df3ebae1241758af80809a319cafa1d8f32189edfb242c9aa55573b6", size = 6999089, upload-time = "2026-10-10T13:29:24.051Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/da/17/7be730f397b9239be5044a147f0cdfbd9605111b07af053c737b21d79d16/backrefs-8.1-py310-none-any.whl", hash = "sha256:438bd38dc7fa0cded52786a1351a2dad9efc2cda95d047284c41d916a22312a8", size = 380382, upload-time = "2026-10-10T13:29:12.764Z" }, - { url = "https://files.pythonhosted.org/packages/fd/d1/d25387b14119b7062fead6c9b2e87c2ab286beb346df79c6a649c095e979/backrefs-8.1-py311-none-any.whl", hash = "sha256:11f61846e446fa8637af2f5c073f1083aa58dbb7460b019fd51689f564e44f7e", size = 392180, upload-time = "2026-10-10T13:29:14.729Z" }, - { url = "https://files.pythonhosted.org/packages/7d/63/4c3078fcbb3956c55b24472d8375a1b7ad67203d4a1917512eee34d4fbee/backrefs-8.1-py312-none-any.whl", hash = "sha256:b472c76082769f86a97ffccfd1f2599b2b706610c6154955664fffe67e909035", size = 398092, upload-time = "2026-10-10T13:29:16.364Z" }, - { url = "https://files.pythonhosted.org/packages/df/22/60f30c9b8e497ca4bbac23991a726ebc267e23771a1b9d9c04b3a3c16dd6/backrefs-8.1-py313-none-any.whl", hash = "sha256:db577dbae1c61187534d35fc9bfbd0c01158fff6239a66fecf7590e5b17879a9", size = 400050, upload-time = "2026-10-10T13:29:18.09Z" }, - { url = "https://files.pythonhosted.org/packages/45/c7/80fa46ecb47717845ab9c07bce8651ef8f80aac5ec698e212d02ed2a9963/backrefs-8.1-py314-none-any.whl", hash = "sha256:1e857c32e91b8fe46ddb359ac21021a37b090fa4239566a61e9856123e334041", size = 411908, upload-time = "2026-10-10T13:29:19.876Z" }, - { url = "https://files.pythonhosted.org/packages/05/32/a57c5a5b7461b8c88266244014aa38052d76f64b064451b1d5342eb09bf4/backrefs-8.1-py315-none-any.whl", hash = "sha256:9c8fe3e2eaae4301a9ce787341d986e5ba25a887d89da6de0de5d58eca26a949", size = 417589, upload-time = "2026-10-10T13:29:21.821Z" }, -] - -[[package]] -name = "certifi" -version = "2026.10.19" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a6/bd/1436c50cc46699de0230fbaacc1d1de7bfec413176099949e9d5112e88f2/certifi-2026.10.19.tar.gz", hash = "sha256:035c1e85572b141bf1c3a3eff0e33a8eb74917522f2559075ff8d2fea780a1ae", size = 137598, upload-time = "2026-10-20T02:24:16.604Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c4/51/29046e48f693c54e5b7412216d447a1d8362c9653148d98c02cdf65fa733/certifi-2026.10.19-py3-none-any.whl", hash = "sha256:42d35340cc5b9ba78e818ddbff0c5b1c2b779de448a340fd1b989f5fa8670e1b", size = 136464, upload-time = "2026-10-20T02:24:15.072Z" }, -] - -[[package]] -name = "charset-normalizer" -version = "3.5.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/33/1c/f41d4e74c28ab327ff3acd36053f7ea506c55872d7a90b0fa71aa3ab0c89/charset_normalizer-3.5.2.tar.gz", hash = "sha256:39de2a259fc954455c57274dc94c79d5842774e1247a016aff30bc0efed0f4ef", size = 172659, upload-time = "2026-09-30T04:39:23.398Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/22/67/6a0b94a7960d5e1b5eacd2fb529f3fccc47db4644f7f0a7cfdcfc3be578a/charset_normalizer-3.5.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3d21b8b13c7592db2ac5e544a6d83187b995257472b0c9e8351b6d507ae37ed6", size = 370642, upload-time = "2026-09-30T04:35:06.91Z" }, - { url = "https://files.pythonhosted.org/packages/fb/94/01009e13b94041599004edf32e56e382c24e570f60f79bab8efe45cfe1eb/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d760fe2a4d7c3b226cb9026d6a842868d52a7901bd98420e1baf14e80da85cf5", size = 259280, upload-time = "2026-09-30T04:35:08.448Z" }, - { url = "https://files.pythonhosted.org/packages/66/85/3b5358f60a13210f0b67d3755c168ef758701b021e655d88d4da28554467/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c9790464842f85f437dbbb54417eda1e0e6bfc52dd8d22d6fd1c994b73b2dc74", size = 245335, upload-time = "2026-09-30T04:35:10.104Z" }, - { url = "https://files.pythonhosted.org/packages/74/75/77c1c479b09ecd751d1e767b251ea5c14d4d50ff757bf404afab2692f600/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4685902cf26edf013ed7a3da0f426ebba7a00ebb9541386d835afbf002c11cab", size = 291707, upload-time = "2026-09-30T04:35:11.575Z" }, - { url = "https://files.pythonhosted.org/packages/0b/0d/363f78cacb70f58f15f4b083961bbd9d292f335d3f5c66fc4f1cfe69cb90/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4495c5002a7b28557e7e222e77e0b661183e432b7d6d2e788101e3f240e05b8c", size = 286747, upload-time = "2026-09-30T04:35:13.022Z" }, - { url = "https://files.pythonhosted.org/packages/e4/ed/cf505d3011ffceb12c2067a7a5d3cfe92b875d4d44bb0ff0d69375e2c184/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f", size = 269972, upload-time = "2026-09-30T04:35:14.606Z" }, - { url = "https://files.pythonhosted.org/packages/15/d8/f0a93a431d170e7ca681d4f6650fee3de934d18560e474e7267eb4b0f987/charset_normalizer-3.5.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ef4fcbf3327382cd4c9f540babd61248208af7b93eec4de397b4d5f58a09e288", size = 269339, upload-time = "2026-09-30T04:35:16.087Z" }, - { url = "https://files.pythonhosted.org/packages/86/bd/9b2bd1c5b7af02462c9752d33994834ff972a96b4c483eefde9e594488e2/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd16aabe4a02a297c23417aa17ac6299dbd8c49f673bcd645b4929b11f5a4400", size = 261683, upload-time = "2026-09-30T04:35:17.488Z" }, - { url = "https://files.pythonhosted.org/packages/76/a5/cac540ab0fd61f3fec88ad3dbb64509e71424593d73cfdfff5ab3e4db279/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:fb9e68df06293761f9fe66ade60a9bc6d0f5e42b8acf2939a9158af86ab0e5bd", size = 248143, upload-time = "2026-09-30T04:35:18.849Z" }, - { url = "https://files.pythonhosted.org/packages/71/7a/ff467301deef2089fad87f72df9e000a26a78fec7acbb18e1999371b8369/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:59f63901b0031c3136cf64704dcb21de0bbae62ce2c9529bc39d27665463de37", size = 292358, upload-time = "2026-09-30T04:35:20.326Z" }, - { url = "https://files.pythonhosted.org/packages/ad/77/22d7e785d1e210afc2e2f58600dd1799d17a35665faf84383f002826c5f8/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:304d5463e65a35d7bb0850550e0780395395f6fcf452f04db7d5ca7cecc425ac", size = 268766, upload-time = "2026-09-30T04:35:21.72Z" }, - { url = "https://files.pythonhosted.org/packages/ae/91/e8e946267f1c2d9e2bd651726e2fbd2addf02c4d36cea5069e32ca9d7bb5/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9cf9b1a857e25c4baceeb3624e92a56df3668f398c4acba74e174d81fb4d1d3a", size = 287432, upload-time = "2026-09-30T04:35:23.273Z" }, - { url = "https://files.pythonhosted.org/packages/4e/88/7561d8a88d555e7df6623abe7c0070b4baf47549b9408783a2ae0a1a6cf7/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:114e4d0c92d618409ed82a99e22b5c5e768fe995f2973f78265f4524f49d4640", size = 272470, upload-time = "2026-09-30T04:35:24.655Z" }, - { url = "https://files.pythonhosted.org/packages/35/7e/578c702301ec036f01455f30744a08d2b42f6ab35b9b2d4bf8cae0ef2a80/charset_normalizer-3.5.2-cp311-cp311-win32.whl", hash = "sha256:2625388c6c754520c37abaf3b41eb34d1cc4a373f457898f08606c8e362b891d", size = 186688, upload-time = "2026-09-30T04:35:26.225Z" }, - { url = "https://files.pythonhosted.org/packages/e8/fc/fdf8cf52ff21cd5bf158f20978991cf985325842f74283eb6df26c8a39d8/charset_normalizer-3.5.2-cp311-cp311-win_amd64.whl", hash = "sha256:87e50a3e7cb90af586b6c5faf23e302a970415ac73bd7bd90a515a04b427ef96", size = 214932, upload-time = "2026-09-30T04:35:27.796Z" }, - { url = "https://files.pythonhosted.org/packages/97/66/3e45a506d8110b632541faf9a9470185aa9878f1ed44020f31346c1c5e5b/charset_normalizer-3.5.2-cp311-cp311-win_arm64.whl", hash = "sha256:254eb48b9fa5ee9898a3c445825a1f340fe53712a098904b39b0bddba8ea3cb1", size = 202828, upload-time = "2026-09-30T04:35:29.259Z" }, - { url = "https://files.pythonhosted.org/packages/e7/c8/693809898870237d82785a03f3b2b58fe4c9f14669f84a7d4e623c92a59e/charset_normalizer-3.5.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ed2a239c0ea213acc1908150a3037257083c7c083128f1a4cec2ec4b97dca491", size = 367780, upload-time = "2026-09-30T04:35:30.888Z" }, - { url = "https://files.pythonhosted.org/packages/c9/87/2fea8c13dc24b3ca9c6f803a5b2dfdeae73eb4f9e12c7885ed908ff0433c/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b91363207bd9dc966a691e959bb47f64b30f7ac4b072be9968b366982f7db77c", size = 246730, upload-time = "2026-09-30T04:35:32.286Z" }, - { url = "https://files.pythonhosted.org/packages/a8/9e/09efac30b937722f46d3110ba30b875b24b2e3a266ed746cc4e376a94d80/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:38a873987f3be698494da8b2e3085e29da02da7b633dce73e79c699a113d7bf0", size = 237707, upload-time = "2026-09-30T04:35:33.709Z" }, - { url = "https://files.pythonhosted.org/packages/9e/18/70d76670b13686237863a379928d60bd10e021f17d243ab3d7014c4a5f4e/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:355ad8011081dec5412240c087a9a0c9d4d5039f3ed11a3f13e18c2b29b56c51", size = 273050, upload-time = "2026-09-30T04:35:35.138Z" }, - { url = "https://files.pythonhosted.org/packages/54/e2/77a8b09d5adc013ed07b95b01b8b8fa5441c4e810e83ee7e4aae2fa4d91a/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ee21e28f0430bd6dc9086c6e525d5e818a44a5ad19720c8a0ef766792f3eb5e5", size = 270345, upload-time = "2026-09-30T04:35:36.502Z" }, - { url = "https://files.pythonhosted.org/packages/7f/c5/38806a25ab5e65fc178f39affeda20858efafede2fce1ffc2556cfc9fe73/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3d31298449090ab8d47b7b1b2a555ff73cac7ed438a08b7ac160980c7ebed649", size = 257601, upload-time = "2026-09-30T04:35:37.919Z" }, - { url = "https://files.pythonhosted.org/packages/ae/8d/213565184708fdb263ae55e2c04ee1ff748129dd65d48ed0e3502da9c85a/charset_normalizer-3.5.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5cde776b7cc66e4f6c99612cea4aa7269aa65863f7a15841b2c264f103822f4e", size = 252222, upload-time = "2026-09-30T04:35:39.544Z" }, - { url = "https://files.pythonhosted.org/packages/7e/24/76d2cefc25472531e4c5c7dfff68865eb1c39b78482f0fdc15b46f047830/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ae4f5fea5b8b8ccff88238cc8569303e5ee95efae67fa62922a311397a71f346", size = 248482, upload-time = "2026-09-30T04:35:41.088Z" }, - { url = "https://files.pythonhosted.org/packages/7d/dc/65a801b66ab4c197e22c433ab25e7ac24324ac6f45a2269aca42cce309bf/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f7d486c83842422badd511868fd8a9a20e9407ace71564b6af47ce7e60a336c1", size = 241206, upload-time = "2026-09-30T04:35:42.59Z" }, - { url = "https://files.pythonhosted.org/packages/a7/95/ca9b5eabde673002c6f1e7ada1b223916fe18f6d661da7aabd4d643718f1/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:11a4d68a6ecda3292cb1e50239e111543ba5d709bb62a6b4ea1afcfa729d8875", size = 273190, upload-time = "2026-09-30T04:35:44.347Z" }, - { url = "https://files.pythonhosted.org/packages/2d/8b/803b4d2a3f6e1740f63f1e87b04d14b42f3d4fdfe6ed7d4db2d34102b14f/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d6734d2ef8a50fbf8445c139477da401f50d62a0606bf00e20ec6d87773fefb1", size = 253527, upload-time = "2026-09-30T04:35:45.915Z" }, - { url = "https://files.pythonhosted.org/packages/a9/55/93c0e5dbd085ae0471346026abbe7e0db9ea2d6fea74e51f0b5a46f233a7/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a815775b6c38d4e0ff7bcffbeba67feded90202bb6a226b8dd35f1c855217413", size = 271285, upload-time = "2026-09-30T04:35:47.49Z" }, - { url = "https://files.pythonhosted.org/packages/95/69/0dbd0e0b9b16cfa816cdfcb3e2e3854a1f680dc07fb1245ea125e7448060/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:23851fb4e1b85ed3f6c2a27b777cdfe2e19fb5b38429a8faf38c7542b7665869", size = 260010, upload-time = "2026-09-30T04:35:48.996Z" }, - { url = "https://files.pythonhosted.org/packages/58/9d/e7b88e7b1bf403590c3b573277b5e1e488c68c7a6fbacca310a2c324e90c/charset_normalizer-3.5.2-cp312-cp312-win32.whl", hash = "sha256:db19d07e2e0129e974a0e65d0064fc222a446cd5122c2fd4184d2af9fc734a9e", size = 184125, upload-time = "2026-09-30T04:35:50.777Z" }, - { url = "https://files.pythonhosted.org/packages/eb/e6/e6e083884cbcfd49c64865af05027fe7011be7b2d9179524f099a1b611f3/charset_normalizer-3.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:780fbe7cab297b81dad9fb8dc5eb003c0468ffb0d9e5f65068c53a34661a96bc", size = 207486, upload-time = "2026-09-30T04:35:52.194Z" }, - { url = "https://files.pythonhosted.org/packages/c4/e3/017aea0911ada7405a825c7d937eb3a13009664e2f5b38e8c4bbf2abf894/charset_normalizer-3.5.2-cp312-cp312-win_arm64.whl", hash = "sha256:e2af3aad578aa6bd1384bcf4750fc285e5a9de53f40b7d41e5a0bf748edeb2b3", size = 196734, upload-time = "2026-09-30T04:35:53.636Z" }, - { url = "https://files.pythonhosted.org/packages/c5/34/68292d68512768591aaff07c59bb53ee31341c87759433a859c4641a50c2/charset_normalizer-3.5.2-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:ed905975ab14056a2e5eb1c376cb2e1ebc5396baf84163939c518556fccde9f5", size = 225946, upload-time = "2026-09-30T04:35:55.313Z" }, - { url = "https://files.pythonhosted.org/packages/e3/80/bee0b01b90ccd5322ae1d0abb33fab1bd95b7c2eadaf02aeccf22e04ee83/charset_normalizer-3.5.2-cp313-cp313-android_24_x86_64.whl", hash = "sha256:a66c3bc5ab1f0ff2164fc9965ddd611ff0802173f4b9d24554c563f6ab7e1d6e", size = 238619, upload-time = "2026-09-30T04:35:56.863Z" }, - { url = "https://files.pythonhosted.org/packages/78/6e/60ce52a85a7fd631ae8482ae6d74521014ca2f255892679484dc04d7ef56/charset_normalizer-3.5.2-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:d2374b62878abb00cd8309b32af6c0b715cd02dec0ca74ef12e5069bdc64144a", size = 206701, upload-time = "2026-09-30T04:35:58.639Z" }, - { url = "https://files.pythonhosted.org/packages/36/8c/71aafad23f971afc84c2b295bc0c560739ce1dac558aad9fec22e39f3639/charset_normalizer-3.5.2-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:d376bbd28b3a8999db1a103b3b388aee6f1ddeb3e51bc2172993efdcd86e064d", size = 210506, upload-time = "2026-09-30T04:36:00.147Z" }, - { url = "https://files.pythonhosted.org/packages/91/da/3c5a7798c046df7d2d68ad653cf5b6c5a8bfee225055a843c6f2f42aac1a/charset_normalizer-3.5.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6045373d5a89a5ec71afde535db987ca28e76dfa276c2d4c818265b375d4b055", size = 366626, upload-time = "2026-09-30T04:36:01.77Z" }, - { url = "https://files.pythonhosted.org/packages/e1/16/710ac3de2ee354e2bd1a9c94efe45a2d27b5c6ad39b2d6a905be2c094b6c/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:849df64e889b2e17230d58410a03dba311a65b163508fd33679b2b737d4b7858", size = 244624, upload-time = "2026-09-30T04:36:03.389Z" }, - { url = "https://files.pythonhosted.org/packages/d6/39/45c7439f5b63d24f7d5b2a1d760f34af7628782d7144b4cc8ded45c2d4bc/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:15c44f7edfd477b06f517a5cc317fc1707edb9de2c865f43d4b6513907473234", size = 235731, upload-time = "2026-09-30T04:36:04.987Z" }, - { url = "https://files.pythonhosted.org/packages/4d/34/38f3154785ce92e9f56eb226f4d35bdfae6b008480dd055f58837a89c810/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a89012d6d5476ee112d20d998570ed58df2260a852afb1758809cd6900411d21", size = 270352, upload-time = "2026-09-30T04:36:06.412Z" }, - { url = "https://files.pythonhosted.org/packages/04/f3/859f74e7babc977705026b30593b3be04049632a522fb7000f83c033d747/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0c951d5e6dd9c2ff60609476752bee49da4206adde960ebc247766937f72e718", size = 267393, upload-time = "2026-09-30T04:36:07.865Z" }, - { url = "https://files.pythonhosted.org/packages/4b/85/41d27f234b82e47c167a5f6c0f62501dc0c640585ff4aba79e08a390336a/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7218e8f32b0956cfcd048fd42d9d5779809745ca1d86113ca56f66e7ae1549c4", size = 254660, upload-time = "2026-09-30T04:36:09.248Z" }, - { url = "https://files.pythonhosted.org/packages/58/ca/5d1a997587febe5b26d8daffe363b5c1a091cece19828eec6502fd09c5ef/charset_normalizer-3.5.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a19a731138fc27d5682277d3b9df22855cea1239bce7fcec5f78f42ef2d1f3c3", size = 249996, upload-time = "2026-09-30T04:36:10.73Z" }, - { url = "https://files.pythonhosted.org/packages/b3/1f/d1e78246f7ed60c8c8d606b4ac27f66ce49cc3e95f24893ccbeba9f77302/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:62603db9a7caa0802eaa28c1c46fecd7b3a263a774069c24c3c28c302448721c", size = 247028, upload-time = "2026-09-30T04:36:12.294Z" }, - { url = "https://files.pythonhosted.org/packages/8e/37/eba316edd4f0c4d3a5d945924c4eeeae59abac4056aa815d8a4268f863a2/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:b6856554c4f44d79fc2307d5768854310a8f0096e501c75637542c82292b0429", size = 240562, upload-time = "2026-09-30T04:36:13.887Z" }, - { url = "https://files.pythonhosted.org/packages/c8/8e/aaa037d40ca9ef045977f1a661048b1aa33f223adfce3452fe9be9f79d14/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:1bc0baf5ef96b6ede57d47f4b8fe4d9d84019c3bfcbeb20a41edc6a6ee341f1f", size = 271699, upload-time = "2026-09-30T04:36:15.41Z" }, - { url = "https://files.pythonhosted.org/packages/26/19/1c1c9f75974adf523b87f34b8a2adc5a435cd65916812bcbd0dfa45f9a29/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:56bc200a365efb37383b7852e4cc5898d3b2da5987289b543956cf8cad71018a", size = 252030, upload-time = "2026-09-30T04:36:16.839Z" }, - { url = "https://files.pythonhosted.org/packages/bc/90/0660ef18e18df0a4d2a1a0edff7dfbba42d4e50ef2425557a5bb7051f77b/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:2c9ad19a6cfcd5ea5c0d41161d22f9df1dcc277e9bef2751391334546a314c00", size = 268565, upload-time = "2026-09-30T04:36:18.468Z" }, - { url = "https://files.pythonhosted.org/packages/79/ba/57adc269824e8658f1a0f97a9e514c247445a9632b3419b97e0ba37f16dc/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e243bd13217235fc7290c621941c3f5cc8b66e4872495be821d7436ba2fb838d", size = 257627, upload-time = "2026-09-30T04:36:19.938Z" }, - { url = "https://files.pythonhosted.org/packages/9a/85/33abd4315c052d3d4f54c92b1ee49bfbc0dc7115a981e462a793b6d2ab87/charset_normalizer-3.5.2-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:a090bb2c68df85450502e3e20d665e3a5af9c65a84d6508ed477badd49166fd3", size = 143407, upload-time = "2026-09-30T04:36:21.376Z" }, - { url = "https://files.pythonhosted.org/packages/4f/de/6435e18d1aaa5d910b896d551411c96af1f42a0c56c29afc2016c61ccc2e/charset_normalizer-3.5.2-cp313-cp313-win32.whl", hash = "sha256:2b7b3bbfb4fe8ef40600792d762fbaa9057559f9d3fad209525b7a22b99e91fd", size = 183207, upload-time = "2026-09-30T04:36:22.776Z" }, - { url = "https://files.pythonhosted.org/packages/9c/76/b8ec57f4e9ee3253541abf95e4a462c0175fe8032dcd070f1f2421240942/charset_normalizer-3.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:78456a747de8dc58360ffa581f30a002baf5aa28cb262536545e91f113ed7639", size = 206489, upload-time = "2026-09-30T04:36:24.306Z" }, - { url = "https://files.pythonhosted.org/packages/3e/60/c647c6ae47480221e875ea5d743ff94946f7416e3c69415ab772928e8d32/charset_normalizer-3.5.2-cp313-cp313-win_arm64.whl", hash = "sha256:11912e4bb14baae7c5d8791aa55ba0a3a03ec6729073307b0f57270abaa713d3", size = 195501, upload-time = "2026-09-30T04:36:25.846Z" }, - { url = "https://files.pythonhosted.org/packages/58/ca/7aa91362a2f77ac8e9e28a9b902a74f7d0e11a851ef0d27a74308da8cd90/charset_normalizer-3.5.2-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:1afb975bd5d68d5ce9f6b6d44fdf2f7e34b895a35e95708a7a91b20a3b51d187", size = 226010, upload-time = "2026-09-30T04:36:27.669Z" }, - { url = "https://files.pythonhosted.org/packages/a8/cf/ac8878d0322cf88a1aad4c7b147db32ca0bd806eb0060957b2e31486dbe6/charset_normalizer-3.5.2-cp314-cp314-android_24_x86_64.whl", hash = "sha256:bbbfc8e28816f19d7c0f1816664980c0a9875d01b27cdf8eedddb639d9e108ad", size = 239266, upload-time = "2026-09-30T04:36:29.434Z" }, - { url = "https://files.pythonhosted.org/packages/c9/6d/9a08d7e0b29b7208e2c6c01dc56c8e0520e7c7beadbbfb024b58fd69c8a5/charset_normalizer-3.5.2-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:7967d08cf06dee78443b874f98c98036f624f3a4e73e11f9f64f5be4d25393cf", size = 206783, upload-time = "2026-09-30T04:36:30.872Z" }, - { url = "https://files.pythonhosted.org/packages/82/44/b0aa350280e6ff5a5492d17cf10460dd39d5ee848f872f7ba2df10607f60/charset_normalizer-3.5.2-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:4c2b5031f63e331e3839b40aed2dd6f191e9c07edbde303e7876846ea1946995", size = 210449, upload-time = "2026-09-30T04:36:32.625Z" }, - { url = "https://files.pythonhosted.org/packages/7c/8a/40db9aa9f5907bb0e6f8b6d64064bf8852fb33d4b813ff9414911df7647c/charset_normalizer-3.5.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:fcff63213e8e6e47770541a4607175404f47cbb3ebea7b6058cc82d524a0e424", size = 367815, upload-time = "2026-09-30T04:36:34.197Z" }, - { url = "https://files.pythonhosted.org/packages/7f/72/9c5e7707b57c8ddfa9ddf7b0b1d009d7fbab9e9e887d5b721060f37e307d/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8d86d6fc60743dc916eb79e2eb1ec4818e21e427731543af40a3021851174a13", size = 247095, upload-time = "2026-09-30T04:36:35.803Z" }, - { url = "https://files.pythonhosted.org/packages/83/09/71e453691e927de4ddf792770cfaab3f49d494e222f66ea5e404bbd5e39c/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7a881931aa470808df94a8c380eed2bbbc76cd9dc622310f99665658c821eb6d", size = 233942, upload-time = "2026-09-30T04:36:37.407Z" }, - { url = "https://files.pythonhosted.org/packages/9f/86/85c84e4da8b27dd409577d9437926ff581c5f9d3c66038dc68c1a526de51/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8024d00c3faf3fc0c16e07a69f4405e8eac7cc0ab15f65fe6cf43827c4cf72b4", size = 273762, upload-time = "2026-09-30T04:36:38.904Z" }, - { url = "https://files.pythonhosted.org/packages/92/08/564955a4b5f2ccb410ab480bbe8c6a18063ff27f2d35458731c4a5335df9/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4d48f2d08b9de5864e2c8744d4461b862fb149a18274abc8b698c45975573438", size = 269514, upload-time = "2026-09-30T04:36:40.469Z" }, - { url = "https://files.pythonhosted.org/packages/18/24/bad3ac4271589df29cf5ce2f5ae490518a5739358052bd0d61209e6fea54/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:34276fd796040bf0993ab33a369aa572e6979c7aab225a88893667ad8eac8f7a", size = 255056, upload-time = "2026-09-30T04:36:42.02Z" }, - { url = "https://files.pythonhosted.org/packages/d6/3e/350d89ad49916b86554d6f5f2d03ec1152148f87e5ff735106c6a03b1a36/charset_normalizer-3.5.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0521c5665880b33d603717defa76c094048900010897909952397feb3039da56", size = 251311, upload-time = "2026-09-30T04:36:43.577Z" }, - { url = "https://files.pythonhosted.org/packages/56/5b/4970a2d154df502e133402906dd04e3ae7cada7b3011283c88d0479a2585/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:eff0ac9dbe711a4aee69bf04a83896aa9b85f19641264053a9f6d48573abb7dd", size = 250190, upload-time = "2026-09-30T04:36:45.185Z" }, - { url = "https://files.pythonhosted.org/packages/88/8c/f1a91bddc8fb47c2889e29ea7ea49a194eb0d9868675d786806519c00d76/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:1503bccbeb36d5527790c3930327704c39af22de3112f1b1666a9f3ce15ee204", size = 237098, upload-time = "2026-09-30T04:36:46.689Z" }, - { url = "https://files.pythonhosted.org/packages/24/0e/bb5dace3cc7e79068425386a6589c19b5a2ab5fefc2a46abea6919683332/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:52aa6992700996af31f375de0c6bacd402b0097fe40b53c426b9f51a90ebabc7", size = 274228, upload-time = "2026-09-30T04:36:48.31Z" }, - { url = "https://files.pythonhosted.org/packages/9d/79/b849ad523017ea9f5a45581bbebed91439e0cf42fd2860a6f64e358eb5a6/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:e09a3942ecbdee5cce73ea9d42da82b81b72ac1bf031ce069b93b5adf4eac8cd", size = 252401, upload-time = "2026-09-30T04:36:50.091Z" }, - { url = "https://files.pythonhosted.org/packages/89/8c/75469d690cf47200bce8f6cad7655724fc23148e147abfc5ce78b5f65863/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:c7c9ab723cde841fefb34efbad91e87f00a674b1fe1cd0784fde742bf2c154dc", size = 271846, upload-time = "2026-09-30T04:36:51.719Z" }, - { url = "https://files.pythonhosted.org/packages/26/cd/6d52d3c7437cdcf2e310ce9f28f282e733d4ef60ed19105d1819c356255f/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ddc7dacc8ece3a182e7f15cb862d1fd616b46d076cb1ae9dd232b2c38b655874", size = 258151, upload-time = "2026-09-30T04:36:53.234Z" }, - { url = "https://files.pythonhosted.org/packages/f7/4c/070b38bdb5f49a70199fce923ec0726a49536a63ab262abbfcaaf351110b/charset_normalizer-3.5.2-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:ee43c17b173d46a3212baa6ead3ae258eeabdae48c263a01ccf0218c366dd655", size = 143570, upload-time = "2026-09-30T04:36:54.816Z" }, - { url = "https://files.pythonhosted.org/packages/81/84/9ebfc8ed6c8c4fcd8e726ff6bf220cc8deb3966e31dce9be8dd8aa017e64/charset_normalizer-3.5.2-cp314-cp314-win32.whl", hash = "sha256:4f87960d57feabfb618e4e0af6e7371645fa26a277860739d6e5d6e0012c92f0", size = 186412, upload-time = "2026-09-30T04:36:56.643Z" }, - { url = "https://files.pythonhosted.org/packages/d1/78/5ed86f743d4bc350db307e7636419a0a5ee1d91806d30c7f667bd5c80dae/charset_normalizer-3.5.2-cp314-cp314-win_amd64.whl", hash = "sha256:e4e81e09c1578b8df602e3db08b0b3ea0a6947ad612f52bf8dc5ea8d47691f0c", size = 210965, upload-time = "2026-09-30T04:36:58.205Z" }, - { url = "https://files.pythonhosted.org/packages/53/94/a3a7698e9b1a395e1eb99ccd9a324be9347973bff4e72db2a06496d7cd27/charset_normalizer-3.5.2-cp314-cp314-win_arm64.whl", hash = "sha256:80d02b6f04e92601a081dd97b23d3128033098bff5d35d392ddcc0476ea11253", size = 200406, upload-time = "2026-09-30T04:36:59.764Z" }, - { url = "https://files.pythonhosted.org/packages/c1/48/c5dd00d5ef7791f02666de250a5bb6071e29b7e133cf4b835800b6d3bc27/charset_normalizer-3.5.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:dca9ab98072a5a54ebacebdc45f53e645336b320c667410b061be1ca588ae709", size = 396871, upload-time = "2026-09-30T04:37:01.543Z" }, - { url = "https://files.pythonhosted.org/packages/12/c8/8379554b42e8368161d898476686947a0fdbd3e8865170d7909dcabfdee8/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0aa869112ef88429ae17820d99c3dd9504c9e9c671d3c246f3d7442cb051084", size = 249711, upload-time = "2026-09-30T04:37:03.111Z" }, - { url = "https://files.pythonhosted.org/packages/4a/eb/2ddb1035d17320caa9f41682935123a9a250277b261c3efc86b2d2a21343/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c0afc6800ba57ccc350374c5bd6150419915d95ce93cdbab2d783d75eaf30ecb", size = 231146, upload-time = "2026-09-30T04:37:04.721Z" }, - { url = "https://files.pythonhosted.org/packages/4a/24/2ecb4bde104322cd7859d6594fcfa74649f8d90b3221c9feecbef149875b/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7dcd882da75ef9adf94903b1e3b9419e8aa8fb4c7396822b834b9ef7fb96954f", size = 271552, upload-time = "2026-09-30T04:37:06.295Z" }, - { url = "https://files.pythonhosted.org/packages/3f/98/9d5f6ebc3aee9fef5d30b4aff11fb2ab7a1222b4064f8ef2c7c87cde217a/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2e06a3a98f916dd41d27f3105e02e7a40181c98c94b9158733d03a6f80506c09", size = 269810, upload-time = "2026-09-30T04:37:07.905Z" }, - { url = "https://files.pythonhosted.org/packages/09/e1/a3b06a10461b1b7628853c934c644e03bc28e42767116afb52f19a56519b/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6bd128f206a7752ae1f2ab6c61bf8a24ba28913a10df8b14c2637b973ff97a80", size = 259845, upload-time = "2026-09-30T04:37:09.554Z" }, - { url = "https://files.pythonhosted.org/packages/fd/d3/6f561f74a296cf27d61775a1dc665ad13f3bff6a798810ca05907f37a7c4/charset_normalizer-3.5.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c8f3d67aeaf55f017982b73683f0e7342ba2f6635a78f69ce89ebb26aa411e5c", size = 252825, upload-time = "2026-09-30T04:37:11.274Z" }, - { url = "https://files.pythonhosted.org/packages/26/9f/69e13ca3b18f43e0eafcd34c04a45b732ae22a43b54a5fc9e119103356eb/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:fe9753dfee015c570d73df76f899f18444d41388bffcde097deba51c4fadbb9f", size = 252659, upload-time = "2026-09-30T04:37:12.941Z" }, - { url = "https://files.pythonhosted.org/packages/73/a9/ace29806a0dae18939919c76ba526472d83214afa101105fabff2cf30625/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:92888bb3187c5ba50500b00b3b310c9f2c651709d28036077680cb5255450a03", size = 238819, upload-time = "2026-09-30T04:37:14.659Z" }, - { url = "https://files.pythonhosted.org/packages/f8/c1/6116d52a2e3311ec80f21f5fb5e17b27405f10b9608af8f6e69516841a1b/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:d008d90a7f2471519aef0c90dfbe73b3e6e4d5e66ac48e19154c17e89e98b604", size = 272973, upload-time = "2026-09-30T04:37:16.346Z" }, - { url = "https://files.pythonhosted.org/packages/19/aa/9955c7e93bba10a9c7e8f7a5031b7ced66f3a1883a55c00712b8d5850ff3/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:31f3930700408d211f13378ccbe1c40845d8da54bd0681fac3a9b5aae81c7aa8", size = 253692, upload-time = "2026-09-30T04:37:18.212Z" }, - { url = "https://files.pythonhosted.org/packages/bb/33/2a6ae7fdc1b10cb581cef91addd8cdfc5f40d50abb5702309369d5834579/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:2a925889534b3748302dae5dead07cc13480de1dac3aea80a941b729b471ef93", size = 268757, upload-time = "2026-09-30T04:37:19.877Z" }, - { url = "https://files.pythonhosted.org/packages/a2/22/80992720a0282cd39bba1db35868e6b9c22f41281160143a836544bc1d8a/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f5ec61164adcec446f8969a3358ec3f9b26bbda3b9213e5586d219afa8df2915", size = 262220, upload-time = "2026-09-30T04:37:21.583Z" }, - { url = "https://files.pythonhosted.org/packages/92/9f/181fd07e1bffea1d95cd80c84ac537354f50699c22cfc4d3c02b6fc16208/charset_normalizer-3.5.2-cp314-cp314t-win32.whl", hash = "sha256:598a11a2c7ebaa5334bf698bf29568c9c390abac6a154d8170fedecd1cea38c5", size = 197797, upload-time = "2026-09-30T04:37:23.235Z" }, - { url = "https://files.pythonhosted.org/packages/49/1c/25d8415ec1c4f2f41f1680435e4c87cfb378ff2f677d950946f2a45d0632/charset_normalizer-3.5.2-cp314-cp314t-win_amd64.whl", hash = "sha256:7fdde2c9fd9e3eca40631e024664cf2584272cc8f96308cbe5fdfc930f51d8bc", size = 222765, upload-time = "2026-09-30T04:37:24.891Z" }, - { url = "https://files.pythonhosted.org/packages/3e/b4/46b48f013dadfc0d0d33b375438e31bdf5a989dc68389c6bf627054d4df9/charset_normalizer-3.5.2-cp314-cp314t-win_arm64.whl", hash = "sha256:d1befeed746d247c81127bb14de9dc3d30edb6e5976d34f83f86ed262b1d9105", size = 210985, upload-time = "2026-09-30T04:37:26.634Z" }, - { url = "https://files.pythonhosted.org/packages/ca/e9/34e597dee616d0b8ee4b34d29399e85c2204ade174157a48505d42baa4ff/charset_normalizer-3.5.2-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:87475fabc8d9996fd9c27debb395e642e8c838d78a00b6e932227a0e06b81e26", size = 367676, upload-time = "2026-09-30T04:37:28.329Z" }, - { url = "https://files.pythonhosted.org/packages/60/9f/a5d1c91c0263745e2cd344c5a4415d787c575501ab1d449f1148ac6b495d/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9409a8bf35cf78353942504b24a57de3d75b708997a1e4bd8db71ac8633ce364", size = 248414, upload-time = "2026-09-30T04:37:30.167Z" }, - { url = "https://files.pythonhosted.org/packages/26/79/e697f77464748a3ee3cf490c83d592459400d4898380d66c38366b03080c/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:498dc3188ca05a68231ac3fdbfc7f57eb67e1343c30e0fea17f8218c1599b253", size = 244775, upload-time = "2026-09-30T04:37:31.964Z" }, - { url = "https://files.pythonhosted.org/packages/ca/87/3d42a42e18ea066e2513936fd678a00696e77878b5ae04528976abdbcb83/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e242bb1c5e76e97dfa9e7f209a71e93a01d7f19ffdd5cfbb2e2d55b4f08f8ab0", size = 273877, upload-time = "2026-09-30T04:37:33.661Z" }, - { url = "https://files.pythonhosted.org/packages/c3/76/8a28136f3938ba9836f84280ce0c4d61ed1cf15a036b2034900c62634162/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:def79fa35ef0cef8d2accec024f4fdc7ead3012ff02f5215c783f39f03ef8cfc", size = 269455, upload-time = "2026-09-30T04:37:35.573Z" }, - { url = "https://files.pythonhosted.org/packages/a0/a1/4fbf5d0f0f1b2a080474c1cf9a2f12c4c6531bb0e8ba591055e846d2b4e9/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3df041de8887954562c9b261cba85ca0e9ded74048daf125f45edcfaa4832229", size = 257336, upload-time = "2026-09-30T04:37:37.397Z" }, - { url = "https://files.pythonhosted.org/packages/ba/a2/8b50aa320adb880ad579518e6f718f24944804b42a88b83d267d5d444125/charset_normalizer-3.5.2-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:04851f73ae72b8413dddadb16a49dfee95263553741fd42d546f7d66907e6be5", size = 257584, upload-time = "2026-09-30T04:37:39.522Z" }, - { url = "https://files.pythonhosted.org/packages/a5/57/50e3fed84e175f40349bd0da7a4fce94c87f0378f52d74f511d89e0bdc20/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:183b88127acdb4fabe59d951ab424faf1af7b63cdbb5f776186c1ea2ffcaed98", size = 251854, upload-time = "2026-09-30T04:37:41.23Z" }, - { url = "https://files.pythonhosted.org/packages/d6/54/f7fbb3493c9f49091213b9c2d6dd65800696f1ce1a3f196a4205f50417b1/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:16fa0eccf81304b79c5cd87f9271c3b85dd9dd99245e4422ae9c0dd45e0f99d3", size = 248767, upload-time = "2026-09-30T04:37:42.883Z" }, - { url = "https://files.pythonhosted.org/packages/d9/37/b3a6385acc5a1e45b39ae9c90bfb9cf838a09b9dd37ef2740ab4c6b4a2eb/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:7441d755b7ab94f8d4eb3e43ec05482d760842fd263d003a99102d742cd835e2", size = 274479, upload-time = "2026-09-30T04:37:44.658Z" }, - { url = "https://files.pythonhosted.org/packages/89/44/809913e2cfd279e635a9294fdbbfb1b1dc62a8189d473d561f649fce98d8/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:ca403d7e4798f525fdfc78e258820419cbbd0f0ecbab9de7840e3c017cf6b8cf", size = 258310, upload-time = "2026-09-30T04:37:46.529Z" }, - { url = "https://files.pythonhosted.org/packages/af/a2/f28400ab13359d91bd39179df8e149376b9bf36588e739a3a4f9de2b84b2/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:df29a0a7107f7011e77f4eebdddec4c7331e24d787a0b21a46d63bdf7445da95", size = 271100, upload-time = "2026-09-30T04:37:48.399Z" }, - { url = "https://files.pythonhosted.org/packages/e9/89/9bab37955edf0adb3b66f8a3a6617d9f2f487e0d56f295a6a286cb640aa6/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:f3c96f633825733f735c5a9cf21d21a257d8e1edf0b1cee0a064b9c424ca0f7d", size = 259936, upload-time = "2026-09-30T04:37:50.023Z" }, - { url = "https://files.pythonhosted.org/packages/23/b5/4459e08d45a679f903d50fea08bc52cfa728cca4d7bd02c757b5e5abda2e/charset_normalizer-3.5.2-cp315-cp315-win32.whl", hash = "sha256:281cb91036248400f4cc957495cccd44c275c2e0c5854f7e45ac5cf7dc193847", size = 186301, upload-time = "2026-09-30T04:37:51.722Z" }, - { url = "https://files.pythonhosted.org/packages/98/e8/55d5fd3935b4bce6da4fe0df61898e8c82653e317e677bd58aceb9c60f13/charset_normalizer-3.5.2-cp315-cp315-win_amd64.whl", hash = "sha256:89b53f3cda69831909888e0494f4fa0bcd3537e3e138dabeb620bd6ad946bae8", size = 210858, upload-time = "2026-09-30T04:37:53.427Z" }, - { url = "https://files.pythonhosted.org/packages/a9/5b/974423c2fd8e524c7a7f64318c1e02240ef954912fa2b4d70344107b9c68/charset_normalizer-3.5.2-cp315-cp315-win_arm64.whl", hash = "sha256:6be488a102b8cf28d0391d8c4ba7748938ae28b78ad901f8585520fca33ead1a", size = 200309, upload-time = "2026-09-30T04:37:55.015Z" }, - { url = "https://files.pythonhosted.org/packages/ee/f9/00ee0195db1013d8f7c416fd770fbeb560bb46eb2e36b054d05cb56f6cfa/charset_normalizer-3.5.2-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:915563965d418f986e7e145accc592eae9e1a1be3566ff98a05d7a9ec42a76e1", size = 395343, upload-time = "2026-09-30T04:37:56.743Z" }, - { url = "https://files.pythonhosted.org/packages/04/3a/c00b50e94c964cf934c7899cd47c97952fc11dad71cc5884b3c61795b09b/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:65cd72beeeca9d3aaea1201e5923859f308f952f9c71de93f06063c79f0f7a3b", size = 250114, upload-time = "2026-09-30T04:37:58.607Z" }, - { url = "https://files.pythonhosted.org/packages/50/27/d102dc880bbcffd0479ab64dfc1fb96777a854355a55e2bda72a71efadcb/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b7fd005a73d9e657273b7a10dc71a9e03c8fb9ee6999798d6918ce095b81ac7f", size = 239997, upload-time = "2026-09-30T04:38:00.511Z" }, - { url = "https://files.pythonhosted.org/packages/a5/4a/bf7ef45794dd293fab5f98a9309817977fbb845b9998f171b8cc5d8437a3/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e54da4baf05720032d527874d40b65fa4d7e5c6c6a43d0c3adbeffcaf275a2b3", size = 272313, upload-time = "2026-09-30T04:38:02.509Z" }, - { url = "https://files.pythonhosted.org/packages/e8/ee/008a2837737991474c5754bb3191010007663860979701990982a502cbaf/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:124fbf1a8ff966d87ae05bb8bd45a71f966055ed8bba320d0c7cf450bc5f4d0e", size = 269986, upload-time = "2026-09-30T04:38:04.435Z" }, - { url = "https://files.pythonhosted.org/packages/93/ad/bd74a283940dc910c5b14f8e4f80a248082bc9c0fcbe1f54530cb6d9cc5e/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:28b4f0d66fb834ff90f28209ac7bce77868c45d8c93e26f906709d9b7c2e1af9", size = 260202, upload-time = "2026-09-30T04:38:06.549Z" }, - { url = "https://files.pythonhosted.org/packages/8a/7b/ed341c66f69f688723501fac752be3d63c7159ca0d0d4174fc611e5710bb/charset_normalizer-3.5.2-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:58ca3755ee7ff7f59b57789ec9833c9de9ea275405cdd240eda1f193112e398a", size = 259083, upload-time = "2026-09-30T04:38:08.311Z" }, - { url = "https://files.pythonhosted.org/packages/cc/9d/e41588b777965e5031a43128a1e96173ebb35ac75fc53ec3b517e7c21cd4/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:443eae2bf318abeaf6f15d785138f71fd6de770e99a92158b8b814265e079115", size = 253081, upload-time = "2026-09-30T04:38:10.402Z" }, - { url = "https://files.pythonhosted.org/packages/81/35/b761eb6d8c1eb218b9b42b9b4d5ac902afdc399fb6dac6f9a9aac7bda589/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:58f361dcbab699cf8f42db3f47c8e7fd1036f138c23a5d08de9fde5f425a730c", size = 248712, upload-time = "2026-09-30T04:38:12.317Z" }, - { url = "https://files.pythonhosted.org/packages/4d/2c/147169a041b747759f37405c0a97157e8e92de967968373101ff14915cba/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:1b4cbc7c3491ccb4aa17fcd8165649d01cf39f76de1696da8631b5f71b85401d", size = 274176, upload-time = "2026-09-30T04:38:14.138Z" }, - { url = "https://files.pythonhosted.org/packages/f0/2d/0ff8db0d373ba8538db686db11cd7e8912031490b9e4f383b41912e8d594/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:ba0b1d2620edf869789c3879223f52bf2afc5d31b3cb47cc57b3a12c05e2aa9d", size = 259413, upload-time = "2026-09-30T04:38:15.841Z" }, - { url = "https://files.pythonhosted.org/packages/8a/8e/b4a085fb47c9d3a7e43576a4784fdd8fe23f907514a972de8086edaf7a48/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:5e2b6b57e9733d39f0c9fd3185efa6b8e29652c4cd8fe94180272cf6ed9a78c4", size = 269434, upload-time = "2026-09-30T04:38:17.626Z" }, - { url = "https://files.pythonhosted.org/packages/83/1c/d8d8d7322a7c3eecdf3237a4a419cf41d2eaad8e006ce7dfdd9d4c8fa2eb/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:51cf45226a9b588d0d2b4880c62d686934b63ab0bd79ca23ab0e9762eb27441b", size = 262716, upload-time = "2026-09-30T04:38:19.214Z" }, - { url = "https://files.pythonhosted.org/packages/a0/16/0e4c6ba9b44e97a2da150e52d331e8f9c968b21b358fbffa6c856cebcd89/charset_normalizer-3.5.2-cp315-cp315t-win32.whl", hash = "sha256:5fb29fb8cd1a46c27a1bf9613ad5ec2599310d46b4025d9556404a6b6a292800", size = 197159, upload-time = "2026-09-30T04:38:21.037Z" }, - { url = "https://files.pythonhosted.org/packages/be/33/e90bc2b1374f7f36ef106f56620de5a783907e19ca857efe2277e31cac3e/charset_normalizer-3.5.2-cp315-cp315t-win_amd64.whl", hash = "sha256:a192e2c40070d92c3ccf777e3a5c4ff515573cd2bb7ed0c537fdadbbec5bbf21", size = 221322, upload-time = "2026-09-30T04:38:22.886Z" }, - { url = "https://files.pythonhosted.org/packages/66/89/dfa6dcb08c200b7830ab56439e8c1890f2971d51aafbb3937894a2e7fcfc/charset_normalizer-3.5.2-cp315-cp315t-win_arm64.whl", hash = "sha256:749e97e1b32313717a565abbe321bc2190bc8b35f1a67e4cdbc7c56c8d8ffe58", size = 209192, upload-time = "2026-09-30T04:38:24.648Z" }, - { url = "https://files.pythonhosted.org/packages/8c/ab/176fbfd5b64939c55d652366aa5b9ef1d767af207a3aa6ebeb0d226c484d/charset_normalizer-3.5.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:4275811936e2f06feff5e598fb42a1b7ae852da8e39605211892b56b81a34efd", size = 331815, upload-time = "2026-09-30T04:38:26.216Z" }, - { url = "https://files.pythonhosted.org/packages/7e/84/371eac6b30bdbcbf2d632a1a01809103459216fcaae61b8b8d922c1bfb8a/charset_normalizer-3.5.2-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1c50fe28bbc2ced33386f298650d91218076c05420e6cbd790b913adc41659e7", size = 253276, upload-time = "2026-09-30T04:38:28.032Z" }, - { url = "https://files.pythonhosted.org/packages/43/6f/c4fbae58febff71709c51bc7e18fdfa55341dc382704740f9f0cbf03817b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d19fbd981a488e22cd04883659ca6b08f50b5974f9fd7c95655ef6a043e5893f", size = 241239, upload-time = "2026-09-30T04:38:29.732Z" }, - { url = "https://files.pythonhosted.org/packages/61/71/458c3f42164a07d0c5210798e9e704b39e540a6793b05aba67f3a35243a9/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0fed1d06615f022ee3b13caf5e8b180cfea32bb2c5aded8a9d44277afc040f93", size = 231121, upload-time = "2026-09-30T04:38:31.462Z" }, - { url = "https://files.pythonhosted.org/packages/09/54/ab9e89367076f6331bb6c65c4bf14a5361fa5191cb6561bf534f18504e1b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:838dcc90063569a0448120554591a1d6c4a4ffe11babf048908793154ab86ade", size = 260350, upload-time = "2026-09-30T04:38:33.239Z" }, - { url = "https://files.pythonhosted.org/packages/7c/c1/061431ecc688d9d76602502cb57cc01e691e682c18f1beb45f9673b5bbd2/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2ce45c6627b22c47e390bc91a41c3d13032192e699fa0bea96e9671b373d69b0", size = 255430, upload-time = "2026-09-30T04:38:34.865Z" }, - { url = "https://files.pythonhosted.org/packages/8d/1f/20c8949f0676f7ab811abdeb7f4d7f1cbc6e61ff20bef08b44edeb092bc8/charset_normalizer-3.5.2-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0774bf9bf620249fee3e0b8b9fd3065de213be30f3aa94ce2494b3b638949e26", size = 250612, upload-time = "2026-09-30T04:38:36.649Z" }, - { url = "https://files.pythonhosted.org/packages/2b/9e/46f2fa4c431fc98c4ae76a8cb5bdca54e0341e3cfc3fcfd8e82740250818/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1db38f4c5496827c1a501846d64d14c3b80c7e6714e406cd7dc36a9899fa1011", size = 242083, upload-time = "2026-09-30T04:38:38.26Z" }, - { url = "https://files.pythonhosted.org/packages/bd/39/559be29a0c0f086e0bba6922babd38916cc5e0b58ced4de13ee01ea05508/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:304d8e4d493af723536393eee0c689eb7813f4a474c8b479dee63f1fdd98f621", size = 232738, upload-time = "2026-09-30T04:38:39.81Z" }, - { url = "https://files.pythonhosted.org/packages/ff/6c/387b0e4f756a282831c1d9fc6aeb6c51ca4507ca202767c8de15ce9b12e2/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:9b7f416ff0978e2f2249330527f0ad6fa02f4932e6199692d3b52da2048c19e4", size = 260703, upload-time = "2026-09-30T04:38:41.346Z" }, - { url = "https://files.pythonhosted.org/packages/96/92/1fdf015f09ef449f50d3ac4b67c90887c9c318b727daa95cc4f866e6521d/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:01077390b03f7988f11d700a2194e69b119741a86b1a638b1db88891e3eced8e", size = 247622, upload-time = "2026-09-30T04:38:42.937Z" }, - { url = "https://files.pythonhosted.org/packages/dc/3c/8e7b8a5671ad5d433669fb2a76f1a0164df2d9b1718b0206bc2a16d840cc/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:7e841fb9010836c992c9f12fcbd43a831de93a5f726fc1ccd8ca1d0268c5014c", size = 257500, upload-time = "2026-09-30T04:38:44.604Z" }, - { url = "https://files.pythonhosted.org/packages/b4/f0/45b579df5cabc1d5d53ea1cc35e8437d3ca768c0acccc7041517cb6fbb32/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9cae88599c7219005d879f98e5ed53341e9a122af585e1091200358a3003d2a0", size = 255100, upload-time = "2026-09-30T04:38:46.289Z" }, - { url = "https://files.pythonhosted.org/packages/31/68/fdec18a343f5fb3f310588dd478b09ac4799e0b187dbade3a8cd776f03ef/charset_normalizer-3.5.2-cp37-abi3-win32.whl", hash = "sha256:01b0c0d2262a9e28e8484a278c7e1b5d650e3ac8cf2683d2967e25899f208bdf", size = 174499, upload-time = "2026-09-30T04:38:47.999Z" }, - { url = "https://files.pythonhosted.org/packages/9d/8a/b618149cc5207943a0242068d7a27897f56a62947b5a039085f2a22029f8/charset_normalizer-3.5.2-cp37-abi3-win_amd64.whl", hash = "sha256:9f56f72050826f63dcee7a7f55b0a77168cb3bfc553fd405e7f8f9ece75a4036", size = 200092, upload-time = "2026-09-30T04:38:49.707Z" }, - { url = "https://files.pythonhosted.org/packages/03/cf/4c66866fa9e2b1c78e3c911516d1de497a677b7ac60f1eceda74ce777ca3/charset_normalizer-3.5.2-cp37-abi3-win_arm64.whl", hash = "sha256:40ab6bffa02ae10a0581e6c198be7d2d8ca5c2a0c64e4ed3465d766df457573e", size = 294363, upload-time = "2026-09-30T04:38:51.312Z" }, - { url = "https://files.pythonhosted.org/packages/fc/ad/d07d7862a62ffa6d79d68074d14823243dd235a77c45262acbf6adeb28bf/charset_normalizer-3.5.2-py3-none-any.whl", hash = "sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685", size = 68872, upload-time = "2026-09-30T04:39:21.828Z" }, -] - -[[package]] -name = "click" -version = "8.5.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/c7/0e/7fa0ef50764b67090eca4114772a2abf8b6148198475e54c660b97caeee6/click-8.5.0.tar.gz", hash = "sha256:ba0d2089de75ea0310e2dde03160e6ca10009947fb95a182f9b54021bb272e34", size = 382235, upload-time = "2026-08-26T13:33:14.56Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/58/50/6c0d534c5f134586a8e1ba4e330569e32f057e33372ae556463212fb4cd3/click-8.5.0-py3-none-any.whl", hash = "sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360", size = 125251, upload-time = "2026-08-26T13:33:12.928Z" }, -] - [[package]] name = "cloudpickle" version = "3.1.2" @@ -272,18 +84,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d5/08/c2409cb01d5368dcfedcbaffa7d044cc8957d57a9d0855244a5eb4709d30/funcy-2.0-py2.py3-none-any.whl", hash = "sha256:53df23c8bb1651b12f095df764bfb057935d49537a56de211b098f4c79614bb0", size = 30891, upload-time = "2023-03-28T06:22:42.576Z" }, ] -[[package]] -name = "ghp-import" -version = "2.1.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "python-dateutil" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/d9/29/d40217cbe2f6b1359e00c6c307bb3fc876ba74068cbab3dde77f03ca0dc4/ghp-import-2.1.0.tar.gz", hash = "sha256:9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343", size = 10943, upload-time = "2022-05-02T15:47:16.11Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f7/ec/67fbef5d497f86283db54c22eec6f6140243aae73265799baaaa19cd17fb/ghp_import-2.1.0-py3-none-any.whl", hash = "sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619", size = 11034, upload-time = "2022-05-02T15:47:14.552Z" }, -] - [[package]] name = "hydra-core" version = "1.3.7" @@ -298,15 +98,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/25/0c/21890c10cc94da917c8e47efc1c55cd3e56a1d25ab5947bdd35abaf9fdc1/hydra_core-1.3.7-py3-none-any.whl", hash = "sha256:83606c4a05c770f1e026e0489875f28989829d151799eabd8cfa8cbe82164515", size = 168790, upload-time = "2026-09-14T18:02:53.661Z" }, ] -[[package]] -name = "idna" -version = "3.20" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463, upload-time = "2026-09-17T14:11:04.752Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583, upload-time = "2026-09-17T14:11:03.168Z" }, -] - [[package]] name = "iniconfig" version = "2.3.0" @@ -366,15 +157,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/0c/29/0348de65b8cc732daa3e33e67806420b2ae89bdce2b04af740289c5c6c8c/loguru-0.7.3-py3-none-any.whl", hash = "sha256:31a33c10c8e1e10422bfd431aeb5d351c7cf7fa671e3c4df004162264b28220c", size = 61595, upload-time = "2024-12-06T11:20:54.538Z" }, ] -[[package]] -name = "markdown" -version = "3.11.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f4/32/0b4d0297064244f04af4331b65de16237cc3cce07474171ee14222a28981/markdown-3.11.2.tar.gz", hash = "sha256:87bf5d90f2d2882e2c02fcda182c2800456b985bff38913867c49706481514b0", size = 491445, upload-time = "2026-10-19T19:41:42.687Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/fe/66/bcab3b677b71ad286b4e607e3427499537c76e13ad2e22584ba7a7d9882c/markdown-3.11.2-py3-none-any.whl", hash = "sha256:f80390747a2a0ff2ba54da074ce4f862f72a6685f608cd2637b646a6d83993f5", size = 114266, upload-time = "2026-10-19T19:41:41.244Z" }, -] - [[package]] name = "markupsafe" version = "3.0.3" @@ -491,10 +273,6 @@ dev = [ { name = "pyyaml" }, { name = "ruff" }, ] -docs = [ - { name = "mkdocs" }, - { name = "mkdocs-material" }, -] [package.metadata] requires-dist = [ @@ -511,10 +289,6 @@ dev = [ { name = "pyyaml", specifier = ">=6" }, { name = "ruff" }, ] -docs = [ - { name = "mkdocs", specifier = ">=1.6,<2" }, - { name = "mkdocs-material", specifier = ">=9.5,<10" }, -] [[package]] name = "meds-evaluation" @@ -534,84 +308,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/58/fc/d3ca372b9d0724eb334dc7f50676ba8f12c30bc3c35be17178f28313f2c2/meds_evaluation-0.0.3-py3-none-any.whl", hash = "sha256:fb63459b293634bb6e26c0c1ae097e7c22865eb0ba251e7b137a3cb2b9a63035", size = 9420, upload-time = "2025-03-03T21:35:04.449Z" }, ] -[[package]] -name = "mergedeep" -version = "1.3.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/3a/41/580bb4006e3ed0361b8151a01d324fb03f420815446c7def45d02f74c270/mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8", size = 4661, upload-time = "2021-02-05T18:55:30.623Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2c/19/04f9b178c2d8a15b076c8b5140708fa6ffc5601fb6f1e975537072df5b2a/mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307", size = 6354, upload-time = "2021-02-05T18:55:29.583Z" }, -] - -[[package]] -name = "mkdocs" -version = "1.6.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "click" }, - { name = "colorama", marker = "sys_platform == 'win32'" }, - { name = "ghp-import" }, - { name = "jinja2" }, - { name = "markdown" }, - { name = "markupsafe" }, - { name = "mergedeep" }, - { name = "mkdocs-get-deps" }, - { name = "packaging" }, - { name = "pathspec" }, - { name = "pyyaml" }, - { name = "pyyaml-env-tag" }, - { name = "watchdog" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/bc/c6/bbd4f061bd16b378247f12953ffcb04786a618ce5e904b8c5a01a0309061/mkdocs-1.6.1.tar.gz", hash = "sha256:7b432f01d928c084353ab39c57282f29f92136665bdd6abf7c1ec8d822ef86f2", size = 3889159, upload-time = "2024-08-30T12:24:06.899Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/22/5b/dbc6a8cddc9cfa9c4971d59fb12bb8d42e161b7e7f8cc89e49137c5b279c/mkdocs-1.6.1-py3-none-any.whl", hash = "sha256:db91759624d1647f3f34aa0c3f327dd2601beae39a366d6e064c03468d35c20e", size = 3864451, upload-time = "2024-08-30T12:24:05.054Z" }, -] - -[[package]] -name = "mkdocs-get-deps" -version = "0.2.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "mergedeep" }, - { name = "platformdirs" }, - { name = "pyyaml" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ce/25/b3cccb187655b9393572bde9b09261d267c3bf2f2cdabe347673be5976a6/mkdocs_get_deps-0.2.2.tar.gz", hash = "sha256:8ee8d5f316cdbbb2834bc1df6e69c08fe769a83e040060de26d3c19fad3599a1", size = 11047, upload-time = "2026-03-10T02:46:33.632Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/88/29/744136411e785c4b0b744d5413e56555265939ab3a104c6a4b719dad33fd/mkdocs_get_deps-0.2.2-py3-none-any.whl", hash = "sha256:e7878cbeac04860b8b5e0ca31d3abad3df9411a75a32cde82f8e44b6c16ff650", size = 9555, upload-time = "2026-03-10T02:46:32.256Z" }, -] - -[[package]] -name = "mkdocs-material" -version = "9.7.7" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "babel" }, - { name = "backrefs" }, - { name = "colorama" }, - { name = "jinja2" }, - { name = "markdown" }, - { name = "mkdocs" }, - { name = "mkdocs-material-extensions" }, - { name = "paginate" }, - { name = "pygments" }, - { name = "pymdown-extensions" }, - { name = "requests" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/f1/cd/c05d3a530ba7934f144fb45f7203cd236adc25c7bdcc34673d202f4b0278/mkdocs_material-9.7.7.tar.gz", hash = "sha256:c0649c065b1b0512d60aad8c10f947f8e455284475239b364b610f2deb4d0855", size = 4097923, upload-time = "2026-07-17T16:21:33.156Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ad/21/17c1bc9e6f47c972ad66fb2ac2568f99f90f1207eeb6fc3b34d094dba7b5/mkdocs_material-9.7.7-py3-none-any.whl", hash = "sha256:8ea9bb1737a5b524a5f9dcf2e1b4ebda8274ae3008aa7845720a97083bef708f", size = 9305438, upload-time = "2026-07-17T16:21:30.017Z" }, -] - -[[package]] -name = "mkdocs-material-extensions" -version = "1.3.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/79/9b/9b4c96d6593b2a541e1cb8b34899a6d021d208bb357042823d4d2cabdbe7/mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443", size = 11847, upload-time = "2023-11-22T19:09:45.208Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/5b/54/662a4743aa81d9582ee9339d4ffa3c8fd40a4965e033d77b9da9774d3960/mkdocs_material_extensions-1.3.1-py3-none-any.whl", hash = "sha256:adff8b62700b25cb77b53358dad940f3ef973dd6db797907c49e3c2ef3ab4e31", size = 8728, upload-time = "2023-11-22T19:09:43.465Z" }, -] - [[package]] name = "narwhals" version = "2.27.1" @@ -801,15 +497,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" }, ] -[[package]] -name = "paginate" -version = "0.5.7" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ec/46/68dde5b6bc00c1296ec6466ab27dddede6aec9af1b99090e1107091b3b84/paginate-0.5.7.tar.gz", hash = "sha256:22bd083ab41e1a8b4f3690544afb2c60c25e5c9a63a30fa2f483f6c60c8e5945", size = 19252, upload-time = "2024-08-25T14:17:24.139Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/90/96/04b8e52da071d28f5e21a805b19cb9390aa17a47462ac87f5e2696b9566d/paginate-0.5.7-py2.py3-none-any.whl", hash = "sha256:b885e2af73abcf01d9559fd5216b57ef722f8c42affbb63942377668e35c7591", size = 13746, upload-time = "2024-08-25T14:17:22.55Z" }, -] - [[package]] name = "pathspec" version = "1.1.1" @@ -1058,19 +745,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176", size = 1231151, upload-time = "2026-03-29T13:29:30.038Z" }, ] -[[package]] -name = "pymdown-extensions" -version = "12.3" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "markdown" }, - { name = "pyyaml" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/f3/fe/ac50ee24a80a1b344e643f6fb626063cc7041b978cd1dd9a7f9963ae1cd1/pymdown_extensions-12.3.tar.gz", hash = "sha256:a7f2a4e0bc60c6e6babfa7922cfb3b01cd640eb00fb208f3c582e12bae00ea67", size = 870532, upload-time = "2026-10-14T22:40:43.252Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/8a/d0/758afe732c2da502c051b4d03ff88daa3c0fc1a1e671e6c5a6318177bab4/pymdown_extensions-12.3-py3-none-any.whl", hash = "sha256:345493a8e3497e24382902903a1c43a28e34a52f2b7571a1c9641429b820ca74", size = 277597, upload-time = "2026-10-14T22:40:41.543Z" }, -] - [[package]] name = "pytest" version = "9.1.1" @@ -1087,18 +761,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" }, ] -[[package]] -name = "python-dateutil" -version = "2.9.0.post0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "six" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" }, -] - [[package]] name = "pyyaml" version = "6.0.3" @@ -1154,18 +816,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, ] -[[package]] -name = "pyyaml-env-tag" -version = "1.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pyyaml" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/eb/2e/79c822141bfd05a853236b504869ebc6b70159afc570e1d5a20641782eaa/pyyaml_env_tag-1.1.tar.gz", hash = "sha256:2eb38b75a2d21ee0475d6d97ec19c63287a7e140231e4214969d0eac923cd7ff", size = 5737, upload-time = "2025-05-13T15:24:01.64Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/04/11/432f32f8097b03e3cd5fe57e88efb685d964e2e5178a48ed61e841f7fdce/pyyaml_env_tag-1.1-py3-none-any.whl", hash = "sha256:17109e1a528561e32f026364712fee1264bc2ea6715120891174ed1b980d2e04", size = 4722, upload-time = "2025-05-13T15:23:59.629Z" }, -] - [[package]] name = "questionary" version = "2.1.1" @@ -1178,21 +828,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/3c/26/1062c7ec1b053db9e499b4d2d5bc231743201b74051c973dadeac80a8f43/questionary-2.1.1-py3-none-any.whl", hash = "sha256:a51af13f345f1cdea62347589fbb6df3b290306ab8930713bfae4d475a7d4a59", size = 36753, upload-time = "2025-08-28T19:00:19.56Z" }, ] -[[package]] -name = "requests" -version = "2.34.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "certifi" }, - { name = "charset-normalizer" }, - { name = "idna" }, - { name = "urllib3" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed", size = 142856, upload-time = "2026-05-14T19:25:27.735Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075, upload-time = "2026-05-14T19:25:26.443Z" }, -] - [[package]] name = "ruff" version = "0.16.3" @@ -1425,15 +1060,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/63/ad/741c19fcb66755ff953daf9243af8480e4bf3d7fbe57583c178c7d2b6b51/scipy-1.18.1-cp315-cp315t-win_arm64.whl", hash = "sha256:eda632a7981f69730d6281f451db9c1c370993a2c0d7ddb43e2a809a2862b83a", size = 25319710, upload-time = "2026-08-21T23:28:45.713Z" }, ] -[[package]] -name = "six" -version = "1.17.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, -] - [[package]] name = "submitit" version = "1.5.4" @@ -1477,42 +1103,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/67/81/4add07e5172b7ac40d8ed5ff580409a7801a4fe26d529bdd915401dabfbe/typing_inspection-0.4.4-py3-none-any.whl", hash = "sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147", size = 14750, upload-time = "2026-08-12T12:37:24.648Z" }, ] -[[package]] -name = "urllib3" -version = "2.8.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63", size = 458972, upload-time = "2026-09-15T19:29:36.253Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717, upload-time = "2026-09-15T19:29:34.577Z" }, -] - -[[package]] -name = "watchdog" -version = "6.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz", hash = "sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282", size = 131220, upload-time = "2024-11-01T14:07:13.037Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e0/24/d9be5cd6642a6aa68352ded4b4b10fb0d7889cb7f45814fb92cecd35f101/watchdog-6.0.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6eb11feb5a0d452ee41f824e271ca311a09e250441c262ca2fd7ebcf2461a06c", size = 96393, upload-time = "2024-11-01T14:06:31.756Z" }, - { url = "https://files.pythonhosted.org/packages/63/7a/6013b0d8dbc56adca7fdd4f0beed381c59f6752341b12fa0886fa7afc78b/watchdog-6.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ef810fbf7b781a5a593894e4f439773830bdecb885e6880d957d5b9382a960d2", size = 88392, upload-time = "2024-11-01T14:06:32.99Z" }, - { url = "https://files.pythonhosted.org/packages/d1/40/b75381494851556de56281e053700e46bff5b37bf4c7267e858640af5a7f/watchdog-6.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:afd0fe1b2270917c5e23c2a65ce50c2a4abb63daafb0d419fde368e272a76b7c", size = 89019, upload-time = "2024-11-01T14:06:34.963Z" }, - { url = "https://files.pythonhosted.org/packages/39/ea/3930d07dafc9e286ed356a679aa02d777c06e9bfd1164fa7c19c288a5483/watchdog-6.0.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:bdd4e6f14b8b18c334febb9c4425a878a2ac20efd1e0b231978e7b150f92a948", size = 96471, upload-time = "2024-11-01T14:06:37.745Z" }, - { url = "https://files.pythonhosted.org/packages/12/87/48361531f70b1f87928b045df868a9fd4e253d9ae087fa4cf3f7113be363/watchdog-6.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c7c15dda13c4eb00d6fb6fc508b3c0ed88b9d5d374056b239c4ad1611125c860", size = 88449, upload-time = "2024-11-01T14:06:39.748Z" }, - { url = "https://files.pythonhosted.org/packages/5b/7e/8f322f5e600812e6f9a31b75d242631068ca8f4ef0582dd3ae6e72daecc8/watchdog-6.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f10cb2d5902447c7d0da897e2c6768bca89174d0c6e1e30abec5421af97a5b0", size = 89054, upload-time = "2024-11-01T14:06:41.009Z" }, - { url = "https://files.pythonhosted.org/packages/68/98/b0345cabdce2041a01293ba483333582891a3bd5769b08eceb0d406056ef/watchdog-6.0.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c", size = 96480, upload-time = "2024-11-01T14:06:42.952Z" }, - { url = "https://files.pythonhosted.org/packages/85/83/cdf13902c626b28eedef7ec4f10745c52aad8a8fe7eb04ed7b1f111ca20e/watchdog-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134", size = 88451, upload-time = "2024-11-01T14:06:45.084Z" }, - { url = "https://files.pythonhosted.org/packages/fe/c4/225c87bae08c8b9ec99030cd48ae9c4eca050a59bf5c2255853e18c87b50/watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b", size = 89057, upload-time = "2024-11-01T14:06:47.324Z" }, - { url = "https://files.pythonhosted.org/packages/a9/c7/ca4bf3e518cb57a686b2feb4f55a1892fd9a3dd13f470fca14e00f80ea36/watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13", size = 79079, upload-time = "2024-11-01T14:06:59.472Z" }, - { url = "https://files.pythonhosted.org/packages/5c/51/d46dc9332f9a647593c947b4b88e2381c8dfc0942d15b8edc0310fa4abb1/watchdog-6.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379", size = 79078, upload-time = "2024-11-01T14:07:01.431Z" }, - { url = "https://files.pythonhosted.org/packages/d4/57/04edbf5e169cd318d5f07b4766fee38e825d64b6913ca157ca32d1a42267/watchdog-6.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e", size = 79076, upload-time = "2024-11-01T14:07:02.568Z" }, - { url = "https://files.pythonhosted.org/packages/ab/cc/da8422b300e13cb187d2203f20b9253e91058aaf7db65b74142013478e66/watchdog-6.0.0-py3-none-manylinux2014_ppc64.whl", hash = "sha256:212ac9b8bf1161dc91bd09c048048a95ca3a4c4f5e5d4a7d1b1a7d5752a7f96f", size = 79077, upload-time = "2024-11-01T14:07:03.893Z" }, - { url = "https://files.pythonhosted.org/packages/2c/3b/b8964e04ae1a025c44ba8e4291f86e97fac443bca31de8bd98d3263d2fcf/watchdog-6.0.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:e3df4cbb9a450c6d49318f6d14f4bbc80d763fa587ba46ec86f99f9e6876bb26", size = 79078, upload-time = "2024-11-01T14:07:05.189Z" }, - { url = "https://files.pythonhosted.org/packages/62/ae/a696eb424bedff7407801c257d4b1afda455fe40821a2be430e173660e81/watchdog-6.0.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:2cce7cfc2008eb51feb6aab51251fd79b85d9894e98ba847408f662b3395ca3c", size = 79077, upload-time = "2024-11-01T14:07:06.376Z" }, - { url = "https://files.pythonhosted.org/packages/b5/e8/dbf020b4d98251a9860752a094d09a65e1b436ad181faf929983f697048f/watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:20ffe5b202af80ab4266dcd3e91aae72bf2da48c0d33bdb15c66658e685e94e2", size = 79078, upload-time = "2024-11-01T14:07:07.547Z" }, - { url = "https://files.pythonhosted.org/packages/07/f6/d0e5b343768e8bcb4cda79f0f2f55051bf26177ecd5651f84c07567461cf/watchdog-6.0.0-py3-none-win32.whl", hash = "sha256:07df1fdd701c5d4c8e55ef6cf55b8f0120fe1aef7ef39a1c6fc6bc2e606d517a", size = 79065, upload-time = "2024-11-01T14:07:09.525Z" }, - { url = "https://files.pythonhosted.org/packages/db/d9/c495884c6e548fce18a8f40568ff120bc3a4b7b99813081c8ac0c936fa64/watchdog-6.0.0-py3-none-win_amd64.whl", hash = "sha256:cbafb470cf848d93b5d013e2ecb245d4aa1c8fd0504e863ccefa32445359d680", size = 79070, upload-time = "2024-11-01T14:07:10.686Z" }, - { url = "https://files.pythonhosted.org/packages/33/e8/e40370e6d74ddba47f002a32919d91310d6074130fe4e17dabcafc15cbf1/watchdog-6.0.0-py3-none-win_ia64.whl", hash = "sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f", size = 79067, upload-time = "2024-11-01T14:07:11.845Z" }, -] - [[package]] name = "wcwidth" version = "0.8.2" From 3cf2969d7c15a78e4bf43994ed2121e0aea8ba65 Mon Sep 17 00:00:00 2001 From: Florent Pollet Date: Sun, 8 Nov 2026 16:31:37 -0500 Subject: [PATCH 2/2] Remove obsolete documentation deployment and redirects --- .github/workflows/docs.yml | 37 --------------------------------- .gitignore | 1 - README.md | 4 ++-- RELEASING.md | 4 ++-- redirects/index.html | 20 ------------------ redirects/paths.json | 26 ----------------------- scripts/build_docs_redirects.py | 25 ---------------------- 7 files changed, 4 insertions(+), 113 deletions(-) delete mode 100644 .github/workflows/docs.yml delete mode 100644 redirects/index.html delete mode 100644 redirects/paths.json delete mode 100644 scripts/build_docs_redirects.py diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 6ddb9bf..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Documentation redirects - -# The full site is maintained in meds-algorithm and hosted on Read the Docs. -# Keep Pages enabled to redirect existing bookmarks, including page fragments. - -on: - pull_request: - push: - branches: [main] - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: python scripts/build_docs_redirects.py - - if: github.event_name == 'push' - uses: actions/upload-pages-artifact@v3 - with: - path: site-redirects - - deploy: - if: github.event_name == 'push' - needs: build - runs-on: ubuntu-latest - permissions: - pages: write - id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index a96314b..bab28e3 100644 --- a/.gitignore +++ b/.gitignore @@ -41,5 +41,4 @@ site/ # Documentation JavaScript tests node_modules/ -site-redirects/ .cache/ diff --git a/README.md b/README.md index 531d936..7a332e2 100644 --- a/README.md +++ b/README.md @@ -218,8 +218,8 @@ and [shared-package assessment](https://meds-algorithm.readthedocs.io/en/latest/ ### Unreleased -- Move the documentation site and prompt builder to `meds-algorithm` on Read the Docs, and replace - this repository's Pages site with redirects. Generated-repository guides remain template-owned. +- Move the documentation site and prompt builder to `meds-algorithm` on Read the Docs. + Generated-repository guides remain template-owned. - Require confirmation for material scientific ambiguities by default; offer explicitly enabled exploratory assumptions in the prompt builder while preserving evaluation and execution approval gates. diff --git a/RELEASING.md b/RELEASING.md index be62114..82ca545 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -14,8 +14,8 @@ before GitHub exposes its manual dispatch action. The documentation site is built in `meds-algorithm`. When changing these release instructions or the generated release/test guides, update `docs/template-source.json` in that repository to the reviewed -template commit and file checksums; its strict docs build verifies the sources. The template's own -documentation workflow now publishes only redirects for old GitHub Pages links. +template commit and file checksums; its strict docs build verifies the sources. Documentation builds +and hosting are managed entirely by the core repository and Read the Docs. ## 1. Switch generated projects to the published shared package diff --git a/redirects/index.html b/redirects/index.html deleted file mode 100644 index 827883f..0000000 --- a/redirects/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - -Documentation moved -

The MEDS algorithms documentation has moved to -Read the Docs.

- - diff --git a/redirects/paths.json b/redirects/paths.json deleted file mode 100644 index dedba43..0000000 --- a/redirects/paths.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - "catalogue-testing", - "concepts", - "core-package", - "documentation", - "faq", - "implementation-prompt", - "implemented-algorithms", - "index", - "manual-example", - "migration-v4", - "profiles", - "prompt-builder", - "publishing-algorithms", - "reference/api", - "reference/architecture", - "reference/manifest", - "reference/spec", - "reference/tests", - "releasing", - "running", - "shared-package-assessment", - "testing", - "workflow", - "zero-shot" -] diff --git a/scripts/build_docs_redirects.py b/scripts/build_docs_redirects.py deleted file mode 100644 index 9410398..0000000 --- a/scripts/build_docs_redirects.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Build the retired GitHub Pages site's redirects using only the standard library.""" - -import json -from pathlib import Path - - -def main(): - root = Path(__file__).resolve().parents[1] - output = root / "site-redirects" - source = (root / "redirects/index.html").read_text(encoding="utf-8") - routes = json.loads((root / "redirects/paths.json").read_text(encoding="utf-8")) - files = ["index.html", "404.html"] - for route in routes: - files.extend([f"{route}/index.html", f"{route}.html"]) - for name in files: - destination = output / name - if not destination.resolve().is_relative_to(output.resolve()): - raise ValueError("Redirect route must stay inside the output directory") - destination.parent.mkdir(parents=True, exist_ok=True) - destination.write_text(source, encoding="utf-8") - (output / ".nojekyll").touch() - - -if __name__ == "__main__": - main()