From 665bc78d8e1faa95d621ca28a320a45649d5715f Mon Sep 17 00:00:00 2001 From: David Hendriks <davidhendriks93@gmail.com> Date: Thu, 9 Apr 2020 16:00:31 +0100 Subject: [PATCH] updated docs --- README.md | 2 +- .../utils/custom_logging_functions.py | 1 + docs/source/conf.py | 18 ++++++++++++++++++ docs/source/grid.rst | 7 +++++++ docs/source/modules.rst | 3 ++- 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 docs/source/grid.rst diff --git a/README.md b/README.md index ccb681b36..32c20733d 100644 --- a/README.md +++ b/README.md @@ -51,4 +51,4 @@ Also: I figured that having binaryc output the log like "<LOG HEADER> t=10e4 ... See examples/ dir for some working examples -When you try to `import binary_c_python_api` and python complains about it not existing, but you are sure that you correctly included the necessary pythonpaths, then you probably need to rebuild the package: \ No newline at end of file +When you try to `import binary_c_python_api` and python complains about it not existing, but you are sure that you correctly included the necessary pythonpaths, then you probably need to rebuild the package. diff --git a/binarycpython/utils/custom_logging_functions.py b/binarycpython/utils/custom_logging_functions.py index c937f9d73..219e8705b 100644 --- a/binarycpython/utils/custom_logging_functions.py +++ b/binarycpython/utils/custom_logging_functions.py @@ -28,6 +28,7 @@ def autogen_C_logging_code(logging_dict, verbose=0): 'model.dt' ] } + """ # Check if the input is of the correct form diff --git a/docs/source/conf.py b/docs/source/conf.py index 196d65068..c89930630 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -13,6 +13,8 @@ import os import sys +# https://www.sphinx-doc.org/en/1.5/ext/example_google.html + # Include paths for python code sys.path.insert(0, os.path.abspath(".")) sys.path.insert(0, os.path.abspath("../../binarycpython")) @@ -41,10 +43,26 @@ extensions = [ 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', + 'sphinx.ext.napoleon', "hawkmoth", "m2r", ] + +# Napoleon settings +napoleon_google_docstring = True +napoleon_numpy_docstring = False +napoleon_include_init_with_doc = False +napoleon_include_private_with_doc = False +napoleon_include_special_with_doc = True +napoleon_use_admonition_for_examples = False +napoleon_use_admonition_for_notes = False +napoleon_use_admonition_for_references = False +napoleon_use_ivar = False +napoleon_use_param = True +napoleon_use_rtype = True + + source_suffix = [".rst", ".md"] # Add any paths that contain templates here, relative to this directory. diff --git a/docs/source/grid.rst b/docs/source/grid.rst new file mode 100644 index 000000000..ea842b975 --- /dev/null +++ b/docs/source/grid.rst @@ -0,0 +1,7 @@ +grid\_class module +================================= + +.. automodule:: grid + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/modules.rst b/docs/source/modules.rst index cc9bb7deb..acd2830a5 100644 --- a/docs/source/modules.rst +++ b/docs/source/modules.rst @@ -6,4 +6,5 @@ binaryc_python_utils custom_logging_functions functions -.. stellar_types + grid + stellar_types -- GitLab