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/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]