Skip to content

Commit a80a372

Browse files
committed
Add scripts for regenerating API docs and stubs, and update website sidebar for RayGeo API reference
1 parent 7aeed32 commit a80a372

7 files changed

Lines changed: 1107 additions & 2 deletions

File tree

.github/workflows/website.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ jobs:
2828
with:
2929
fetch-depth: 0 # Fetch all history for versioning
3030

31+
- name: Checkout raygeo source
32+
uses: actions/checkout@v6
33+
with:
34+
repository: barebaric/raygeo
35+
path: external/raygeo
36+
3137
- name: Set up Pixi
3238
uses: prefix-dev/setup-pixi@v0.9.4
3339
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ debian/.debhelper
2727
website/node_modules/
2828
website/.docusaurus/
2929
website/build/
30+
website/docs/developer/raygeo-api/
3031

3132
.mac_env
3233
rayforge/private_addons

pixi.toml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@ cmd = "cargo check --manifest-path external/raygeo/Cargo.toml"
154154
[tasks.raygeo-test]
155155
cmd = "cargo test --manifest-path external/raygeo/crates/raygeo/Cargo.toml && pytest -v external/raygeo/tests/"
156156

157+
[tasks.raygeo-clean-stubs]
158+
cmd = "rm -rf external/raygeo/raygeo-stubs website/docs/developer/raygeo-api/*.md"
159+
160+
[tasks.raygeo-gen-stubs]
161+
cmd = "mkdir -p external/raygeo/raygeo-stubs && python3 -c 'import raygeo; raygeo.generate_stubs(\"external/raygeo/raygeo-stubs\")'"
162+
depends-on = ["raygeo-clean-stubs", "raygeo-build"]
163+
157164
[tasks.build-deb]
158165
# Builds a binary .deb package for local installation and testing.
159166
cmd = "bash scripts/build-deb.sh"
@@ -171,11 +178,18 @@ pyright = ">=1.1.409,<2"
171178

172179
# Tasks for developing and generating the website
173180
[feature.website.tasks]
181+
site-gen-api = "python3 scripts/update_api_docs.py"
174182
site-install = { cmd = "npm install", cwd = "website" }
175-
site-serve = { cmd = "npm start", cwd = "website" }
176-
site-build = { cmd = "npm run build", cwd = "website" }
183+
site-serve = { cmd = "npm start", cwd = "website", depends-on = ["update-api-docs"] }
184+
site-build = { cmd = "npm run build", cwd = "website", depends-on = ["site-gen-api"] }
177185
site-deploy = "bash scripts/deploy_website.sh"
178186

187+
[tasks.update-stubs]
188+
cmd = "python3 scripts/update_stubs.py"
189+
190+
[tasks.update-api-docs]
191+
cmd = "python3 scripts/update_api_docs.py"
192+
179193
# Tasks for video processing
180194
[feature.video-tools.tasks]
181195
process-audio = "python3 scripts/media/process_audio.py"

0 commit comments

Comments
 (0)