Skip to content

Commit 613a21b

Browse files
ConchylicultorThe dataclass_array Authors
authored andcommitted
Add docs to dataclass_array
PiperOrigin-RevId: 546217890
1 parent d73fc9a commit 613a21b

File tree

4 files changed

+85
-0
lines changed

4 files changed

+85
-0
lines changed

dataclass_array/.readthedocs.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
version: 2
5+
6+
build:
7+
os: ubuntu-22.04
8+
tools:
9+
python: "3.11"
10+
11+
# Build documentation in the "docs/" directory with Sphinx
12+
sphinx:
13+
configuration: docs/conf.py
14+
15+
python:
16+
install:
17+
- method: pip
18+
path: .
19+
extra_requirements:
20+
- docs

docs/conf.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2023 The dataclass_array Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""Generate the sphinx documentation."""
16+
17+
import apitree
18+
19+
apitree.make_project(
20+
modules={'dca': 'dataclass_array'},
21+
globals=globals(),
22+
)

docs/index.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!-- mdformat off(myst not supported) -->
2+
3+
```{include} ../README.md
4+
```
5+
6+
<!--
7+
8+
How to have a self-reference ?
9+
10+
```{toctree}
11+
:hidden:
12+
:maxdepth: 0
13+
:titlesonly:
14+
Homepage <index>
15+
```
16+
17+
-->
18+
19+
<!--
20+
21+
TODO(epot): Add cross-reference to v3d
22+
23+
Visu3d <https://github.com/google-research/visu3d>
24+
25+
-->
26+
27+
```{toctree}
28+
:hidden:
29+
:caption: Links
30+
31+
GitHub <https://github.com/google-research/dataclass_array>
32+
```
33+
34+
```{toctree}
35+
:hidden:
36+
:caption: API
37+
38+
api/dca/index
39+
```

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ dev = [
4545
"tf-nightly",
4646
"torch",
4747
]
48+
docs = [
49+
"sphinx-apitree[ext] @ https://github.com/conchylicultor/sphinx-apitree",
50+
"dataclass_array[dev]", # Install lazy deps
51+
]
4852

4953
[tool.pyink]
5054
# Formatting configuration to follow Google style-guide

0 commit comments

Comments
 (0)