From d4b6d9b2504f5bed799fb94137aa926a1af567b0 Mon Sep 17 00:00:00 2001 From: Michael Panchenko Date: Fri, 17 Nov 2023 11:26:25 +0100 Subject: [PATCH] WIP - restructure doc files --- docs/autogen_rst.py | 4 ++-- docs/index.rst | 21 +++++-------------- docs/notebooks/{intro.md => 0_intro.md} | 0 docs/tutorials/{dqn.rst => 00_dqn.rst} | 0 .../{concepts.rst => 01_concepts.rst} | 0 docs/tutorials/{batch.rst => 03_batch.rst} | 0 .../{tictactoe.rst => 04_tictactoe.rst} | 0 docs/tutorials/{logger.rst => 05_logger.rst} | 0 .../{benchmark.rst => 06_benchmark.rst} | 0 .../{cheatsheet.rst => 07_cheatsheet.rst} | 0 10 files changed, 7 insertions(+), 18 deletions(-) rename docs/notebooks/{intro.md => 0_intro.md} (100%) rename docs/tutorials/{dqn.rst => 00_dqn.rst} (100%) rename docs/tutorials/{concepts.rst => 01_concepts.rst} (100%) rename docs/tutorials/{batch.rst => 03_batch.rst} (100%) rename docs/tutorials/{tictactoe.rst => 04_tictactoe.rst} (100%) rename docs/tutorials/{logger.rst => 05_logger.rst} (100%) rename docs/tutorials/{benchmark.rst => 06_benchmark.rst} (100%) rename docs/tutorials/{cheatsheet.rst => 07_cheatsheet.rst} (100%) diff --git a/docs/autogen_rst.py b/docs/autogen_rst.py index 3105b13..dbb51f0 100644 --- a/docs/autogen_rst.py +++ b/docs/autogen_rst.py @@ -114,8 +114,8 @@ if __name__ == "__main__": logging.basicConfig(level=logging.INFO) docs_root = Path(__file__).parent make_rst( - docs_root / ".." / "tianshou" / "highlevel", - docs_root / "api" / "tianshou.highlevel", + docs_root / ".." / "tianshou", + docs_root / "api" / "tianshou", clean=True, package_prefix="tianshou.", ) diff --git a/docs/index.rst b/docs/index.rst index a8ba0fb..01a895d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -96,16 +96,9 @@ Tianshou is still under development, you can also check out the documents in sta .. toctree:: :maxdepth: 2 :caption: Get started: + :glob: - notebooks/intro - notebooks/L0_overview - notebooks/L1_Batch - notebooks/L2_Buffer - notebooks/L3_Vectorized__Environment - notebooks/L4_Policy - notebooks/L5_Collector - notebooks/L6_Trainer - notebooks/L7_Experiment + notebooks/* .. toctree:: @@ -124,14 +117,10 @@ Tianshou is still under development, you can also check out the documents in sta .. toctree:: :maxdepth: 1 :caption: API Docs + :glob: - api/tianshou.data - api/tianshou.env - api/tianshou.policy - api/tianshou.trainer - api/tianshou.exploration - api/tianshou.utils - api/tianshou.highlevel/index + + api/* .. toctree:: diff --git a/docs/notebooks/intro.md b/docs/notebooks/0_intro.md similarity index 100% rename from docs/notebooks/intro.md rename to docs/notebooks/0_intro.md diff --git a/docs/tutorials/dqn.rst b/docs/tutorials/00_dqn.rst similarity index 100% rename from docs/tutorials/dqn.rst rename to docs/tutorials/00_dqn.rst diff --git a/docs/tutorials/concepts.rst b/docs/tutorials/01_concepts.rst similarity index 100% rename from docs/tutorials/concepts.rst rename to docs/tutorials/01_concepts.rst diff --git a/docs/tutorials/batch.rst b/docs/tutorials/03_batch.rst similarity index 100% rename from docs/tutorials/batch.rst rename to docs/tutorials/03_batch.rst diff --git a/docs/tutorials/tictactoe.rst b/docs/tutorials/04_tictactoe.rst similarity index 100% rename from docs/tutorials/tictactoe.rst rename to docs/tutorials/04_tictactoe.rst diff --git a/docs/tutorials/logger.rst b/docs/tutorials/05_logger.rst similarity index 100% rename from docs/tutorials/logger.rst rename to docs/tutorials/05_logger.rst diff --git a/docs/tutorials/benchmark.rst b/docs/tutorials/06_benchmark.rst similarity index 100% rename from docs/tutorials/benchmark.rst rename to docs/tutorials/06_benchmark.rst diff --git a/docs/tutorials/cheatsheet.rst b/docs/tutorials/07_cheatsheet.rst similarity index 100% rename from docs/tutorials/cheatsheet.rst rename to docs/tutorials/07_cheatsheet.rst