Skip to content

Commit d9afb7d

Browse files
damonbayerdylanhmorrispre-commit-ci[bot]
authored
Migrate documentation from Sphinx to MkDocs (#579)
Co-authored-by: Dylan H. Morris <dylanhmorris@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 503e7d3 commit d9afb7d

File tree

87 files changed

+1024
-2047
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1024
-2047
lines changed

.github/workflows/deptry.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
python-version-file: "pyproject.toml"
2323

2424
- name: Install the project
25-
run: uv sync --extra dev
25+
run: uv sync
2626

2727
- name: run deptry
2828
run: |

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
python-version-file: "pyproject.toml"
2323

2424
- name: Install the project
25-
run: uv sync --extra test
25+
run: uv sync
2626

2727
- name: run tests
2828
run: |

.github/workflows/website.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,18 @@ jobs:
3939
- name: Install the project
4040
run: uv sync --all-extras
4141

42-
- name: Render documentation index from README
43-
run: |
44-
cp README.md docs/source/index.md
45-
4642
# Building
4743
- name: Build HTML using uv
4844
run: |
49-
cd docs
50-
uv run make tutorials_clean
51-
uv run make html
45+
uv run make docs
5246
5347
# Upload
5448
- name: Upload artifacts
5549
uses: actions/upload-pages-artifact@v4
5650
with:
5751
name: github-pages
5852
retention-days: 7
59-
path: docs/build/html/
53+
path: site/
6054

6155
deploy:
6256
# Deploy to the github-pages environment

.pre-commit-config.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,13 @@ repos:
66
hooks:
77
- id: check-added-large-files
88
- id: check-yaml
9+
args: [--unsafe]
910
- id: check-toml
1011
- id: end-of-file-fixer
1112
- id: mixed-line-ending
1213
- id: trailing-whitespace
1314
#####
1415
# Python
15-
- repo: local
16-
hooks:
17-
- id: generate-md-placeholders
18-
name: Tutorials .md placeholders
19-
entry: ./hook_scripts/pre-commit-md-placeholder.sh
20-
language: script
21-
always_run: true
22-
files: "docs/source/tutorials/.*(qmd|md)$"
2316
- repo: https://github.com/astral-sh/ruff-pre-commit
2417
rev: v0.13.0
2518
hooks:
@@ -37,7 +30,7 @@ repos:
3730
hooks:
3831
- id: format-qmd-python
3932
name: Format Python in QMD
40-
entry: python hook_scripts/quarto_python_formatter.py "-q --line-length 79"
33+
entry: python docs_scripts/quarto_python_formatter.py "-q --line-length 79"
4134
language: python
4235
files: \.qmd$
4336
additional_dependencies: [ruff]

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ help:
55
@echo " help : Show this help message"
66
@echo " install : Install the project dependencies"
77
@echo " test : Run the tests"
8+
@echo " docs : Build the documentation"
89

910
install:
10-
uv sync --extra dev
11+
uv sync
1112

1213
test:
1314
uv run pytest --mpl --mpl-default-tolerance=10
1415

16+
docs:
17+
quarto render docs/tutorials
18+
uv run mkdocs build
1519

16-
.PHONY: install test
20+
.PHONY: install test docs

docs/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
build/
1+
/.quarto/

docs/Makefile

Lines changed: 0 additions & 70 deletions
This file was deleted.

docs/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--8<-- "README.md"

docs/javascripts/katex.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
document$.subscribe(({ body }) => {
2+
renderMathInElement(body, {
3+
delimiters: [
4+
{ left: "$$", right: "$$", display: true },
5+
{ left: "$", right: "$", display: false },
6+
{ left: "\\(", right: "\\)", display: false },
7+
{ left: "\\[", right: "\\]", display: true }
8+
],
9+
})
10+
})

0 commit comments

Comments
 (0)