diff --git a/.requirements/requirements.txt b/.requirements/requirements.txt index d6f0ab3..e00f80c 100644 --- a/.requirements/requirements.txt +++ b/.requirements/requirements.txt @@ -2,5 +2,5 @@ colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" and sys_pl dynaconf==3.2.0 ; python_version >= "3.10" and python_version < "4.0" emoji==2.7.0 ; python_version >= "3.10" and python_version < "4.0" loguru==0.7.0 ; python_version >= "3.10" and python_version < "4.0" -pyparsing==3.1.0 ; python_version >= "3.10" and python_version < "4.0" +pyparsing==3.1.1 ; python_version >= "3.10" and python_version < "4.0" win32-setctime==1.1.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32" diff --git a/docs/01_start.rst b/docs/01_start.rst new file mode 100644 index 0000000..8a26f0e --- /dev/null +++ b/docs/01_start.rst @@ -0,0 +1,23 @@ +=============== +Getting Started +=============== + + +Installation +============ + +:: + + pip install findmyorder + + +Example +======= + +The following example illustrate how to use the module + + +.. rli:: https://raw.githubusercontent.com/mraniki/dxsp/main/dxsp/example.py + :language: python + + \ No newline at end of file diff --git a/docs/02_config.rst b/docs/02_config.rst new file mode 100644 index 0000000..97be75e --- /dev/null +++ b/docs/02_config.rst @@ -0,0 +1,13 @@ + +====== +Config +====== + + +Setting available via settings.toml or .env + + +.. rli:: https://raw.githubusercontent.com/mraniki/findmyorder/main/findmyorder/default_settings.toml + :language: toml + + diff --git a/docs/03_module.rst b/docs/03_module.rst new file mode 100644 index 0000000..1ec9142 --- /dev/null +++ b/docs/03_module.rst @@ -0,0 +1,11 @@ + +====== +Module +====== + +.. autosummary:: + :toctree: _autosummary + :template: custom-module-template.rst + :recursive: + + findmyorder \ No newline at end of file diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 0000000..bbb919f --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,27 @@ +/* +#073BD9 +#05C7F2 +#05F2F2 +#F2DA63 +#F2E6A7 +*/ + + +:root { + --body-bg: #292929; + --body-color: #E2E8E4; + } + + .navbar-inverse, .navbar-collapse, .navbar-brand:hover, .navbar-default, .navbar-inverse .navbar-brand:focus, .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { + background-color: #222222; + } + + a { + color: #ffcc00; + } + a:hover { + color: #ffcc00; ; + } + + + \ No newline at end of file diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico new file mode 100644 index 0000000..ba4a984 Binary files /dev/null and b/docs/_static/favicon.ico differ diff --git a/docs/_static/favicon.png b/docs/_static/favicon.png new file mode 100644 index 0000000..597bfdf Binary files /dev/null and b/docs/_static/favicon.png differ diff --git a/docs/_static/logo-full.png b/docs/_static/logo-full.png new file mode 100644 index 0000000..ee787a8 Binary files /dev/null and b/docs/_static/logo-full.png differ diff --git a/docs/_templates/custom-class-template.rst b/docs/_templates/custom-class-template.rst new file mode 100644 index 0000000..d5fd0a5 --- /dev/null +++ b/docs/_templates/custom-class-template.rst @@ -0,0 +1,34 @@ +{{ fullname | escape | underline}} + +.. currentmodule:: {{ module }} + +.. autoclass:: {{ objname }} + :members: + :undoc-members: + :show-inheritance: + :inherited-members: + + {% block methods %} + {% if methods %} + .. rubric:: {{ _('Methods') }} + + .. autosummary:: + {% for item in methods %} + {%- if not item.startswith('_') %} + ~{{ name }}.{{ item }} + {%- endif -%} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block attributes %} + {% if attributes %} + .. rubric:: {{ _('Attributes') }} + + .. autosummary:: + {% for item in attributes %} + ~{{ name }}.{{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + diff --git a/docs/_templates/custom-module-template.rst b/docs/_templates/custom-module-template.rst new file mode 100644 index 0000000..dd90e32 --- /dev/null +++ b/docs/_templates/custom-module-template.rst @@ -0,0 +1,66 @@ +{{ fullname | escape | underline}} + +.. automodule:: {{ fullname }} + + {% block attributes %} + {% if attributes %} + .. rubric:: Module attributes + + .. autosummary:: + :toctree: + {% for item in attributes %} + {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block functions %} + {% if functions %} + .. rubric:: {{ _('Functions') }} + + .. autosummary:: + :toctree: + :nosignatures: + {% for item in functions %} + {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block classes %} + {% if classes %} + .. rubric:: {{ _('Classes') }} + + .. autosummary:: + :toctree: + :template: custom-class-template.rst + :nosignatures: + {% for item in classes %} + {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block exceptions %} + {% if exceptions %} + .. rubric:: {{ _('Exceptions') }} + + .. autosummary:: + :toctree: + {% for item in exceptions %} + {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + +{% block modules %} +{% if modules %} +.. autosummary:: + :toctree: + :template: custom-module-template.rst + :recursive: +{% for item in modules %} + {{ item }} +{%- endfor %} +{% endif %} +{% endblock %} \ No newline at end of file diff --git a/docs/_templates/navbar.html b/docs/_templates/navbar.html new file mode 100644 index 0000000..cd9fd60 --- /dev/null +++ b/docs/_templates/navbar.html @@ -0,0 +1,105 @@ +
\ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 5f7e8f0..202cf7c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,216 +1,99 @@ # Configuration file for the Sphinx documentation builder. + +import os import sys -from os.path import abspath, dirname -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os import sphinx_bootstrap_theme -path = dirname(abspath(__file__)) -sys.path.append(path) -# For the full list of built-in configuration values, see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html +sys.path.insert(0, os.path.abspath('../')) + # -- Project information ----------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -project = 'findmyorder' +project = 'dxsp' copyright = '2023, mraniki' author = 'mraniki' # -- General configuration --------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [ 'sphinx.ext.autodoc', - 'sphinx.ext.coverage', - 'sphinx.ext.viewcode', + 'sphinx.ext.autosummary', 'sphinx.ext.napoleon', - 'sphinx.ext.intersphinx', - 'sphinx.ext.todo', - 'sphinx_copybutton', - 'myst_parser', + 'sphinx.ext.viewcode', 'sphinxext.remoteliteralinclude', - 'sphinx_togglebutton', - # 'sphinx_inline_tabs', - # 'sphinx_reredirects', - # 'sphinx_design', - 'notfound.extension' - ] -source_suffix = ['.rst', '.md'] -# -- Napoleon Settings ----------------------------------------------------- +# -- Extension configuration --------------------------------------------------- + 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 = False -napoleon_use_admonition_for_examples = False -napoleon_use_admonition_for_notes = False -napoleon_use_admonition_for_references = False -napoleon_use_ivar = True -napoleon_use_param = True -napoleon_use_rtype = True -napoleon_use_keyword = True +autosummary_generate = True +autoclass_content = 'both' +autodoc_inherit_docstrings = True +set_type_checking_flag = True autodoc_member_order = 'bysource' -add_module_names = False +add_module_names = True master_doc = 'index' - -# Add any paths that contain templates here, relative to this directory. +source_suffix = ['.rst', '.md'] templates_path = ["_templates"] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] -# -- Options for HTML output ------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output - # -- Options for HTML output ------------------------------------------------- -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -# html_theme = "nature" html_theme = "bootstrap" -html_theme_path = sphinx_bootstrap_theme.get_html_theme_path() -# (Optional) Logo. Should be small enough to fit the navbar (ideally 24x24). -# Path should be relative to the ``_static`` files directory. -# html_logo = "_static/logo-white.png" -# html_favicon = "_static/favicon.png" - -html_copy_source = False -html_show_sourcelink = False - - -# Redirect URLs -# "