add readthedocs support

This commit is contained in:
wls2002
2025-02-17 16:10:20 +08:00
parent f17f31bb2a
commit 4791a17362
27 changed files with 841 additions and 1 deletions

20
docs/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 = .
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/conf.py Normal file
View File

@@ -0,0 +1,35 @@
import os
import sys
script_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(script_dir, '..', 'src'))
# 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 = 'TensorNEAT'
copyright = '2025, Lishuang Wang'
author = 'Lishuang Wang'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
]
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- 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']

13
docs/index.rst Normal file
View File

@@ -0,0 +1,13 @@
.. TensorNEAT documentation master file, created by
sphinx-quickstart on Mon Feb 17 14:51:55 2025.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
TensorNEAT documentation
========================
.. toctree::
:maxdepth: 2
:caption: Contents:
source/tensorneat

35
docs/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=.
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

7
docs/source/modules.rst Normal file
View File

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

View File

@@ -0,0 +1,37 @@
tensorneat.algorithm.hyperneat package
======================================
Subpackages
-----------
.. toctree::
:maxdepth: 4
tensorneat.algorithm.hyperneat.substrate
Submodules
----------
tensorneat.algorithm.hyperneat.hyperneat module
-----------------------------------------------
.. automodule:: tensorneat.algorithm.hyperneat.hyperneat
:members:
:undoc-members:
:show-inheritance:
tensorneat.algorithm.hyperneat.hyperneat\_feedforward module
------------------------------------------------------------
.. automodule:: tensorneat.algorithm.hyperneat.hyperneat_feedforward
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.algorithm.hyperneat
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,45 @@
tensorneat.algorithm.hyperneat.substrate package
================================================
Submodules
----------
tensorneat.algorithm.hyperneat.substrate.base module
----------------------------------------------------
.. automodule:: tensorneat.algorithm.hyperneat.substrate.base
:members:
:undoc-members:
:show-inheritance:
tensorneat.algorithm.hyperneat.substrate.default module
-------------------------------------------------------
.. automodule:: tensorneat.algorithm.hyperneat.substrate.default
:members:
:undoc-members:
:show-inheritance:
tensorneat.algorithm.hyperneat.substrate.full module
----------------------------------------------------
.. automodule:: tensorneat.algorithm.hyperneat.substrate.full
:members:
:undoc-members:
:show-inheritance:
tensorneat.algorithm.hyperneat.substrate.mlp module
---------------------------------------------------
.. automodule:: tensorneat.algorithm.hyperneat.substrate.mlp
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.algorithm.hyperneat.substrate
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,29 @@
tensorneat.algorithm.neat package
=================================
Submodules
----------
tensorneat.algorithm.neat.neat module
-------------------------------------
.. automodule:: tensorneat.algorithm.neat.neat
:members:
:undoc-members:
:show-inheritance:
tensorneat.algorithm.neat.species module
----------------------------------------
.. automodule:: tensorneat.algorithm.neat.species
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.algorithm.neat
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,30 @@
tensorneat.algorithm package
============================
Subpackages
-----------
.. toctree::
:maxdepth: 4
tensorneat.algorithm.hyperneat
tensorneat.algorithm.neat
Submodules
----------
tensorneat.algorithm.base module
--------------------------------
.. automodule:: tensorneat.algorithm.base
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.algorithm
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,29 @@
tensorneat.common.evox\_adaptors package
========================================
Submodules
----------
tensorneat.common.evox\_adaptors.algorithm\_adaptor module
----------------------------------------------------------
.. automodule:: tensorneat.common.evox_adaptors.algorithm_adaptor
:members:
:undoc-members:
:show-inheritance:
tensorneat.common.evox\_adaptors.tensorneat\_monitor module
-----------------------------------------------------------
.. automodule:: tensorneat.common.evox_adaptors.tensorneat_monitor
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.common.evox_adaptors
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,53 @@
tensorneat.common.functions package
===================================
Submodules
----------
tensorneat.common.functions.act\_jnp module
-------------------------------------------
.. automodule:: tensorneat.common.functions.act_jnp
:members:
:undoc-members:
:show-inheritance:
tensorneat.common.functions.act\_sympy module
---------------------------------------------
.. automodule:: tensorneat.common.functions.act_sympy
:members:
:undoc-members:
:show-inheritance:
tensorneat.common.functions.agg\_jnp module
-------------------------------------------
.. automodule:: tensorneat.common.functions.agg_jnp
:members:
:undoc-members:
:show-inheritance:
tensorneat.common.functions.agg\_sympy module
---------------------------------------------
.. automodule:: tensorneat.common.functions.agg_sympy
:members:
:undoc-members:
:show-inheritance:
tensorneat.common.functions.manager module
------------------------------------------
.. automodule:: tensorneat.common.functions.manager
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.common.functions
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,62 @@
tensorneat.common package
=========================
Subpackages
-----------
.. toctree::
:maxdepth: 4
tensorneat.common.evox_adaptors
tensorneat.common.functions
Submodules
----------
tensorneat.common.graph module
------------------------------
.. automodule:: tensorneat.common.graph
:members:
:undoc-members:
:show-inheritance:
tensorneat.common.state module
------------------------------
.. automodule:: tensorneat.common.state
:members:
:undoc-members:
:show-inheritance:
tensorneat.common.stateful\_class module
----------------------------------------
.. automodule:: tensorneat.common.stateful_class
:members:
:undoc-members:
:show-inheritance:
tensorneat.common.sympy\_tools module
-------------------------------------
.. automodule:: tensorneat.common.sympy_tools
:members:
:undoc-members:
:show-inheritance:
tensorneat.common.tools module
------------------------------
.. automodule:: tensorneat.common.tools
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.common
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,37 @@
tensorneat.genome.gene.conn package
===================================
Submodules
----------
tensorneat.genome.gene.conn.base module
---------------------------------------
.. automodule:: tensorneat.genome.gene.conn.base
:members:
:undoc-members:
:show-inheritance:
tensorneat.genome.gene.conn.default module
------------------------------------------
.. automodule:: tensorneat.genome.gene.conn.default
:members:
:undoc-members:
:show-inheritance:
tensorneat.genome.gene.conn.origin module
-----------------------------------------
.. automodule:: tensorneat.genome.gene.conn.origin
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.genome.gene.conn
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,45 @@
tensorneat.genome.gene.node package
===================================
Submodules
----------
tensorneat.genome.gene.node.base module
---------------------------------------
.. automodule:: tensorneat.genome.gene.node.base
:members:
:undoc-members:
:show-inheritance:
tensorneat.genome.gene.node.bias module
---------------------------------------
.. automodule:: tensorneat.genome.gene.node.bias
:members:
:undoc-members:
:show-inheritance:
tensorneat.genome.gene.node.default module
------------------------------------------
.. automodule:: tensorneat.genome.gene.node.default
:members:
:undoc-members:
:show-inheritance:
tensorneat.genome.gene.node.origin module
-----------------------------------------
.. automodule:: tensorneat.genome.gene.node.origin
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.genome.gene.node
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,30 @@
tensorneat.genome.gene package
==============================
Subpackages
-----------
.. toctree::
:maxdepth: 4
tensorneat.genome.gene.conn
tensorneat.genome.gene.node
Submodules
----------
tensorneat.genome.gene.base module
----------------------------------
.. automodule:: tensorneat.genome.gene.base
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.genome.gene
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,29 @@
tensorneat.genome.operations.crossover package
==============================================
Submodules
----------
tensorneat.genome.operations.crossover.base module
--------------------------------------------------
.. automodule:: tensorneat.genome.operations.crossover.base
:members:
:undoc-members:
:show-inheritance:
tensorneat.genome.operations.crossover.default module
-----------------------------------------------------
.. automodule:: tensorneat.genome.operations.crossover.default
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.genome.operations.crossover
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,29 @@
tensorneat.genome.operations.distance package
=============================================
Submodules
----------
tensorneat.genome.operations.distance.base module
-------------------------------------------------
.. automodule:: tensorneat.genome.operations.distance.base
:members:
:undoc-members:
:show-inheritance:
tensorneat.genome.operations.distance.default module
----------------------------------------------------
.. automodule:: tensorneat.genome.operations.distance.default
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.genome.operations.distance
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,29 @@
tensorneat.genome.operations.mutation package
=============================================
Submodules
----------
tensorneat.genome.operations.mutation.base module
-------------------------------------------------
.. automodule:: tensorneat.genome.operations.mutation.base
:members:
:undoc-members:
:show-inheritance:
tensorneat.genome.operations.mutation.default module
----------------------------------------------------
.. automodule:: tensorneat.genome.operations.mutation.default
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.genome.operations.mutation
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,20 @@
tensorneat.genome.operations package
====================================
Subpackages
-----------
.. toctree::
:maxdepth: 4
tensorneat.genome.operations.crossover
tensorneat.genome.operations.distance
tensorneat.genome.operations.mutation
Module contents
---------------
.. automodule:: tensorneat.genome.operations
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,54 @@
tensorneat.genome package
=========================
Subpackages
-----------
.. toctree::
:maxdepth: 4
tensorneat.genome.gene
tensorneat.genome.operations
Submodules
----------
tensorneat.genome.base module
-----------------------------
.. automodule:: tensorneat.genome.base
:members:
:undoc-members:
:show-inheritance:
tensorneat.genome.default module
--------------------------------
.. automodule:: tensorneat.genome.default
:members:
:undoc-members:
:show-inheritance:
tensorneat.genome.recurrent module
----------------------------------
.. automodule:: tensorneat.genome.recurrent
:members:
:undoc-members:
:show-inheritance:
tensorneat.genome.utils module
------------------------------
.. automodule:: tensorneat.genome.utils
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.genome
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,45 @@
tensorneat.problem.func\_fit package
====================================
Submodules
----------
tensorneat.problem.func\_fit.custom module
------------------------------------------
.. automodule:: tensorneat.problem.func_fit.custom
:members:
:undoc-members:
:show-inheritance:
tensorneat.problem.func\_fit.func\_fit module
---------------------------------------------
.. automodule:: tensorneat.problem.func_fit.func_fit
:members:
:undoc-members:
:show-inheritance:
tensorneat.problem.func\_fit.xor module
---------------------------------------
.. automodule:: tensorneat.problem.func_fit.xor
:members:
:undoc-members:
:show-inheritance:
tensorneat.problem.func\_fit.xor3d module
-----------------------------------------
.. automodule:: tensorneat.problem.func_fit.xor3d
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.problem.func_fit
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,37 @@
tensorneat.problem.rl package
=============================
Submodules
----------
tensorneat.problem.rl.brax module
---------------------------------
.. automodule:: tensorneat.problem.rl.brax
:members:
:undoc-members:
:show-inheritance:
tensorneat.problem.rl.gymnax module
-----------------------------------
.. automodule:: tensorneat.problem.rl.gymnax
:members:
:undoc-members:
:show-inheritance:
tensorneat.problem.rl.rl\_jit module
------------------------------------
.. automodule:: tensorneat.problem.rl.rl_jit
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.problem.rl
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,30 @@
tensorneat.problem package
==========================
Subpackages
-----------
.. toctree::
:maxdepth: 4
tensorneat.problem.func_fit
tensorneat.problem.rl
Submodules
----------
tensorneat.problem.base module
------------------------------
.. automodule:: tensorneat.problem.base
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat.problem
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,32 @@
tensorneat package
==================
Subpackages
-----------
.. toctree::
:maxdepth: 4
tensorneat.algorithm
tensorneat.common
tensorneat.genome
tensorneat.problem
Submodules
----------
tensorneat.pipeline module
--------------------------
.. automodule:: tensorneat.pipeline
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: tensorneat
:members:
:undoc-members:
:show-inheritance: