From 9f5f49eafab10e3256ebc3c5283ebf8ddd65d0a4 Mon Sep 17 00:00:00 2001 From: muelleram Date: Fri, 13 Sep 2024 17:20:38 +0200 Subject: [PATCH] add funding page --- FUNDING.md | 2 + docs/conf.py | 142 ++++++++++++++------------------ docs/content/funding.md | 3 + docs/index.md | 1 + notebooks/getting_started.ipynb | 6 +- 5 files changed, 70 insertions(+), 84 deletions(-) create mode 100644 FUNDING.md create mode 100644 docs/content/funding.md diff --git a/FUNDING.md b/FUNDING.md new file mode 100644 index 0000000..8c7ca4b --- /dev/null +++ b/FUNDING.md @@ -0,0 +1,2 @@ +# Funding +tbd \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index ab8226f..6076b91 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,80 +6,80 @@ ### Project Information ########################################################################### ################################################################################################### -project = 'bw_timex' -author = 'Timo Diepers, Amelie Müller, Arthur Jakobs' -copyright = datetime.date.today().strftime("%Y") + ' bw_timex developers' -version: str = 'latest' # required by the version switcher +project = "bw_timex" +author = "Timo Diepers, Amelie Müller, Arthur Jakobs" +copyright = datetime.date.today().strftime("%Y") + " bw_timex developers" +version: str = "latest" # required by the version switcher ################################################################################################### ### Project Configuration ######################################################################### ################################################################################################### -needs_sphinx = '7.3.0' +needs_sphinx = "7.3.0" extensions = [ # core extensions - 'sphinx.ext.mathjax', - 'sphinx.ext.viewcode', - 'sphinx.ext.intersphinx', - 'sphinx.ext.extlinks', - 'sphinx.ext.inheritance_diagram', - 'sphinx.ext.autosummary', - 'sphinx.ext.napoleon', + "sphinx.ext.mathjax", + "sphinx.ext.viewcode", + "sphinx.ext.intersphinx", + "sphinx.ext.extlinks", + "sphinx.ext.inheritance_diagram", + "sphinx.ext.autosummary", + "sphinx.ext.napoleon", # iPython extensions - 'IPython.sphinxext.ipython_directive', - 'IPython.sphinxext.ipython_console_highlighting', + "IPython.sphinxext.ipython_directive", + "IPython.sphinxext.ipython_console_highlighting", # Markdown support # 'myst_parser', # do not enable separately if using myst_nb, compare: https://github.com/executablebooks/MyST-NB/issues/421#issuecomment-1164427544 # Jupyter Notebook support - 'myst_nb', + "myst_nb", # mermaid support - 'sphinxcontrib.mermaid', + "sphinxcontrib.mermaid", # API documentation support - 'autoapi', + "autoapi", # responsive web component support - 'sphinx_design', + "sphinx_design", # custom 404 page - 'notfound.extension', + "notfound.extension", # custom favicons - 'sphinx_favicon', + "sphinx_favicon", # copy button on code blocks "sphinx_copybutton", ] -autoapi_dirs = ['../bw_timex'] -autoapi_type = 'python' +autoapi_dirs = ["../bw_timex"] +autoapi_type = "python" autoapi_ignore = [ - '*/data/*', - '*tests/*', - '*tests.py', - '*validation.py', - '*version.py', - '*.rst', - '*.yml', - '*.md', - '*.json', - '*.data' + "*/data/*", + "*tests/*", + "*tests.py", + "*validation.py", + "*version.py", + "*.rst", + "*.yml", + "*.md", + "*.json", + "*.data", ] autoapi_options = [ - 'members', - 'undoc-members', - 'private-members', - 'show-inheritance', - 'show-module-summary', + "members", + "undoc-members", + "private-members", + "show-inheritance", + "show-module-summary", #'special-members', #'imported-members', - 'show-inheritance-diagram' + "show-inheritance-diagram", ] -autoapi_python_class_content = 'both' -autoapi_member_order = 'bysource' -autoapi_root = 'content/api' -autoapi_template_dir = '_templates/autoapi_templates/' +autoapi_python_class_content = "both" +autoapi_member_order = "bysource" +autoapi_root = "content/api" +autoapi_template_dir = "_templates/autoapi_templates/" autoapi_keep_files = False -graphviz_output_format = 'svg' # https://pydata-sphinx-theme.readthedocs.io/en/stable/examples/graphviz.html#inheritance-diagram +graphviz_output_format = "svg" # https://pydata-sphinx-theme.readthedocs.io/en/stable/examples/graphviz.html#inheritance-diagram # Inject custom JavaScript to handle theme switching mermaid_init_js = """ @@ -132,14 +132,14 @@ master_doc = "index" -root_doc = 'index' -html_static_path = ['_static'] -templates_path = ['_templates'] -exclude_patterns = ['_build'] +root_doc = "index" +html_static_path = ["_static"] +templates_path = ["_templates"] +exclude_patterns = ["_build"] html_theme = "pydata_sphinx_theme" suppress_warnings = [ - "myst.header" # suppress warnings of the kind "WARNING: Non-consecutive header level increase; H1 to H3" + "myst.header" # suppress warnings of the kind "WARNING: Non-consecutive header level increase; H1 to H3" ] @@ -152,7 +152,7 @@ html_css_files = [ "custom.css", - "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" # for https://fontawesome.com/ icons + "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css", # for https://fontawesome.com/ icons ] html_sidebars = { @@ -166,6 +166,7 @@ "content/codeofconduct": [], "content/license": [], "content/changelog": [], + "content/funding": [], } html_theme_options = { @@ -198,14 +199,14 @@ # "type": "fontawesome", # }, ], - # various settings + # various settings "collapse_navigation": True, # "show_prev_next": False, "use_edit_page_button": True, "navigation_with_keys": True, "logo": { "image_light": "bw_timex_light_rtd.svg", - "image_dark": "bw_timex_dark_rtd.svg" + "image_dark": "bw_timex_dark_rtd.svg", }, } @@ -221,8 +222,8 @@ # https://sphinx-notfound-page.readthedocs.io notfound_context = { - 'title': 'Page Not Found', - 'body': ''' + "title": "Page Not Found", + "body": """

🍂 Page Not Found (404)

Oops! It looks like you've stumbled upon a page that's been recycled into the digital abyss. @@ -230,7 +231,7 @@ Why not take a moment to reduce, reuse, and recycle your clicks by heading back to the main page? And remember, every little bit counts in the grand scheme of things.

- ''', + """, } #################################################################################################### @@ -240,11 +241,7 @@ # myst_parser Configuration ############################################ # https://myst-parser.readthedocs.io/en/latest/configuration.html -source_suffix = { - '.rst': 'restructuredtext', - '.md': 'myst-nb', - '.ipynb': 'myst-nb' -} +source_suffix = {".rst": "restructuredtext", ".md": "myst-nb", ".ipynb": "myst-nb"} myst_enable_extensions = [ @@ -258,31 +255,14 @@ # myst-nb configuration ################################################ # https://myst-nb.readthedocs.io/en/latest/configuration.html -nb_execution_mode = 'off' +nb_execution_mode = "off" # sphinx-favicon configuration ######################################### # https://github.com/tcmetzger/sphinx-favicon favicons = [ - { - "rel": "icon", - "href": "favicon.svg", - "type": "image/svg+xml" - }, - { - "rel": "icon", - "sizes": "144x144", - "href": "favicon-144.png", - "type": "image/png" - }, - { - "rel": "mask-icon", - "href": "favicon_mask-icon.svg", - "color": "#222832" - }, - { - "rel": "apple-touch-icon", - "sizes": "500x500", - "href": "favicon-500.png" - }, + {"rel": "icon", "href": "favicon.svg", "type": "image/svg+xml"}, + {"rel": "icon", "sizes": "144x144", "href": "favicon-144.png", "type": "image/png"}, + {"rel": "mask-icon", "href": "favicon_mask-icon.svg", "color": "#222832"}, + {"rel": "apple-touch-icon", "sizes": "500x500", "href": "favicon-500.png"}, ] diff --git a/docs/content/funding.md b/docs/content/funding.md new file mode 100644 index 0000000..201bb78 --- /dev/null +++ b/docs/content/funding.md @@ -0,0 +1,3 @@ +```{include} ../../FUNDING.md + +``` diff --git a/docs/index.md b/docs/index.md index dbd1320..f00932a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -36,4 +36,5 @@ Contributing Code of Conduct License Changelog +Funding ``` diff --git a/notebooks/getting_started.ipynb b/notebooks/getting_started.ipynb index 492c751..9edd668 100644 --- a/notebooks/getting_started.ipynb +++ b/notebooks/getting_started.ipynb @@ -1049,7 +1049,7 @@ ], "metadata": { "kernelspec": { - "display_name": "timex", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1063,9 +1063,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.14" + "version": "3.12.0" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 }