From 523f9c2225b04825522230ac71bdbe62be6bf7ba Mon Sep 17 00:00:00 2001 From: troyyyyy Date: Sun, 17 Dec 2023 13:32:36 +0800 Subject: [PATCH] [DOC] reformat API --- docs/API/abl.bridge.rst | 19 +++----------- docs/API/abl.dataset.rst | 18 +++---------- docs/API/abl.evaluation.rst | 17 +++---------- docs/API/abl.learning.rst | 16 +++--------- docs/API/abl.reasoning.rst | 27 +++----------------- docs/API/abl.structures.rst | 16 +++--------- docs/API/abl.utils.rst | 42 ++++--------------------------- docs/_static/custom.css | 25 ------------------ docs/_templates/classtemplate.rst | 10 -------- 9 files changed, 29 insertions(+), 161 deletions(-) delete mode 100644 docs/_templates/classtemplate.rst diff --git a/docs/API/abl.bridge.rst b/docs/API/abl.bridge.rst index 3c5f58e..c967941 100644 --- a/docs/API/abl.bridge.rst +++ b/docs/API/abl.bridge.rst @@ -1,18 +1,7 @@ -.. role:: hidden - :class: hidden-section - abl.bridge ================== -.. currentmodule:: abl.bridge - -Bridge -------- - -.. autosummary:: - :toctree: generated - :nosignatures: - :template: classtemplate.rst - - BaseBridge - SimpleBridge +.. automodule:: abl.bridge + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/API/abl.dataset.rst b/docs/API/abl.dataset.rst index 33d0085..17e10e5 100644 --- a/docs/API/abl.dataset.rst +++ b/docs/API/abl.dataset.rst @@ -1,17 +1,7 @@ abl.dataset ================== -.. currentmodule:: abl.dataset - -Dataset -------- - -.. autosummary:: - :toctree: generated - :nosignatures: - :template: classtemplate.rst - - BridgeDataset - ClassificationDataset - PredictionDataset - RegressionDataset +.. automodule:: abl.dataset + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/API/abl.evaluation.rst b/docs/API/abl.evaluation.rst index 181ec9e..b07808c 100644 --- a/docs/API/abl.evaluation.rst +++ b/docs/API/abl.evaluation.rst @@ -1,16 +1,7 @@ abl.evaluation ================== -.. currentmodule:: abl.evaluation - -Metrics -------- - -.. autosummary:: - :toctree: generated - :nosignatures: - :template: classtemplate.rst - - BaseMetric - SymbolMetric - ReasoningMetric +.. automodule:: abl.evaluation + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/API/abl.learning.rst b/docs/API/abl.learning.rst index 6cb32c6..f2c0f0c 100644 --- a/docs/API/abl.learning.rst +++ b/docs/API/abl.learning.rst @@ -1,15 +1,7 @@ abl.learning ================== -.. currentmodule:: abl.learning - -Learning --------- - -.. autosummary:: - :toctree: generated - :nosignatures: - :template: classtemplate.rst - - ABLModel - BasicNN +.. automodule:: abl.learning + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/API/abl.reasoning.rst b/docs/API/abl.reasoning.rst index 03e2ea3..fefa64a 100644 --- a/docs/API/abl.reasoning.rst +++ b/docs/API/abl.reasoning.rst @@ -1,26 +1,7 @@ abl.reasoning ================== -.. currentmodule:: abl.reasoning - -Knowledge Base --------------- - -.. autosummary:: - :toctree: generated - :nosignatures: - :template: classtemplate.rst - - KBBase - GroundKB - PrologKB - -Reasoner ---------- - -.. autosummary:: - :toctree: generated - :nosignatures: - :template: classtemplate.rst - - Reasoner \ No newline at end of file +.. automodule:: abl.reasoning + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/API/abl.structures.rst b/docs/API/abl.structures.rst index f147e0f..26f3973 100644 --- a/docs/API/abl.structures.rst +++ b/docs/API/abl.structures.rst @@ -1,15 +1,7 @@ abl.structures ================== -.. currentmodule:: abl.structures - -Data Structures ----------------- - -.. autosummary:: - :toctree: generated - :nosignatures: - :template: classtemplate.rst - - BaseDataElement - ListData +.. automodule:: abl.structures + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/API/abl.utils.rst b/docs/API/abl.utils.rst index 7c4a76f..0975dae 100644 --- a/docs/API/abl.utils.rst +++ b/docs/API/abl.utils.rst @@ -1,39 +1,7 @@ abl.utils -=========== +================== -.. currentmodule:: abl.utils - -Logger -------- - -.. autosummary:: - :toctree: generated - :nosignatures: - :template: classtemplate.rst - - ABLLogger - -Cache ------- - -.. autosummary:: - :toctree: generated - :nosignatures: - :template: classtemplate.rst - - Cache - abl_cache - -Utils ------- - -.. autosummary:: - :toctree: generated - :nosignatures: - :template: classtemplate.rst - - confidence_dist - flatten - hamming_dist - reform_list - to_hashable +.. automodule:: abl.utils + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/_static/custom.css b/docs/_static/custom.css index 61b0644..548c6ab 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -1,28 +1,3 @@ div.code-out > div.highlight > pre { background-color: #d3effd !important; } - -.autosummary.longtable.docutils.align-default { - width: 100%; -} - -.autosummary.longtable.docutils.align-default td { - word-wrap: break-word; - white-space: normal; -} - -.row-odd td:first-child .pre { - font-size: 110%; - color: #4682B4; -} - -.row-even td:first-child .pre { - font-size: 110%; - color: #4682B4; -} - -.autosummary.longtable.docutils.align-default td:first-child { - width: 30%; - text-align: left; -} - diff --git a/docs/_templates/classtemplate.rst b/docs/_templates/classtemplate.rst deleted file mode 100644 index a6dd4c8..0000000 --- a/docs/_templates/classtemplate.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. role:: hidden - :class: hidden-section - -.. currentmodule:: {{ module }} - -{{ name | underline }} - -.. autoclass:: {{ name }} - :members: - :show-inheritance: