From c61d261c95d9215c4ab9eaee9b3a0aec11a8d932 Mon Sep 17 00:00:00 2001 From: Etienne Pot Date: Thu, 19 Dec 2024 07:44:43 -0800 Subject: [PATCH] Add internal doc PiperOrigin-RevId: 707911189 --- .readthedocs.yaml | 21 +++++++++++++++++++++ docs/conf.py | 34 ++++++++++++++++++++++++++++++++++ docs/images/icon.svg | 15 +++++++++++++++ docs/index.md | 2 ++ docs/requirements.txt | 1 + 5 files changed, 73 insertions(+) create mode 100644 .readthedocs.yaml create mode 100644 docs/conf.py create mode 100644 docs/images/icon.svg create mode 100644 docs/index.md create mode 100644 docs/requirements.txt diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..8eb5cb3 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,21 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/conf.py + +python: + install: + # `pip install .[docs]` fail: https://github.com/pypa/pip/issues/13092 + # So try to install the dependencies separately. + - requirements: docs/requirements.txt + - method: pip + path: . diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..ccf32cb --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,34 @@ +# Copyright 2024 DeepMind Technologies Limited. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Generate documentation. + +Usage (from the root directory): + +```sh +pip install -e .[docs] + +sphinx-build -b html docs/ docs/_build +``` +""" + +import apitree + + +apitree.make_project( + # TODO(epot): Add api + modules={}, + includes_paths={}, + globals=globals(), +) diff --git a/docs/images/icon.svg b/docs/images/icon.svg new file mode 100644 index 0000000..fa6fcfe --- /dev/null +++ b/docs/images/icon.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..451beda --- /dev/null +++ b/docs/index.md @@ -0,0 +1,2 @@ +```{include} ../README.md +``` diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..f20275b --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +sphinx-apitree[ext]