Merge pull request #19 from EMI-Group/dev-doc

Dev doc
This commit is contained in:
WLS2002
2025-02-17 17:34:27 +08:00
committed by GitHub
7 changed files with 16 additions and 69 deletions

View File

@@ -9,8 +9,6 @@ build:
os: ubuntu-22.04
tools:
python: "3.10"
commands:
- sphinx-apidoc -o docs/source src/tensorneat
# Build documentation in the "docs/" directory with Sphinx
sphinx:
@@ -21,6 +19,6 @@ sphinx:
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- method: pip
path: .
- requirements: docs/requirements.txt

View File

@@ -1,20 +0,0 @@
# 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 = .
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)

View File

@@ -1,7 +1,7 @@
import os
import sys
script_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(script_dir, '..', 'src'))
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../src'))
# Configuration file for the Sphinx documentation builder.
#
@@ -24,6 +24,11 @@ extensions = [
'sphinx.ext.viewcode',
]
autodoc_mock_imports = [
"evox"
]
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

View File

@@ -12,7 +12,7 @@ TensorNEAT documentation
source/tensorneat
.. automodule:: tensorneat
:members:
:undoc-members:
:show-inheritance:
.. .. automodule:: tensorneat
.. :members:
.. :undoc-members:
.. :show-inheritance:

View File

@@ -1,35 +0,0 @@
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
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

View File

@@ -1,2 +1 @@
sphinx-apidoc
sphinx_rtd_theme

View File

@@ -1,5 +1,5 @@
src
===
tensorneat
==========
.. toctree::
:maxdepth: 4