add initial docs for ReadTheDocs.

This commit is contained in:
kaichao 2024-01-29 21:44:12 +08:00
parent 32b95a0cfc
commit 60154829a8
24 changed files with 388 additions and 1 deletions

5
.gitignore vendored
View File

@ -2,4 +2,7 @@
.DS_Store
.DS_Store?
/Makefile
/Makefile
docs/en/build
docs/zh_CN/build

35
docs/en/.readthedocs.yaml Normal file
View File

@ -0,0 +1,35 @@
# Required
version: 2
# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/en/source/conf.py
builder: html
# Removed the output key since it's not valid
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true
# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub
# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt

20
docs/en/Makefile Normal file
View File

@ -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)

35
docs/en/make.bat Normal file
View File

@ -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

35
docs/en/source/conf.py Normal file
View File

@ -0,0 +1,35 @@
# 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
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'scalebox'
copyright = '2024, scalebox'
author = 'scalebox'
release = '0.1.0'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = ['recommonmark','sphinx_markdown_tables','sphinx.ext.autosectionlabel']
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
language = 'en_US'
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
# html_build_dir = os.environ.get('READTHEDOCS_OUTPUT', 'docs/en/build/html')
#supported markdown
source_suffix = ['.rst', '.md']
master_doc = 'index'

View File

@ -0,0 +1,4 @@
# Programming Model
Programming Model

3
docs/en/source/faq.md Normal file
View File

@ -0,0 +1,3 @@
# FAQ
faq

3
docs/en/source/help.md Normal file
View File

@ -0,0 +1,3 @@
# Getting Help
getting help

39
docs/en/source/index.rst Normal file
View File

@ -0,0 +1,39 @@
.. scalebox documentation master file, created by
sphinx-quickstart on Mon Jan 29 06:19:06 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to scalebox's documentation!
====================================
.. toctree::
:maxdepth: 2
:caption: Introduction
:hidden:
introduction/research_background
introduction/programming_framework
faq
help
.. toctree::
:maxdepth: 2
:caption: User Guide
:hidden:
user_guide/architecture
.. toctree::
:maxdepth: 2
:caption: Developer Guide
:hidden:
developer_guide/programming_model
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -0,0 +1,3 @@
# Parallel Programming
Parallel Programming

View File

@ -0,0 +1,3 @@
# Research Background
Research Background

View File

@ -0,0 +1,3 @@
# 系统架构
系统架构

23
docs/requirements.txt Normal file
View File

@ -0,0 +1,23 @@
alabaster==0.7.13
Babel==2.12.1
certifi==2023.7.22
charset-normalizer==3.2.0
docutils==0.18.1
idna==3.4
imagesize==1.4.1
Jinja2==3.1.2
MarkupSafe==2.1.3
packaging==23.1
Pygments==2.16.1
requests==2.31.0
snowballstemmer==2.2.0
Sphinx==6.2.1
sphinx-rtd-theme==1.2.2
sphinxcontrib-applehelp==1.0.6
sphinxcontrib-devhelp==1.0.4
sphinxcontrib-htmlhelp==2.0.3
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.5
sphinxcontrib-serializinghtml==1.1.7
urllib3==2.0.4

View File

@ -0,0 +1,35 @@
# Required
version: 2
# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/en/source/conf.py
builder: html
# Removed the output key since it's not valid
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true
# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub
# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt

20
docs/zh_CN/Makefile Normal file
View File

@ -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)

35
docs/zh_CN/make.bat Normal file
View File

@ -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

33
docs/zh_CN/source/conf.py Normal file
View File

@ -0,0 +1,33 @@
# 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
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'Scalebox'
copyright = '2024, scalebox'
author = 'scalebox'
release = 'v0.1.0'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = ['recommonmark','sphinx_markdown_tables']
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
language = 'zh_CN'
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
#supported markdown
source_suffix = ['.rst', '.md']
master_doc = 'index'

View File

@ -0,0 +1 @@
# 1. 编程模型

5
docs/zh_CN/source/faq.md Normal file
View File

@ -0,0 +1,5 @@
# 3. FAQ
Frequently Asked Questions

View File

@ -0,0 +1,4 @@
# 4. 获取帮助
help@scalebox.dev

View File

@ -0,0 +1,38 @@
.. Scalebox documentation master file, created by
sphinx-quickstart on Sun Jan 21 09:48:07 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Scalebox's documentation!
====================================
.. toctree::
:maxdepth: 2
:caption: Introduction
:hidden:
research_background
programming_framework
faq
help
.. toctree::
:maxdepth: 2
:caption: User Guide
:hidden:
user_guide/architecture
.. toctree::
:maxdepth: 2
:caption: Developer Guide
:hidden:
developer_guide/programming_model
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -0,0 +1,4 @@
# 2. 编程框架
编程框架

View File

@ -0,0 +1,2 @@
# 1. 研究背景

View File

@ -0,0 +1 @@
# 系统架构