From e41d73cb668e1824b459a4c78f693db1fc2a8c84 Mon Sep 17 00:00:00 2001 From: voorhs Date: Wed, 4 Dec 2024 13:49:27 +0300 Subject: [PATCH 1/2] own page for each class and function & pydata theme --- docs/source/conf.py | 5 ++++- docs/source/index.rst | 39 ++++++++++++++++++++++++++++++--------- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 5188d0c2d..80f4668ca 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -60,11 +60,14 @@ "imported-members", ] autodoc_typehints = "description" +autoapi_own_page_level = "function" +suppress_warnings = ["autoapi.python_import_resolution"] +autoapi_add_toctree_entry = False # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = "alabaster" +html_theme = "pydata_sphinx_theme" html_static_path = ["_static"] nbsphinx_execute = "never" diff --git a/docs/source/index.rst b/docs/source/index.rst index c41e2cac7..48f8a0957 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -23,14 +23,35 @@ Example of building an intent classifier in a couple of lines of code: pipeline.fit(dataset) pipeline.predict(["Hello, World!"]) -We recommend you to begin your exploration of our library from the :doc:`quickstart` page. +Documentation Contents +---------------------- -.. toctree:: - :maxdepth: 1 - :caption: Contents: +:doc:`quickstart` +................. - quickstart - concepts - tutorials - guides/index - learn/index +It is recommended to begin with the :doc:`quickstart` page. It contains overview of our capabilities. + +:doc:`concepts` +............... + +This page contains basic information about the terms and concepts we use throughout our documentation. + +:doc:`tutorials` +................ + +Newbie-friendly information on how to perform different tasks using our library. + +:doc:`guides/index` +................... + +Some advanced information + +:doc:`learn/index` +.................. + +Some theoretical background + +:doc:`API Reference ` +............................................... + +lotta stuff From 58c16dfbb888d20c939c8b78e5b883f3bed18cff Mon Sep 17 00:00:00 2001 From: voorhs Date: Wed, 4 Dec 2024 14:37:58 +0300 Subject: [PATCH 2/2] try notebook execution --- docs/source/conf.py | 2 +- pyproject.toml | 1 + tutorials/modules/scoring/linear.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 80f4668ca..edfb3c9ad 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -69,7 +69,7 @@ html_theme = "pydata_sphinx_theme" html_static_path = ["_static"] -nbsphinx_execute = "never" +nbsphinx_execute = "always" todo_include_todos = True diff --git a/pyproject.toml b/pyproject.toml index 83d5c35a2..1f8426a2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,6 +93,7 @@ nbsphinx = "^0.9.5" sphinx-autodoc-typehints = "^2.5.0" sphinx-copybutton = "^0.5.2" sphinx-autoapi = "^3.3.3" +ipykernel = "^6.29.5" [tool.poetry.scripts] "autointent" = "autointent.pipeline.optimization._cli_endpoint:main" diff --git a/tutorials/modules/scoring/linear.py b/tutorials/modules/scoring/linear.py index 1722306bf..515c8c59b 100644 --- a/tutorials/modules/scoring/linear.py +++ b/tutorials/modules/scoring/linear.py @@ -44,7 +44,7 @@ # %% -scorer.fit(data_handler.train_utterances, data_handler.train_labels) +scorer.fit(data_handler.train_utterances(0), data_handler.train_labels(0)) # %% [markdown] """