-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1453 from alan-turing-institute/readthedocs
Migrate docs to readthedocs.io
- Loading branch information
Showing
242 changed files
with
313 additions
and
582 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
name: Documentation | ||
|
||
# Run workflow on pushes to matching branches | ||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: [develop] | ||
pull_request: | ||
branches: [develop] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./docs/ | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
- name: Sphinx build | ||
run: | | ||
make html | ||
check_links: | ||
name: Check links | ||
runs-on: ubuntu-latest | ||
needs: build | ||
defaults: | ||
run: | ||
working-directory: ./docs/ | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
- name: Sphinx build | ||
run: | | ||
make html | ||
- name: Link Checker | ||
uses: lycheeverse/[email protected] | ||
with: | ||
args: --config='./.lychee.toml' --verbose --no-progress './docs/build/html/**/*.html' | ||
fail: true # fail on broken links |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
############################# Display ############################# | ||
|
||
# Verbose program output | ||
# Accepts log level: "error", "warn", "info", "debug", "trace" | ||
verbose = "info" | ||
|
||
# Don't show interactive progress bar while checking links. | ||
no_progress = false | ||
|
||
# Path to summary output file. | ||
# output = ".config.dummy.report.md" | ||
|
||
############################# Cache ############################### | ||
|
||
# Enable link caching. This can be helpful to avoid checking the same links on | ||
# multiple runs. | ||
cache = true | ||
|
||
# Discard all cached requests older than this duration. | ||
max_cache_age = "1d" | ||
|
||
############################# Runtime ############################# | ||
|
||
# Number of threads to utilize. | ||
# Defaults to number of cores available to the system if omitted. | ||
threads = 2 | ||
|
||
# Maximum number of allowed redirects. | ||
max_redirects = 10 | ||
|
||
# Maximum number of allowed retries before a link is declared dead. | ||
max_retries = 2 | ||
|
||
# Maximum number of concurrent link checks. | ||
max_concurrency = 14 | ||
|
||
############################# Requests ############################ | ||
|
||
# User agent to send with each request. | ||
user_agent = "curl/7.83. 1" | ||
|
||
# Website timeout from connect to response finished. | ||
timeout = 20 | ||
|
||
# Minimum wait time in seconds between retries of failed requests. | ||
retry_wait_time = 2 | ||
|
||
# Comma-separated list of accepted status codes for valid links. | ||
accept = [200, 429] | ||
|
||
# Proceed for server connections considered insecure (invalid TLS). | ||
insecure = false | ||
|
||
# Only test links with the given schemes (e.g. https). | ||
# Omit to check links with any scheme. | ||
# scheme = [ "https" ] | ||
|
||
# When links are available using HTTPS, treat HTTP links as errors. | ||
require_https = true | ||
|
||
# Request method | ||
method = "get" | ||
|
||
# Custom request headers | ||
headers = [] | ||
|
||
# Remap URI matching pattern to different URI. | ||
# remap = [ "https://example.com http://example.invalid" ] | ||
|
||
# Base URL or website root directory to check relative URLs. | ||
# base = "https://example.com" | ||
|
||
# HTTP basic auth support. This will be the username and password passed to the | ||
# authorization HTTP header. See | ||
# <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization> | ||
# basic_auth = "user:pwd" | ||
|
||
############################# Exclusions ########################## | ||
|
||
# Skip missing input files (default is to error if they don't exist). | ||
skip_missing = false | ||
|
||
# Check links inside `<code>` and `<pre>` blocks as well as Markdown code | ||
# blocks. | ||
include_verbatim = false | ||
|
||
# Ignore case of paths when matching glob patterns. | ||
glob_ignore_case = false | ||
|
||
# Exclude URLs and mail addresses from checking (supports regex). | ||
# exclude = [ '.*\.github.com\.*' ] | ||
exclude = [ | ||
'github\.com', # Requires authentication (403) | ||
'turing\.ac\.uk', # DDOS protection | ||
'ipaddressguide\.com', # 403 | ||
'opensource\.org' # 403 | ||
] | ||
|
||
# Exclude these filesystem paths from getting checked. | ||
# exclude_path = ["file/path/to/Ignore", "./other/file/path/to/Ignore"] | ||
exclude_path = [ | ||
'docs/build/html/_static/webpack-macros.html' | ||
] | ||
|
||
# URLs to check (supports regex). Has preference over all excludes. | ||
# include = [ 'gist\.github\.com.*' ] | ||
|
||
# Exclude all private IPs from checking. | ||
# Equivalent to setting `exclude_private`, `exclude_link_local`, and | ||
# `exclude_loopback` to true. | ||
exclude_all_private = false | ||
|
||
# Exclude private IP address ranges from checking. | ||
exclude_private = false | ||
|
||
# Exclude link-local IP address range from checking. | ||
exclude_link_local = false | ||
|
||
# Exclude loopback IP address range and localhost from checking. | ||
exclude_loopback = false | ||
|
||
# Exclude all mail addresses from checking. | ||
exclude_mail = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
version: 2 | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
|
||
sphinx: | ||
configuration: docs/source/conf.py | ||
|
||
# formats: | ||
|
||
python: | ||
install: | ||
- requirements: docs/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.