From 554a67d200a38bb5b48ef236dda361829ac72d47 Mon Sep 17 00:00:00 2001 From: ErikDanielsson Date: Fri, 23 Jan 2026 09:37:50 +0100 Subject: [PATCH 1/7] Add broken link checker --- .github/workflows/check-broken-links.yml | 32 ++++++++++++++++++++++++ docusaurus.config.js | 4 +-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/check-broken-links.yml diff --git a/.github/workflows/check-broken-links.yml b/.github/workflows/check-broken-links.yml new file mode 100644 index 0000000..8858ddc --- /dev/null +++ b/.github/workflows/check-broken-links.yml @@ -0,0 +1,32 @@ +name: Check broken links + +on: + workflow_dispatch: + pull_request: + +jobs: + linkChecker: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install npm + run: npm install + + - name: Build static site + run: npm run build + + - name: Check for broken links + uses: JustinBeckwith/linkinator-action@v1 + with: + paths: 'build/' + recurse: true + # + # linksToSkip: 'https://linkedin.com' \ No newline at end of file diff --git a/docusaurus.config.js b/docusaurus.config.js index 2c26811..8d4d651 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -19,8 +19,8 @@ const config = { deploymentBranch: 'gh-pages', // TODO We should eventually fix broken links and throw if any are found // onBrokenLinks: 'throw', - onBrokenLinks: 'warn', - onBrokenMarkdownLinks: 'warn', + onBrokenLinks: 'throw', + onBrokenMarkdownLinks: 'throw', favicon: 'img/favicon.ico', presets: [ From 1d5d4f93106cb9fbe37106c1d774d00a752275d5 Mon Sep 17 00:00:00 2001 From: ErikDanielsson Date: Fri, 23 Jan 2026 10:00:36 +0100 Subject: [PATCH 2/7] Fix broken md links in pigeons tutorial --- docs/tutorials/pigeons.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/pigeons.md b/docs/tutorials/pigeons.md index 46a7d98..c706a67 100644 --- a/docs/tutorials/pigeons.md +++ b/docs/tutorials/pigeons.md @@ -12,7 +12,7 @@ import TabItem from '@theme/TabItem'; In this tutorial we will demonstrate how to use the Julia package [Pigeons.jl](https://pigeons.run/stable/) to parallelize and improve MCMC inference in TreePPL with parallel tempering. Parallel tempering is particularly powerful for combinatorial, multimodal and overparametrized posteriors, which abound in statistical phylogenetics. -We will use the [constant rate birth-death](../examples/div.md#constant-rate-birth-death) (CRBD) model as the running example. +We will use the [constant rate birth-death](../model-library/div.md#constant-rate-birth-death) (CRBD) model as the running example. ### What is parallel tempering and Pigeons? MCMC algorithms are inherently sequential algorithms, since the next iteration depends explicitly on what we are computing in the current. From 2686ee8281c4a0537e6a8499e7361f571983278d Mon Sep 17 00:00:00 2001 From: ErikDanielsson Date: Fri, 23 Jan 2026 10:08:39 +0100 Subject: [PATCH 3/7] Try fixing failing links on other pages --- docs/index.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/index.md b/docs/index.md index 136afee..4cb130a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,19 +5,19 @@ sidebar_position: 1 # TreePPL documentation -If you are new to universal probabilistic programming and TreePPL, we recommend beginning by going through our [introductory tutorial](docs/tutorials/treeppl-intro). +If you are new to universal probabilistic programming and TreePPL, we recommend beginning by going through our [introductory tutorial](./tutorials/treeppl-intro). The TreePPL documentation consists of: - - [Installing TreePPL](docs/installing), with instructions on how to install TreePPL, - - [Python interface](docs/python-interface), documenting the Python interface, - - [Jupyter interface](docs/jupyter-interface), describing how to work with TreePPL in Jupyter notebooks, - - [R interface](docs/R-interface), documenting the R interface, - - [Tutorials](docs/tutorials), in which the user learns by doing something meaningful, towards some achievable goal, - - [Language overview](docs/language-overview), which contains a basic language description, - - [Distributions](docs/distributions), describing available distributions and related information, - - [Inference methods](docs/inference), describing available inference techniques, - - [Model library](docs/model-library), which contains model examples that can be used as templates, - - [Contribute to TreePPL development](docs/for-developers), with instructions for installing the command-line version and for contributing to the TreePPL development effort, - - [How to cite](docs/how_to_cite), with information on how to cite TreePPL. + - [Installing TreePPL](./installing.md), with instructions on how to install TreePPL, + - [Python interface](./python-interface.md), documenting the Python interface, + - [Jupyter interface](./jupyter-interface.md), describing how to work with TreePPL in Jupyter notebooks, + - [R interface](./R-interface.md), documenting the R interface, + - [Tutorials](./tutorials.md), in which the user learns by doing something meaningful, towards some achievable goal, + - [Language overview](./language-overview.md), which contains a basic language description, + - [Distributions](./distributions.md), describing available distributions and related information, + - [Inference methods](./inference.md), describing available inference techniques, + - [Model library](./model-library.md), which contains model examples that can be used as templates, + - [Contribute to TreePPL development](./for-developers.md), with instructions for installing the command-line version and for contributing to the TreePPL development effort, + - [How to cite](./how_to_cite.md), with information on how to cite TreePPL. From 495cb44f7f0e0d00e61db59eb5ae603185e75128 Mon Sep 17 00:00:00 2001 From: ErikDanielsson Date: Fri, 23 Jan 2026 10:30:42 +0100 Subject: [PATCH 4/7] Fix anchors in pigeons.md --- docs/index.md | 10 +++++----- docs/model-library/div.md | 4 ++-- docs/model-library/metabarcoding.md | 2 +- docs/model-library/tree-inference.md | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/index.md b/docs/index.md index 4cb130a..175142c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,19 +5,19 @@ sidebar_position: 1 # TreePPL documentation -If you are new to universal probabilistic programming and TreePPL, we recommend beginning by going through our [introductory tutorial](./tutorials/treeppl-intro). +If you are new to universal probabilistic programming and TreePPL, we recommend beginning by going through our [introductory tutorial](./tutorials/treeppl-intro.md). The TreePPL documentation consists of: - [Installing TreePPL](./installing.md), with instructions on how to install TreePPL, - [Python interface](./python-interface.md), documenting the Python interface, - [Jupyter interface](./jupyter-interface.md), describing how to work with TreePPL in Jupyter notebooks, - - [R interface](./R-interface.md), documenting the R interface, - - [Tutorials](./tutorials.md), in which the user learns by doing something meaningful, towards some achievable goal, + - [R interface](./R-interface/index.md), documenting the R interface, + - [Tutorials](./tutorials/index.md), in which the user learns by doing something meaningful, towards some achievable goal, - [Language overview](./language-overview.md), which contains a basic language description, - [Distributions](./distributions.md), describing available distributions and related information, - [Inference methods](./inference.md), describing available inference techniques, - - [Model library](./model-library.md), which contains model examples that can be used as templates, - - [Contribute to TreePPL development](./for-developers.md), with instructions for installing the command-line version and for contributing to the TreePPL development effort, + - [Model library](./model-library/index.md), which contains model examples that can be used as templates, + - [Contribute to TreePPL development](./for-developers/index.md), with instructions for installing the command-line version and for contributing to the TreePPL development effort, - [How to cite](./how_to_cite.md), with information on how to cite TreePPL. diff --git a/docs/model-library/div.md b/docs/model-library/div.md index 67abc9a..a9a5c45 100644 --- a/docs/model-library/div.md +++ b/docs/model-library/div.md @@ -5,7 +5,7 @@ sidebar_label: Diversification models --- # Diversification models -# Constant rate birth-death +## Constant rate birth-death - **Model file:** `models/phylo/crbd.tppl` @@ -13,7 +13,7 @@ sidebar_label: Diversification models - **Brief info:** The model simulates the constant rate birth-death process over a phylogenetic tree. The speciation rate is returned. -# ClaDS +## ClaDS - **Model file:** `models/phylo/clads.tppl` diff --git a/docs/model-library/metabarcoding.md b/docs/model-library/metabarcoding.md index baf91bc..68af6f1 100644 --- a/docs/model-library/metabarcoding.md +++ b/docs/model-library/metabarcoding.md @@ -7,7 +7,7 @@ sidebar_position: 1 # Abundances from metabarcoding -# Basic model +## Basic model - **Model file:** `models/metabarcoding/optmodel.tppl` diff --git a/docs/model-library/tree-inference.md b/docs/model-library/tree-inference.md index 069dc76..f0cfe65 100644 --- a/docs/model-library/tree-inference.md +++ b/docs/model-library/tree-inference.md @@ -6,7 +6,7 @@ sidebar_label: Tree inference models # Tree inference models -# Jukes-Cantor +## Jukes-Cantor - **Model files:** `models/phylo/tree_inference.tppl`, `models/phylo/tree_inference_pruning.tppl`, `models/phylo/tree_inference_scaled.tppl` @@ -14,7 +14,7 @@ sidebar_label: Tree inference models - **Brief info:** The model version `tree_inference.tppl` is a simple backwards tree reconstruction based on aligned DNA sequence data (converted to integers) as input, and using the Jukes-Cantor model of nucleotide substitution. There are also other and more computationally efficient model versions: `tree_inference_pruning.tppl` using hard-coded pruning (Felsenstein's pruning algorith) and `tree_inference_scaled.tppl` with pruning and a scaled approach to the messages. Use the scaled version for efficient inference on larger datasets. -# GTR +## GTR - **Model file:** `models/phylo/tree_inference_pruning_gtr.tppl` - **Example input data:** `models/phylo/tree_inference.json` From 6be387a339b88600c934a70b6de0ef6c0ac79317 Mon Sep 17 00:00:00 2001 From: ErikDanielsson Date: Fri, 23 Jan 2026 11:11:09 +0100 Subject: [PATCH 5/7] Update gh action and make markdown links correct --- .github/workflows/check-broken-links.yml | 22 +++++----------------- docs/for-developers/install_windows.md | 2 +- docs/installing.md | 4 ++-- docs/tutorials/index.md | 2 +- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/.github/workflows/check-broken-links.yml b/.github/workflows/check-broken-links.yml index 8858ddc..8c382c7 100644 --- a/.github/workflows/check-broken-links.yml +++ b/.github/workflows/check-broken-links.yml @@ -11,22 +11,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' - - - name: Install npm - run: npm install - - - name: Build static site - run: npm run build - - - name: Check for broken links + - name: Check for broken links in docs uses: JustinBeckwith/linkinator-action@v1 with: - paths: 'build/' - recurse: true - # - # linksToSkip: 'https://linkedin.com' \ No newline at end of file + paths: 'docs/**/*.md' + markdown: true + # There is crawler checking on some DOI sites, so lets skip them + linksToSkip: "https://doi.org*" \ No newline at end of file diff --git a/docs/for-developers/install_windows.md b/docs/for-developers/install_windows.md index 8fbea26..7905a8c 100644 --- a/docs/for-developers/install_windows.md +++ b/docs/for-developers/install_windows.md @@ -6,4 +6,4 @@ Install WSL2 and GUI [support](https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps). -Then follow the [Linux instructions](./install_linux). +Then follow the [Linux instructions](./install_linux.md). diff --git a/docs/installing.md b/docs/installing.md index 8c6daab..dded5e3 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -9,11 +9,11 @@ import TabItem from '@theme/TabItem'; We have developed R and Python interfaces to facilitate installation, data preparation, program compilation and execution, post-processing, and visualization of inference results. We strive to provide the same functionalities in R and Python, but there might be small differences between the two interfaces because the project is under active development. -If you want to contribute to TreePPL development, see [Instructions for developers](/docs/for-developers/). +If you want to contribute to TreePPL development, see [Instructions for developers](./for-developers/index.md). :::warning -We currently support Linux and MacOS only. For Windows users there are two options: use a virtual machine/server/cluster or use TreePPL with _WSL_ (see [Windows installation instructions](/docs/for-developers/install_windows)). +We currently support Linux and MacOS only. For Windows users there are two options: use a virtual machine/server/cluster or use TreePPL with _WSL_ (see [Windows installation instructions](./for-developers/install_windows.md)). ::: diff --git a/docs/tutorials/index.md b/docs/tutorials/index.md index 2b1b446..2cd96c0 100644 --- a/docs/tutorials/index.md +++ b/docs/tutorials/index.md @@ -7,5 +7,5 @@ sidebar_position: 6 The objective of the tutorials is to teach you a skill by example. The following tutorials are available currently: - - [Introduction to probabilistic programming in TreePPL](docs/tutorials/treeppl-intro.md). + - [Introduction to probabilistic programming in TreePPL](./treeppl-intro.md). From 929def4ea0a862f2095d20fe7ead1d258c94707e Mon Sep 17 00:00:00 2001 From: ErikDanielsson Date: Fri, 23 Jan 2026 11:36:16 +0100 Subject: [PATCH 6/7] Revert minor changes, remove comment --- docs/model-library/div.md | 4 ++-- docs/model-library/metabarcoding.md | 2 +- docs/model-library/tree-inference.md | 4 ++-- docusaurus.config.js | 2 -- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/model-library/div.md b/docs/model-library/div.md index a9a5c45..67abc9a 100644 --- a/docs/model-library/div.md +++ b/docs/model-library/div.md @@ -5,7 +5,7 @@ sidebar_label: Diversification models --- # Diversification models -## Constant rate birth-death +# Constant rate birth-death - **Model file:** `models/phylo/crbd.tppl` @@ -13,7 +13,7 @@ sidebar_label: Diversification models - **Brief info:** The model simulates the constant rate birth-death process over a phylogenetic tree. The speciation rate is returned. -## ClaDS +# ClaDS - **Model file:** `models/phylo/clads.tppl` diff --git a/docs/model-library/metabarcoding.md b/docs/model-library/metabarcoding.md index 68af6f1..baf91bc 100644 --- a/docs/model-library/metabarcoding.md +++ b/docs/model-library/metabarcoding.md @@ -7,7 +7,7 @@ sidebar_position: 1 # Abundances from metabarcoding -## Basic model +# Basic model - **Model file:** `models/metabarcoding/optmodel.tppl` diff --git a/docs/model-library/tree-inference.md b/docs/model-library/tree-inference.md index f0cfe65..069dc76 100644 --- a/docs/model-library/tree-inference.md +++ b/docs/model-library/tree-inference.md @@ -6,7 +6,7 @@ sidebar_label: Tree inference models # Tree inference models -## Jukes-Cantor +# Jukes-Cantor - **Model files:** `models/phylo/tree_inference.tppl`, `models/phylo/tree_inference_pruning.tppl`, `models/phylo/tree_inference_scaled.tppl` @@ -14,7 +14,7 @@ sidebar_label: Tree inference models - **Brief info:** The model version `tree_inference.tppl` is a simple backwards tree reconstruction based on aligned DNA sequence data (converted to integers) as input, and using the Jukes-Cantor model of nucleotide substitution. There are also other and more computationally efficient model versions: `tree_inference_pruning.tppl` using hard-coded pruning (Felsenstein's pruning algorith) and `tree_inference_scaled.tppl` with pruning and a scaled approach to the messages. Use the scaled version for efficient inference on larger datasets. -## GTR +# GTR - **Model file:** `models/phylo/tree_inference_pruning_gtr.tppl` - **Example input data:** `models/phylo/tree_inference.json` diff --git a/docusaurus.config.js b/docusaurus.config.js index 8d4d651..328dc61 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -17,8 +17,6 @@ const config = { organizationName: 'treeppl', trailingSlash: false, deploymentBranch: 'gh-pages', - // TODO We should eventually fix broken links and throw if any are found - // onBrokenLinks: 'throw', onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'throw', favicon: 'img/favicon.ico', From 20923c21cdfd423c0088b3c3e036965027c5162b Mon Sep 17 00:00:00 2001 From: ErikDanielsson Date: Fri, 23 Jan 2026 11:47:25 +0100 Subject: [PATCH 7/7] Find and fix some broken links (: --- docs/for-developers/index.md | 2 +- docs/troubleshooting.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/for-developers/index.md b/docs/for-developers/index.md index d4a9372..442f72f 100644 --- a/docs/for-developers/index.md +++ b/docs/for-developers/index.md @@ -17,5 +17,5 @@ Choose your operating system: ## Contribute to the web site -If you wish to contribute to the development of the TreePPL web site, there are detailed instructions on how to fork the TreePPL web site repo, edit the content, render the new content locally to check it out, and create a pull request in the README file in the [TreePPL web site repo](https://github.com/treeppl/treeppl/treeppl.github.io). +If you wish to contribute to the development of the TreePPL web site, there are detailed instructions on how to fork the TreePPL web site repo, edit the content, render the new content locally to check it out, and create a pull request in the README file in the [TreePPL web site repo](https://github.com/treeppl/treeppl.github.io). diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index beb5d37..222fbf0 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -5,7 +5,7 @@ sidebar_position: 11 # Troubleshooting -Here we collect a few tips on how to solve problems you may encounter when installing or running TreePPL. If you cannout solve your problem using any of the tips listed here, please open an issue on TreePPL's [github repo](https://https://github.com/treeppl/treeppl). +Here we collect a few tips on how to solve problems you may encounter when installing or running TreePPL. If you cannout solve your problem using any of the tips listed here, please open an issue on TreePPL's [github repo](https://github.com/treeppl/treeppl). If you find errors or have suggestions for improvement in the documentation, report it to the [web site repo](https://github.com/treeppl/treeppl.github.io). You can also contribute to addressing the issue(s) yourself.See instructions [here](for-developers/index.md).