Skip to content

Commit b7e12af

Browse files
authored
Add Sphinx-based docs (#254)
* Add placeholder for docs * Add docs * Add images * Tidy up docs * Let the AI improve wording * Add brief contributor guide * Improve dev guide * Improve contributor guide * Add pipeline for github docs * Remove stuff from README.md * Add pipeline for deploying docs
1 parent 5dbdf00 commit b7e12af

30 files changed

+788
-271
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*.parquet filter=lfs diff=lfs merge=lfs -text
2+
*.png filter=lfs diff=lfs merge=lfs -text

.github/workflows/docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
lfs: true
26+
27+
- name: Setup Python
28+
uses: actions/setup-python@v6
29+
with:
30+
python-version: '3.x'
31+
32+
- name: Install dependencies
33+
run: |
34+
pip install -r docs/requirements.txt
35+
36+
- name: Build documentation
37+
run: |
38+
cd docs
39+
make html
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v4
43+
with:
44+
path: docs/build/html
45+
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
needs: build
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

README.md

Lines changed: 6 additions & 271 deletions
Large diffs are not rendered by default.

docs/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build/
2+
venv/
3+
temp/

docs/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Minimal makefile for Sphinx documentation
2+
3+
# You can set these variables from the command line, and also
4+
# from the environment for the first two.
5+
SPHINXOPTS ?= -W
6+
SPHINXBUILD ?= sphinx-build
7+
SOURCEDIR = source
8+
BUILDDIR = build
9+
10+
# Put it first so that "make" without argument is like "make help".
11+
help:
12+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13+
14+
.PHONY: help Makefile
15+
16+
# Catch-all target: route all unknown targets to Sphinx using the new
17+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
18+
%: Makefile
19+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# DataFusion Distributed Documentation
2+
3+
This directory contains the documentation for DataFusion Distributed, built using [Sphinx](https://www.sphinx-doc.org/).
4+
5+
## Building the Documentation
6+
7+
### Prerequisites
8+
9+
Install the required dependencies:
10+
11+
```bash
12+
pip install -r requirements.txt
13+
```
14+
15+
### Build HTML Documentation
16+
17+
```bash
18+
make html
19+
```
20+
21+
The generated documentation will be available in `build/html/index.html`.
22+
23+
### Clean Build Files
24+
25+
```bash
26+
make clean
27+
```
28+
29+
## Documentation Structure
30+
31+
- `source/` - Documentation source files (reStructuredText and Markdown)
32+
- `user-guide/` - User-facing documentation
33+
- `architecture/` - Architecture documentation
34+
- `contributor-guide/` - Contributor documentation
35+
- `_static/` - Static files (images, CSS, etc.)
36+
- `_templates/` - Custom templates
37+
38+
## Contributing
39+
40+
When adding new documentation:
41+
42+
1. Create new `.md` or `.rst` files in the appropriate subdirectory
43+
2. Add references to new files in the relevant `index.rst` or `index.md`
44+
3. Build and preview your changes locally
45+
4. Ensure all links and references work correctly

docs/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
make clean
4+
make html

docs/requirements.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
sphinx==8.2.3
2+
sphinx-reredirects==1.0.0
3+
pydata-sphinx-theme==0.16.1
4+
myst-parser==4.0.1
5+
maturin==1.10.2
6+
jinja2==3.1.6
7+
setuptools==80.9.0

docs/source/_static/images/img.png

Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)