Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
02a029b
feat: add Sphinx documentation structure and configuration
shima004 Nov 14, 2024
ea1e428
feat: update GitHub Actions workflow and configuration files to inclu…
shima004 Nov 14, 2024
d5f84b8
feat: update GitHub Actions workflow to add permissions for contents …
shima004 Nov 14, 2024
a5379f3
feat: add Japanese localization and update documentation structure
shima004 Nov 15, 2024
d40a902
fix: update README to correct Sphinx build command
shima004 Nov 18, 2024
72ea86b
feat: add click package and update dependencies in poetry.lock
shima004 Nov 21, 2024
ba09c8e
fix: remove obsolete make command from README
shima004 Nov 21, 2024
0a3970d
feat: add Japanese documentation for clustering module and quickstart…
shima004 Nov 21, 2024
c355188
fix: update Sphinx build command to include the '-a' option for all f…
shima004 Nov 22, 2024
5c68d21
feat: add sphinx-copybutton package to poetry.lock and pyproject.toml
shima004 Nov 22, 2024
0a2186d
feat: rst to markdown
shima004 Nov 22, 2024
d7d2429
fix: remove obsolete example and search documentation files
shima004 Nov 22, 2024
9d717fc
feat: add Japanese documentation for clustering module and remove obs…
shima004 Nov 25, 2024
fb72dac
docs: add warning about package availability in index.rst
shima004 Nov 25, 2024
83b77d8
feat: update Japanese documentation for clustering module and add new…
shima004 Nov 26, 2024
d900ab5
feat: update dependencies and add sphinxcontrib-mermaid package
shima004 Nov 27, 2024
ae6adaa
feat: add agent control tutorial and integrate sphinxcontrib-mermaid …
shima004 Nov 27, 2024
6e0160f
docs: fix lint
shima004 Nov 27, 2024
74df508
docs: correct project name in README.md
shima004 Nov 27, 2024
a677515
docs: update agent control tutorial with entity class details and exa…
shima004 Nov 27, 2024
0b73135
fix
shima004 Nov 28, 2024
f7e5992
docs: add search module documentation and update index
shima004 Nov 28, 2024
4917ee6
docs: update config tutorial with directory structure and file descri…
shima004 Nov 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/document.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: document

on:
workflow_dispatch:
push:
branches:
- main
- develop
paths:
- 'docs/**'
pull_request:
branches:
- main
- develop
paths:
- 'docs/**'

concurrency:
group: 'pages'
cancel-in-progress: true

permissions:
contents: write
pull-requests: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Cache virtual environment
id: cached-virtualenv
uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: steps.cached-virtualenv.outputs.cache-hit != 'true'
run: |
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install poetry
poetry install

- name: Build documentation
run: |
source .venv/bin/activate
sphinx-apidoc -f -o ./docs/source ./adf_core_python
cd docs
make html
ls build/html

- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source/adf_core_python.*
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# sphinx-documentation

## Generate documentation

```bash
sphinx-apidoc -f -o ./docs/source ./adf_core_python
sphinx-build -M html ./docs/source ./docs/build -a
```
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
Empty file added docs/source/_static/.gitkeep
Empty file.
40 changes: 40 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import sys

sys.path.insert(0, os.path.abspath("../../"))

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "adf-core-python"
copyright = "2024, Haruki Uehara, Yuki Shimada"
author = "Haruki Uehara, Yuki Shimada"
release = "0.1.0"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.autosummary",
"sphinx_copybutton",
"myst_parser",
"sphinxcontrib.mermaid",
]

templates_path = ["_templates"]
exclude_patterns = []

language = "ja"

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_book_theme"
html_static_path = ["_static"]
Loading