From 0aadaf7f56036550a778b575f5cdaaa6a8e2f559 Mon Sep 17 00:00:00 2001
From: hakon-molven-4ss <70759227+hakon-molven-4ss@users.noreply.github.com>
Date: Thu, 23 Oct 2025 11:24:54 +0200
Subject: [PATCH 1/6] Update docs files
---
docs/_static/4insight-logo.svg | 12 ++
docs/_static/css/custom.css | 259 +++++++++++++++++++++++++++++++
docs/_static/empty | 0
docs/_static/favicon.png | Bin 0 -> 822 bytes
docs/_templates/breadcrumbs.html | 19 +++
docs/_templates/layout.html | 7 +
docs/conf.py | 73 ++++++++-
7 files changed, 369 insertions(+), 1 deletion(-)
create mode 100644 docs/_static/4insight-logo.svg
create mode 100644 docs/_static/css/custom.css
delete mode 100644 docs/_static/empty
create mode 100644 docs/_static/favicon.png
create mode 100644 docs/_templates/breadcrumbs.html
create mode 100644 docs/_templates/layout.html
diff --git a/docs/_static/4insight-logo.svg b/docs/_static/4insight-logo.svg
new file mode 100644
index 00000000..133c372e
--- /dev/null
+++ b/docs/_static/4insight-logo.svg
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css
new file mode 100644
index 00000000..2f285916
--- /dev/null
+++ b/docs/_static/css/custom.css
@@ -0,0 +1,259 @@
+@import "../basic.css";
+
+:root {
+ /*****************************************************************************
+ * Theme config
+ **/
+ --pst-header-height: 44px;
+
+ /*****************************************************************************
+ * Font size
+ **/
+ --pst-font-size-base: 18px; /* base font size - applied at body / html level */
+ --pst-font-size-nav: 15px; /* navbar font size */
+ --pst-font-size-breadcrumb: 16px; /* breadcrumb font size */
+ --pst-font-size-logo: 16px; /* breadcrumb font size */
+
+ /*****************************************************************************
+ * Font family
+ **/
+ /* These are adapted from https://systemfontstack.com/ */
+ --pst-font-family-sansserif-system: "Trebuchet MS", -apple-system,
+ BlinkMacSystemFont, avenir next, avenir, "segoe ui", "helvetica neue",
+ helvetica, Ubuntu, roboto, noto, arial, sans-serif;
+
+ --pst-font-family-serif-system: "Georgia", "Iowan Old Style", "Apple Garamond",
+ Baskerville, "Times New Roman", "Droid Serif", Times, "Source Serif Pro",
+ serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
+
+ --pst-font-family-monospace-system: SFMono-Regular, Menlo, Consolas, Monaco,
+ Liberation Mono, "Lucida Console", monospace;
+
+ --pst-font-family-base: var(--pst-font-family-sansserif-system);
+ --pst-font-family-heading: var(--pst-font-family-sansserif-system);
+ --pst-font-family-monospace: var(--pst-font-family-monospace-system);
+
+ /*****************************************************************************
+ * Color
+ **/
+ --pst-color-on-background: #333333 !important; /*navbar bg-colour*/
+ --pst-color-background: #ece9e5 !important;
+
+ --pst-color-primary: #00a0af !important; /* headers */
+ --pst-color-text-base: #49494a !important;
+ --pst-color-info: #009ddc !important;
+ --pst-color-success: 0, 168, 143;
+ --pst-color-warning: 250, 166, 52;
+ --pst-color-danger: 237, 23, 79;
+
+ --pst-color-h1: var(--pst-color-primary) !important;
+ --pst-color-h2: var(--pst-color-primary) !important;
+ --pst-color-h3: #49494a !important;
+ --pst-color-h4: var(--pst-color-primary) !important;
+ --pst-color-h5: var(--pst-color-text-base);
+ --pst-color-h6: var(--pst-color-text-base);
+ --pst-color-paragraph: var(--pst-color-text-base);
+ --pst-color-link: #00a0af !important; /*links*/
+ --pst-color-headerlink: #002d56 !important;
+ --pst-color-headerlink-hover: #0032fa !important;
+ --pst-color-inline-code: #ed174f !important;
+
+ --pst-color-text-muted: #77757a !important ; /* Inactive sidebar links*/
+
+ --pst-color-active-navigation: red !important; /*#00A0Af !important;*/
+ --pst-color-navbar-link: #ece9e5 !important;
+
+ /*****************************************************************************
+ * Admonitions
+ **/
+ --pst-color-admonition-default: var(--pst-color-info) !important;
+ --pst-color-admonition-note: var(--pst-color-info) !important;
+
+ --pst-color-secondary: #00a0af !important;
+}
+
+/*****************************************************************************
+* 4Subsea tweaks
+**/
+h1,
+h2 {
+ color: var(--pst-color-h1);
+}
+
+h1 {
+ font-size: 32px;
+}
+h2 {
+ font-size: 22px;
+}
+
+h3 {
+ font-size: 18px;
+ font-weight: 700;
+}
+
+/*****************************************************************************
+* Admonitions
+**/
+
+.admonition,
+div.admonition {
+ background-color: transparent;
+}
+
+.table tbody tr:nth-child(odd) {
+ background-color: transparent;
+}
+
+.table tbody tr:nth-child(even) {
+ background-color: transparent;
+}
+
+/*****************************************************************************
+* Header adjustments
+**/
+
+/* Let the inner header take full width */
+.bd-header__inner {
+ max-width: 100%;
+}
+
+/* Distribute navigation items, see https://css-tricks.com/snippets/css/a-guide-to-flexbox/#aa-justify-content */
+.bd-header {
+ justify-content: space-between;
+}
+
+/*****************************************************************************
+* Logo and title
+**/
+
+/* Offset the logo to mimic the docs.4insight.io behaviour */
+.navbar-brand {
+ margin-left: 73px;
+ margin-top: 5px;
+}
+
+/* Fix logo image height*/
+.navbar-brand img {
+ height: 22px;
+}
+
+.navbar-brand img:hover {
+ height: 32px;
+ border-top: transparent;
+ border-top-style: solid;
+ border-top-width: 2px;
+ padding-top: 3px;
+ border-bottom: var(--pst-color-primary);
+ border-bottom-style: solid;
+ border-bottom-width: 2px;
+ padding-bottom: 3px;
+}
+
+/* Style the title next to logo */
+.navbar-brand p {
+ color: var(--pst-color-navbar-link);
+}
+
+/* Turn of underline on hover */
+.navbar-brand:hover {
+ text-decoration: none;
+}
+
+.logo__title {
+ font-size: var(--pst-font-size-logo);
+ padding-left: 4px;
+}
+
+/*****************************************************************************
+* Navbar links
+**/
+
+/* General text color */
+.navbar-nav .nav-link {
+ color: var(--pst-color-navbar-link) !important;
+}
+
+/* Style the underline on hover */
+.navbar-nav .nav-link:hover::after,
+.navbar-nav .nav-link:focus::after {
+ text-decoration: underline;
+ text-decoration-thickness: 2px;
+ text-underline-offset: 3px;
+ text-decoration-color: var(--pst-color-link);
+}
+
+/* For active/current page */
+.navbar-nav .nav-link.active::after {
+ color: var(--pst-color-navbar-link);
+ text-decoration: none; /* Remove underline for active link */
+}
+
+/* Set color for dropdown button */
+.bd-header ul.navbar-nav > li.nav-item.dropdown > .dropdown-toggle,
+.bd-header ul.navbar-nav > li.nav-item.dropdown > .dropdown-toggle:hover {
+ color: var(--pst-color-navbar-link);
+ font-size: var(--pst-font-size-nav);
+}
+
+/* Font size for navbar items */
+.bd-header .navbar-nav li {
+ font-size: var(--pst-font-size-nav);
+}
+
+/* Set background color on hover for dropdown items */
+.bd-header ul.navbar-nav li a.nav-link.dropdown-item:hover {
+ background-color: transparent;
+ text-decoration: underline;
+ text-decoration-thickness: 2px;
+ text-underline-offset: 3px;
+ text-decoration-color: var(--pst-color-link);
+}
+
+/* Color of navbar icons */
+html .pst-navbar-icon {
+ color: var(--pst-color-navbar-link);
+}
+
+/*****************************************************************************
+* Breadcrumb
+**/
+
+/* Styling for breadcrumb container */
+.breadcrumb {
+ height: var(--pst-header-height);
+ background-color: white;
+ font-size: var(--pst-font-size-breadcrumb);
+ padding-left: 16px;
+ padding-top: 10px;
+}
+
+/* Breadcrumb list styling */
+ul.breadcrumb {
+ list-style: none;
+}
+
+/* Remove default link styling */
+ul.breadcrumb li a {
+ text-decoration: none;
+}
+
+/* Add underline effect on hover */
+ul.breadcrumb li a:hover {
+ color: var(--pst-color-link);
+ text-decoration: underline;
+ text-decoration-thickness: 1px;
+ text-underline-offset: 2px;
+}
+
+/* Add '/' between breadcrumb items */
+ul.breadcrumb li + li:before {
+ padding: 5px;
+ color: var(--pst-color-text-base);
+ content: "/\00a0";
+}
+
+/* Keep the link color even if visited */
+ul.breadcrumb li a:visited {
+ color: var(--pst-color-link);
+}
diff --git a/docs/_static/empty b/docs/_static/empty
deleted file mode 100644
index e69de29b..00000000
diff --git a/docs/_static/favicon.png b/docs/_static/favicon.png
new file mode 100644
index 0000000000000000000000000000000000000000..899a801aabe504d2bfbf1eeb8d2ef25b466d56af
GIT binary patch
literal 822
zcmV-61Ihe}P)-eNZ0Vb6JiA+3NUYbS{&-Dp?vm_a*lCqbOylZ*1Z~?579mV~jMx!{Y>sJDo
z;|16h5UHNeFQ+F5kk+J`h08!GP#y_jEKz>E078n~L21<@t06~(s+^J?#p6?ksSJHU
z32+ne#|tv8r81J7Y!$HtI1p-xtbywKwHTL6uHAf@nxF2jmgzLtdj*fvWsViDATN6{
zQuGRYAv=nFU&$(bMVoiD3}^-R+XEO7?ZBm206varL{2{=zoz?gjH2W5vFplQlz--=z%A>g8I_EF6)q&=E3*1O;eMk_VdC!g&Ky#IFq
zm-7d3+bYCs577GW0EVi}96n9wo3JWD{1~t1gaDd=-e``V@d?b@-lW>_xT9`i>;Nuj
z5V#X+`W@7HI2hpWfNiU2Hgm*s3`2Dq_=RzCEgKH#6ucR+`+9&zGe>+cBA4?gE@uU>
z8aPZ)k6Kt^(tu}X&V*h>Y&?{SBn{d`HREybFmopMCbVAqexMB4YZVl44a6cZa2}||
z8N*#vkCoC6y0xGkH)Yy&(3DuE|>+;I>71H{<#z1A~$6#xJL07*qoM6N<$f{`$0
At^fc4
literal 0
HcmV?d00001
diff --git a/docs/_templates/breadcrumbs.html b/docs/_templates/breadcrumbs.html
new file mode 100644
index 00000000..f5f5173a
--- /dev/null
+++ b/docs/_templates/breadcrumbs.html
@@ -0,0 +1,19 @@
+
+ {# Home link #}
+ - Home
+
+ {# SDKs link #}
+ - SDKs
+
+ {# Project ("home") link #}
+ - {{project}}
+
+ {# Loop through parents #}
+ {% for parent in parents %}
+ - {{ parent.title }}
+ {% endfor %}
+
+ {# Current page #}
+ - {{ title }}
+
+
\ No newline at end of file
diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html
new file mode 100644
index 00000000..8311430d
--- /dev/null
+++ b/docs/_templates/layout.html
@@ -0,0 +1,7 @@
+{% extends "!layout.html" %}
+
+{%- block docs_navbar %}
+{{ super() }}
+{# Insert breadcrumbs right after the navbar #}
+{% include "breadcrumbs.html" %}
+{%- endblock %}
\ No newline at end of file
diff --git a/docs/conf.py b/docs/conf.py
index dbbf3b99..d9a3b4f1 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -3,9 +3,15 @@
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
+import inspect # Used in linkcode_resolve
+import os
+import sys
from datetime import date
from importlib import metadata
+sys.path.insert(0, os.path.abspath("../"))
+sys.path.insert(0, os.path.abspath("../src/"))
+
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
@@ -14,6 +20,7 @@
author = "4Subsea"
release = metadata.version("smsfusion")
github_repo = "https://github.com/4Subsea/smsfusion-python/"
+pypi_url = "https://pypi.org/project/smsfusion/"
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
@@ -44,5 +51,69 @@
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
-html_theme = "alabaster"
+html_theme = "pydata_sphinx_theme"
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
+html_css_files = ["css/custom.css"]
+
+# Logo and favicon
+html_favicon = "_static/favicon.png"
+html_logo = "_static/4insight-logo.svg"
+
+html_theme_options = {
+ "logo": {"link": "http://docs.4insight.io", "text": "DOCUMENTATION"},
+ "icon_links": [
+ {
+ "name": "GitHub",
+ "url": github_repo,
+ "icon": "fab fa-github",
+ },
+ {
+ "name": "PyPI",
+ "url": pypi_url,
+ "icon": "fas fa-box",
+ },
+ ],
+ "navbar_end": [
+ "search-button", # Includes the search icon
+ "navbar-icon-links", # Disables the light/dark mode toggle
+ ],
+ "navbar_persistent": [], # Removes the search field
+ "secondary_sidebar_items": [
+ "page-toc", # Only show "On this page", hides the "Show sources" link
+ ],
+ "article_header_start": [], # Hides default breadcrumb
+}
+
+html_context = {
+ "default_mode": "light", # Sets the default theme to light
+}
+
+
+def linkcode_resolve(domain, info):
+
+ if domain != "py":
+ return None
+ if not info["module"]:
+ return None
+
+ obj = sys.modules[info["module"]]
+
+ for part in info["fullname"].split("."):
+ obj = getattr(obj, part)
+
+ obj = inspect.unwrap(obj)
+
+ # Inspect cannot find source file for properties
+ if isinstance(obj, property):
+ return None
+
+ path = os.path.relpath(inspect.getfile(obj))
+ src, lineno = inspect.getsourcelines(obj)
+
+ path = f"{github_repo}blob/main/{path}#L{lineno}-L{lineno + len(src) - 1}"
+
+ return path
From ec52a9c69964e2b78cda2c1dea7d6344bfcac04c Mon Sep 17 00:00:00 2001
From: hakon-molven-4ss <70759227+hakon-molven-4ss@users.noreply.github.com>
Date: Thu, 23 Oct 2025 11:25:13 +0200
Subject: [PATCH 2/6] Add docs dependency
---
pyproject.toml | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyproject.toml b/pyproject.toml
index 9203be61..30d3c9f3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -61,6 +61,7 @@ complete = [
dependencies = [
"sphinx",
"myst-parser",
+ "pydata-sphinx-theme",
]
[tool.hatch.envs.docs.scripts]
From c945e844206ed20b37db55ae7eb72e71d59b26b8 Mon Sep 17 00:00:00 2001
From: hakon-molven-4ss <70759227+hakon-molven-4ss@users.noreply.github.com>
Date: Thu, 23 Oct 2025 11:25:42 +0200
Subject: [PATCH 3/6] Update Python versions in Installation page
---
docs/user_guide/installation.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/user_guide/installation.rst b/docs/user_guide/installation.rst
index 92f796bd..af453bc9 100644
--- a/docs/user_guide/installation.rst
+++ b/docs/user_guide/installation.rst
@@ -8,7 +8,7 @@ Head over to `Python.org`_ for instructions.
Python version support
----------------------
-Officially Python 3.10, 3.11 and 3.12. We aim to support the three most recent major
+Officially Python 3.11, 3.12 and 3.13. We aim to support the three most recent major
versions.
OS support
From c5eeb41ad64c35f06f7e738b64174c8b22934fdb Mon Sep 17 00:00:00 2001
From: hakon-molven-4ss <70759227+hakon-molven-4ss@users.noreply.github.com>
Date: Thu, 23 Oct 2025 13:28:57 +0200
Subject: [PATCH 4/6] Have "4insight DOCUMENTATION" take automatic width
---
docs/_static/css/custom.css | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css
index 2f285916..60367a06 100644
--- a/docs/_static/css/custom.css
+++ b/docs/_static/css/custom.css
@@ -165,6 +165,11 @@ div.admonition {
padding-left: 4px;
}
+/* Make 4insight DOCUMENTATION take automatic width */
+.bd-header .navbar-header-items__start {
+ width: auto;
+}
+
/*****************************************************************************
* Navbar links
**/
From 0a1d662791f6ed47e21aba88f1e03250165598e1 Mon Sep 17 00:00:00 2001
From: hakon-molven-4ss <70759227+hakon-molven-4ss@users.noreply.github.com>
Date: Thu, 23 Oct 2025 13:29:19 +0200
Subject: [PATCH 5/6] Keep link color for visited links
---
docs/_static/css/custom.css | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css
index 60367a06..1c1f3247 100644
--- a/docs/_static/css/custom.css
+++ b/docs/_static/css/custom.css
@@ -92,6 +92,11 @@ h3 {
font-weight: 700;
}
+/* Keep link color for visited links */
+a:visited {
+ color: var(--pst-color-link);
+}
+
/*****************************************************************************
* Admonitions
**/
From 9860bd09d01b99e7b35ad576114c0348390692b3 Mon Sep 17 00:00:00 2001
From: hakon-molven-4ss <70759227+hakon-molven-4ss@users.noreply.github.com>
Date: Thu, 23 Oct 2025 13:45:44 +0200
Subject: [PATCH 6/6] Add margin after DOCUMENTATION
---
docs/_static/css/custom.css | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css
index 1c1f3247..b33b570d 100644
--- a/docs/_static/css/custom.css
+++ b/docs/_static/css/custom.css
@@ -136,6 +136,7 @@ div.admonition {
.navbar-brand {
margin-left: 73px;
margin-top: 5px;
+ margin-right: 40px; /* Add some margin before coming elements*/
}
/* Fix logo image height*/