Skip to content

Commit 50f0021

Browse files
committed
build docs in CI
1 parent 7ea9a4c commit 50f0021

File tree

6 files changed

+58
-20
lines changed

6 files changed

+58
-20
lines changed

.github/workflows/docs.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: macos-latest # Faster PyTorch installation
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Install pandoc
16+
uses: pandoc/actions/setup@v1
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
20+
with:
21+
version: "latest"
22+
23+
- name: Build the doc
24+
run: make docs
25+
26+
- name: Upload static files
27+
uses: actions/upload-pages-artifact@v3
28+
with:
29+
path: docs/build/
30+
31+
deploy:
32+
needs: build
33+
runs-on: ubuntu-latest
34+
permissions:
35+
pages: write
36+
id-token: write
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
steps:
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v4

Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.PHONY: docs
2+
3+
docs:
4+
rm -rf docs/build
5+
uv run --group doc jupyter nbconvert --clear-output --inplace docs/**/*.ipynb
6+
uv run --group doc sphinx-build -b html docs docs/build

docs/Makefile

-11
This file was deleted.

docs/api.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
API reference
33
=============
44

5+
.. autofunction:: fastabx.zerospeech_abx
6+
57
Standard classes and functions
68
==============================
79

8-
.. autofunction:: fastabx.zerospeech_abx
9-
1010
Dataset
1111
-------
1212

@@ -53,4 +53,4 @@ DTW
5353
---
5454

5555
.. autofunction:: fastabx.dtw.dtw
56-
.. autofunction:: fastabx.dtw.dtw_batch
56+
.. autofunction:: fastabx.dtw.dtw_batch

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
version = metadata(project)["Version"]
1818
release = version
1919

20+
autodoc_typehints = "description"
2021
exclude_patterns = ["build"]
2122
html_theme = "furo"
22-
html_static_path = ["_static"]

docs/install.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Install
33
=======
44

5-
Installing the latest release
6-
=============================
5+
Latest release
6+
==============
77

88
Install the package with pip:
99

@@ -16,8 +16,8 @@ The pinned PyTorch version is the one available on PyPI.
1616

1717
fastabx is available on Linux x86-64 and aarch64 (with glibc 2.34 or later [#glibc]_), macOS arm64, and Windows x86-64.
1818

19-
Building from source
20-
====================
19+
Build from source
20+
=================
2121

2222
1. Clone the repository:
2323

@@ -45,4 +45,4 @@ Footnotes
4545
This means you have to have to use the exact version of PyTorch this package was compiled against.
4646
4747
.. [#glibc] The glibc constraint is due to the runners available in GitHub CI. If you build from source,
48-
you can use the lowest version of glibc supported by PyTorch.
48+
you can use the lowest version of glibc supported by PyTorch.

0 commit comments

Comments
 (0)