Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Docs

# 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.
# Checks the documentation on every pull request. GitHub Pages publishing remains enabled during the
# Read the Docs transition; see docs/index.md for the cutover and old-URL redirect steps.

on:
pull_request:
Expand Down
17 changes: 17 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2

build:
os: ubuntu-24.04
tools:
python: "3.12"

python:
install:
- method: uv
command: sync
groups:
- docs

mkdocs:
configuration: mkdocs.yml
fail_on_warning: true
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)](https://pypi.org/project/meds-algorithm/)
[![Tests and code quality](https://github.com/McDermottHealthAI/meds-algorithm/actions/workflows/ci.yml/badge.svg)](https://github.com/McDermottHealthAI/meds-algorithm/actions/workflows/ci.yml)
[![Documentation](https://img.shields.io/badge/docs-MEDS_algorithms-blue)](https://mcdermotthealthai.github.io/meds-algorithm/)
[![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)](https://github.com/McDermottHealthAI/meds-algorithm/graphs/contributors)
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen)](https://github.com/McDermottHealthAI/meds-algorithm/pulls)
[![License: MIT](https://img.shields.io/badge/License-MIT-green)](https://github.com/McDermottHealthAI/meds-algorithm/blob/main/LICENSE)
Expand All @@ -18,7 +18,7 @@ Algorithm architectures, tokenizers, training objectives and task-specific logic
See the [architecture and UML diagrams](https://github.com/McDermottHealthAI/meds-algorithm/blob/main/ARCHITECTURE.md) for the profile hierarchy, typed requests,
algorithm-owned configuration, artifact references and shared execution path.

Browse the [algorithm catalogue](https://mcdermotthealthai.github.io/meds-algorithm/implemented-algorithms/)
Browse the [algorithm catalogue](https://meds-algorithm.readthedocs.io/en/latest/implemented-algorithms/)
for implementations, reviewed installation commands and validation evidence. Register or update an
entry through `catalogue/algorithms.yaml`; documentation builds and release observations are independent
of the runtime package and never query private source repositories. See
Expand Down Expand Up @@ -142,6 +142,8 @@ training. Keep each algorithm's data-access and cluster approval rules in its ow

### Unreleased

- Configure Read the Docs hosting with the existing MkDocs theme and docs dependency group; update
documentation links and document the transition from GitHub Pages.
- Host the algorithm catalogue and its release-observation workflow in this ecosystem repository.
- Add independently built documentation; catalogue metadata and tooling are excluded from Python distributions.

Expand Down
40 changes: 36 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,39 @@ the [catalogue test inventory](catalogue-testing.md). Runtime tests remain under
inventory remains in the packaged
[TESTING.md](https://github.com/McDermottHealthAI/meds-algorithm/blob/main/src/meds_algorithm/TESTING.md).

GitHub Actions builds and checks the site on PRs and deploys pushes to `main`. For the first deployment,
configure **Settings → Pages → Build and deployment → Source: GitHub Actions**. The weekly catalogue
workflow additionally needs permission for Actions to create pull requests; its registration guide
documents the setting and the report-artifact fallback. No private-repository credentials are required.
### Read the Docs hosting

The repository-root `.readthedocs.yaml` builds this site with Python 3.12, the existing `docs`
dependency group and MkDocs Material. It uses uv to install dependencies from `pyproject.toml` and
`uv.lock`, and fails on documentation warnings. GitHub Actions continues running catalogue tests,
validation, lint and the strict documentation build independently of the hosting service.

To enable hosting:

1. Import `McDermottHealthAI/meds-algorithm` into Read the Docs and use `meds-algorithm` as the project
slug. If a different slug is needed, update the README badge and links, `pyproject.toml` documentation
URL and the fallback `site_url` in `mkdocs.yml` together.
2. Set the default branch to `main`, build its `latest` version, and use `latest` as the default
documentation version initially. Older release tags do not contain this hosting configuration.
3. Verify the build and the catalogue at
<https://meds-algorithm.readthedocs.io/en/latest/>, and enable pull request builds if desired.

MkDocs reads `READTHEDOCS_CANONICAL_URL` during hosted builds so canonical links use the appropriate
version URL. Local builds fall back to the `latest` URL. The source pages, navigation and theme are
shared between local builds and hosting; no second copy of the documentation is needed.

### GitHub Pages transition

The existing GitHub Pages deployment remains active until Read the Docs has built successfully.
After verifying the new site, replace the Pages publication with a small redirect site that preserves
the old page paths and fragments at <https://mcdermotthealthai.github.io/meds-algorithm/>. Keep those
redirects hosted on Pages so existing links continue working; Read the Docs cannot redirect requests
made to the old GitHub Pages domain. Retain the GitHub Actions documentation checks when replacing
the old full-site deployment.

This change only moves hosting for this repository. The algorithm template's documentation remains
at its existing GitHub Pages URL.

The weekly catalogue workflow additionally needs permission for Actions to create pull requests; its
registration guide documents the setting and the report-artifact fallback. No private-repository
credentials are required.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
site_name: MEDS algorithms
site_description: Shared MEDS algorithm infrastructure and implementation catalogue.
site_url: https://mcdermotthealthai.github.io/meds-algorithm/
site_url: !ENV [READTHEDOCS_CANONICAL_URL, "https://meds-algorithm.readthedocs.io/en/latest/"]
repo_url: https://github.com/McDermottHealthAI/meds-algorithm
repo_name: McDermottHealthAI/meds-algorithm
edit_uri: edit/main/docs/
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ markers = [

[project.urls]
Repository = "https://github.com/McDermottHealthAI/meds-algorithm"
Documentation = "https://mcdermotthealthai.github.io/meds-algorithm/"
Documentation = "https://meds-algorithm.readthedocs.io/en/latest/"

[dependency-groups]
dev = ["ruff"]
Expand Down
Loading