From 185b7162ec7c91dc2f66e34a8819965afb593b1f Mon Sep 17 00:00:00 2001 From: wls2002 Date: Mon, 17 Feb 2025 17:07:14 +0800 Subject: [PATCH 1/5] update doc --- .readthedocs.yaml | 2 -- docs/Makefile | 20 -------------------- docs/make.bat | 35 ----------------------------------- docs/source/modules.rst | 4 ++-- 4 files changed, 2 insertions(+), 59 deletions(-) delete mode 100644 docs/Makefile delete mode 100644 docs/make.bat diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 8a94b6f..316f855 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -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: diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d4bb2cb..0000000 --- a/docs/Makefile +++ /dev/null @@ -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) diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 32bb245..0000000 --- a/docs/make.bat +++ /dev/null @@ -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 diff --git a/docs/source/modules.rst b/docs/source/modules.rst index bda3bfc..c41cabf 100644 --- a/docs/source/modules.rst +++ b/docs/source/modules.rst @@ -1,5 +1,5 @@ -src -=== +tensorneat +========== .. toctree:: :maxdepth: 4 From b3277d1b9d4927fc38954c3a8d28eb8d10199fc5 Mon Sep 17 00:00:00 2001 From: wls2002 Date: Mon, 17 Feb 2025 17:09:59 +0800 Subject: [PATCH 2/5] remove useless requirement --- docs/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index b5bb3b1..52b04f2 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1 @@ -sphinx-apidoc sphinx_rtd_theme \ No newline at end of file From 72c1604ea0e7e908ca07ebf5878b0f2b1b9583a5 Mon Sep 17 00:00:00 2001 From: wls2002 Date: Mon, 17 Feb 2025 17:12:22 +0800 Subject: [PATCH 3/5] upodate conf.py in doc --- docs/conf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 166679f..715a917 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,7 +1,6 @@ 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('../src')) # Configuration file for the Sphinx documentation builder. # From 8e240b20c67b4f014008883b59bbfa5b5607f7ef Mon Sep 17 00:00:00 2001 From: wls2002 Date: Mon, 17 Feb 2025 17:25:59 +0800 Subject: [PATCH 4/5] update doc --- .readthedocs.yaml | 6 +++--- docs/conf.py | 1 + docs/index.rst | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 316f855..3f8c618 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -19,6 +19,6 @@ sphinx: # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html python: install: - - requirements: docs/requirements.txt - - + - method: pip + path: . + - requirements: docs/requirements.txt \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 715a917..1eed2b2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,6 @@ import os import sys +sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('../src')) # Configuration file for the Sphinx documentation builder. diff --git a/docs/index.rst b/docs/index.rst index 32cb4e9..21bdf42 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,7 +12,7 @@ TensorNEAT documentation source/tensorneat -.. automodule:: tensorneat - :members: - :undoc-members: - :show-inheritance: +.. .. automodule:: tensorneat +.. :members: +.. :undoc-members: +.. :show-inheritance: From d787e13a724e78f26c2877455b6c549dd95635ad Mon Sep 17 00:00:00 2001 From: wls2002 Date: Mon, 17 Feb 2025 17:30:33 +0800 Subject: [PATCH 5/5] update doc --- docs/conf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 1eed2b2..856c1fa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,6 +24,11 @@ extensions = [ 'sphinx.ext.viewcode', ] +autodoc_mock_imports = [ + "evox" +] + + templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']