From 68583b567e962f57ae913bf56b030463c09a6fd4 Mon Sep 17 00:00:00 2001 From: Dario Coscia Date: Mon, 17 Mar 2025 13:09:20 +0100 Subject: [PATCH] adding layout.html template --- docs/source/_contributing.rst | 14 +++++------ docs/source/_templates/layout.html | 17 ++++++++++++++ docs/source/conf.py | 37 +++++++----------------------- 3 files changed, 32 insertions(+), 36 deletions(-) create mode 100644 docs/source/_templates/layout.html diff --git a/docs/source/_contributing.rst b/docs/source/_contributing.rst index af2e023..dbc0691 100644 --- a/docs/source/_contributing.rst +++ b/docs/source/_contributing.rst @@ -4,7 +4,7 @@ Contributing to PINA First off, thanks for taking the time to contribute to **PINA**! 🎉 Your help makes the project better for everyone. This document outlines the process for contributing, reporting issues, suggesting features, and submitting pull requests. Table of Contents -================= +------------------------ 1. `How to Contribute`_ 2. `Reporting Bugs`_ @@ -14,7 +14,7 @@ Table of Contents 6. `Community Standards`_ How to Contribute -================= +------------------------ You can contribute in several ways: @@ -26,7 +26,7 @@ You can contribute in several ways: We encourage all contributions, big or small! Reporting Bugs -============== +------------------------ If you find a bug, please open an `issue `_ and include: @@ -38,7 +38,7 @@ If you find a bug, please open an `issue +
+
+

+ {% trans copyright=copyright|e %}© Copyright {{ copyright }}, PINA Developers.{% endtrans %}
+ Created using Sphinx and the PyData Theme.
+

+
+
+ + +{%- endblock %} \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index ca0fe42..5ccb273 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,21 +14,19 @@ import sys import os -import sphinx_rtd_theme +import time import importlib.metadata # -- Project information ----------------------------------------------------- _DISTRIBUTION_METADATA = importlib.metadata.metadata("pina-mathlab") project = _DISTRIBUTION_METADATA["Name"] -copyright = _DISTRIBUTION_METADATA["License-File"] +copyright = f'2021-{time.strftime("%Y")}' author = "PINA Contributors" version = _DISTRIBUTION_METADATA["Version"] -sys.path.insert( - 0, os.path.abspath("../sphinx_extensions") -) +sys.path.insert(0, os.path.abspath("../sphinx_extensions")) # -- General configuration ------------------------------------------------ @@ -54,7 +52,7 @@ extensions = [ exclude_patterns = ["build", "docstrings", "nextgen", "Thumbs.db", ".DS_Store"] # The reST default role (used for this markup: `text`) to use for all documents. -# default_role = 'literal' +default_role = "literal" # Generate the API documentation when building autosummary_generate = True @@ -71,21 +69,6 @@ intersphinx_mapping = { ), } -# nitpicky = True -# nitpick_ignore = [ -# ("py:meth", "lightning.pytorch.core.module.LightningModule.log"), -# ("py:meth", "lightning.pytorch.core.module.LightningModule.log_dict"), -# ("py:exc", "MisconfigurationException"), -# ("py:func", "torch.inference_mode"), -# ("py:func", "torch.no_grad"), -# ("py:class", "torch.utils.data.DistributedSampler"), -# ("py:class", "pina.model.layers.convolution.BaseContinuousConv"), -# ("py:class", "Module"), -# ("py:class", "torch.nn.modules.loss._Loss"), # TO FIX -# ("py:class", "torch.optim.LRScheduler"), # TO FIX -# ] - - # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -148,13 +131,6 @@ html_theme = "pydata_sphinx_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -# html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. html_logo = "index_files/PINA_logo.png" html_theme_options = { "icon_links": [ @@ -183,6 +159,10 @@ html_theme_options = { "header_links_before_dropdown": 8, } +html_context = { + "default_mode": "light", +} + # If not ''i, a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. html_last_updated_fmt = "%b %d, %Y" @@ -256,7 +236,6 @@ texinfo_documents = [ "PINA Documentation", author, "pina", - "One line description of project.", "Miscellaneous", ), ]