Skip to content

Commit 8df4327

Browse files
MaxGhenisclaude
andcommitted
Update documentation build to use Jupyter Book 2.0 / MyST
- Add myst.yml configuration for MyST-based documentation - Update CI workflow to use myst build instead of jb build - Add Node.js setup step (required by MyST) - Remove jupyter_book from pyproject.toml (MyST installs via npm) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d546056 commit 8df4327

4 files changed

Lines changed: 44 additions & 16 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,26 @@ jobs:
6060
runs-on: ubuntu-latest
6161
steps:
6262
- uses: actions/checkout@v4
63-
63+
6464
- name: Set up Python
6565
uses: actions/setup-python@v5
6666
with:
6767
python-version: '3.13'
68+
69+
- name: Set up Node.js
70+
uses: actions/setup-node@v4
71+
with:
72+
node-version: '20'
73+
6874
- name: Install uv
6975
uses: astral-sh/setup-uv@v3
7076
with:
7177
version: "latest"
78+
7279
- name: Install dependencies
7380
run: |
74-
uv pip install -e ".[dev,docs]" --system
75-
- name: Build Jupyter Book
76-
run: |
77-
jb build docs/.
78-
- name: Check documentation build
81+
uv pip install -e ".[dev]" --system
82+
83+
- name: Build documentation with MyST
7984
run: |
80-
for notebook in $(find docs/_build/jupyter_execute -name "*.ipynb"); do
81-
if grep -q '"output_type": "error"' "$notebook"; then
82-
echo "Error found in $notebook"
83-
cat "$notebook"
84-
exit 1
85-
fi
86-
done
85+
cd docs && myst build --html

changelog_entry.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
fixed:
44
- MicroDataFrame.loc[] and .iloc[] now preserve MicroDataFrame type and weights when filtering rows (fixes issue #265)
55
- MicroDataFrame.groupby(col)["y"].sum() and groupby(col)[["y"]].sum() now use weighted aggregation (fixes issue #193)
6+
- Documentation build updated to use Jupyter Book 2.0 / MyST

docs/myst.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: 1
2+
project:
3+
title: microdf documentation
4+
authors:
5+
- name:
6+
given: Max
7+
family: Ghenis
8+
copyright: '2024'
9+
github: PolicyEngine/microdf
10+
jupyter:
11+
myst:
12+
enable_extensions:
13+
- colon_fence
14+
- deflist
15+
- dollarmath
16+
- linkify
17+
- substitution
18+
toc:
19+
- file: home.md
20+
- file: examples.md
21+
children:
22+
- file: gini.ipynb
23+
site:
24+
options:
25+
logo: microdf_logo.png
26+
favicon: ''
27+
analytics_google: ''
28+
folders: true
29+
template: book-theme

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ dev = [
3030
"pytest-cov",
3131
"setuptools",
3232
]
33-
docs = [
34-
"jupyter_book",
35-
]
33+
# Note: Documentation uses MyST (Jupyter Book 2.0) which is installed via npm
34+
# Run: cd docs && myst build --html
3635

3736
[tool.setuptools.packages.find]
3837
where = ["."]

0 commit comments

Comments
 (0)