From 031fe2d4f80047d2e316deb3e1962c1593801b29 Mon Sep 17 00:00:00 2001 From: niksirbi Date: Tue, 22 Oct 2024 15:29:19 +0100 Subject: [PATCH 1/3] test commit --- docs/requirements.txt | 1 + docs/source/conf.py | 1 + docs/source/getting_started.md | 2 +- docs/source/index.rst | 5 +++++ docs/source/installation.md | 3 +++ 5 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 docs/source/installation.md diff --git a/docs/requirements.txt b/docs/requirements.txt index 27a26267..f8fdeea3 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -5,4 +5,5 @@ pydata-sphinx-theme setuptools-scm sphinx sphinx-autodoc-typehints +sphinx-design sphinx-sitemap diff --git a/docs/source/conf.py b/docs/source/conf.py index ba2dcc1e..3e70635c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -44,6 +44,7 @@ "sphinx_sitemap", "myst_parser", "nbsphinx", + "sphinx_design", ] # Configure the myst parser to enable cool markdown features diff --git a/docs/source/getting_started.md b/docs/source/getting_started.md index bac959d5..8ea75e3f 100644 --- a/docs/source/getting_started.md +++ b/docs/source/getting_started.md @@ -5,7 +5,7 @@ Here you may demonstrate the basic functionalities your package. You can include code snippets using the usual Markdown syntax: ```python -from my_package import my_function +from NeuralPlayground import my_function result = my_function() ``` diff --git a/docs/source/index.rst b/docs/source/index.rst index e8dac36b..7cc8d445 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -10,9 +10,14 @@ Welcome to NeuralPlayground's documentation! :maxdepth: 2 :caption: Contents: + installation getting_started api_index +.. card:: Card Title + + Card content + By default the documentation includes the following sections: * Getting started. Here you could describe the basic functionalities of your package. To modify this page, edit the file ``docs/source/getting_started.md``. diff --git a/docs/source/installation.md b/docs/source/installation.md new file mode 100644 index 00000000..be6363ef --- /dev/null +++ b/docs/source/installation.md @@ -0,0 +1,3 @@ +# Install + +Do something. From 9f71c06eecec79154ef588368daa1a5b24fa4b60 Mon Sep 17 00:00:00 2001 From: niksirbi Date: Tue, 22 Oct 2024 15:42:47 +0100 Subject: [PATCH 2/3] a minimal API docs example --- docs/requirements.txt | 1 + ...neuralplayground.agents.agent_core.AgentCore.rst | 6 ++++++ docs/source/api_index.rst | 13 +++++++++++++ docs/source/conf.py | 1 + 4 files changed, 21 insertions(+) create mode 100644 docs/source/api_generated/neuralplayground.agents.agent_core.AgentCore.rst create mode 100644 docs/source/api_index.rst diff --git a/docs/requirements.txt b/docs/requirements.txt index f8fdeea3..d2acc63b 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,4 @@ +-e . linkify-it-py myst-parser nbsphinx diff --git a/docs/source/api_generated/neuralplayground.agents.agent_core.AgentCore.rst b/docs/source/api_generated/neuralplayground.agents.agent_core.AgentCore.rst new file mode 100644 index 00000000..5f09c72e --- /dev/null +++ b/docs/source/api_generated/neuralplayground.agents.agent_core.AgentCore.rst @@ -0,0 +1,6 @@ +neuralplayground.agents.agent\_core.AgentCore +============================================= + +.. currentmodule:: neuralplayground.agents.agent_core + +.. autoclass:: AgentCore diff --git a/docs/source/api_index.rst b/docs/source/api_index.rst new file mode 100644 index 00000000..965d32f6 --- /dev/null +++ b/docs/source/api_index.rst @@ -0,0 +1,13 @@ +API +=== + +Agent +----- + +.. currentmodule:: neuralplayground.agents.agent_core + +.. autosummary:: + :toctree: api_generated + :template: class.rst + + AgentCore diff --git a/docs/source/conf.py b/docs/source/conf.py index 3e70635c..af45de9a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -25,6 +25,7 @@ author = "University College London" try: release = setuptools_scm.get_version(root="../..", relative_to=__file__) + release = release.split(".dev")[0] except LookupError: # if git is not initialised, still allow local build # with a dummy version From 935833a022cac41518d2fe912ce970e2dfbd4f29 Mon Sep 17 00:00:00 2001 From: niksirbi Date: Tue, 22 Oct 2024 15:55:05 +0100 Subject: [PATCH 3/3] include example readme link --- docs/source/index.rst | 1 + docs/source/readme_link.rst | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 docs/source/readme_link.rst diff --git a/docs/source/index.rst b/docs/source/index.rst index 7cc8d445..f66bac70 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -13,6 +13,7 @@ Welcome to NeuralPlayground's documentation! installation getting_started api_index + readme_link .. card:: Card Title diff --git a/docs/source/readme_link.rst b/docs/source/readme_link.rst new file mode 100644 index 00000000..f39c06dc --- /dev/null +++ b/docs/source/readme_link.rst @@ -0,0 +1,6 @@ +Readme File +=========== + +.. include:: ../../README.md + :parser: myst_parser.sphinx_ + :start-after: ## Usage