From 57d9e58fe633df42ccc62ab2a4afabd6502a34b7 Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Mon, 8 Jun 2026 15:29:41 +0200 Subject: [PATCH 01/16] feat(docs): add Sphinx configuration and index for API documentation --- .gitignore | 4 +++- docs/conf.py | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ docs/index.rst | 8 +++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 docs/conf.py create mode 100644 docs/index.rst diff --git a/.gitignore b/.gitignore index 3246a258..c11d9513 100644 --- a/.gitignore +++ b/.gitignore @@ -73,7 +73,9 @@ instance/ .scrapy # Sphinx documentation -docs/_build/ +docs/build/ +docs/api/ + # PyBuilder .pybuilder/ diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..3e385ca6 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,63 @@ +import os +import sys + +# Allow autodoc to import the sinch package from the project root +sys.path.insert(0, os.path.abspath("..")) +from sinch import __version__ + +# -- Project information ------------------------------------------------------- + +project = "Sinch Python SDK" +copyright = "2024, Sinch Developer Experience Team" +author = "Sinch Developer Experience Team" +release = __version__ + +# -- General configuration ----------------------------------------------------- + +extensions = [ + # Automatically generates .rst files from Python source (replaces running + # sphinx-apidoc manually — configured via apidoc_modules below) + "sphinx.ext.apidoc", + # Pulls docstrings from Python source into the generated .rst files + "sphinx.ext.autodoc", + # Adds [source] links that open the highlighted source file + "sphinx.ext.viewcode", +] + +# -- sphinx.ext.apidoc --------------------------------------------------------- +# Runs apidoc automatically during the build — no need for a separate command. +# Each entry in the list corresponds to one package to document. + +apidoc_modules = [ + { + # Path to the Python package, relative to this conf.py file + "path": "../sinch", + # Output directory for the generated .rst files, relative to the docs source dir + "destination": "api", + } +] + +# -- sphinx.ext.autodoc -------------------------------------------------------- + +autodoc_default_options = { + # Document all public members (methods, attributes, nested classes) + "members": True, + # Show the class inheritance chain + "show-inheritance": True, + # Preserve the order in which members appear in the source file + "member-order": "bysource", +} + +# Render type hints as part of the parameter/return descriptions, not the signature +autodoc_typehints = "both" + +# -- HTML output --------------------------------------------------------------- + +html_theme = "sphinx_rtd_theme" + +html_theme_options = { + # Maximum depth of the navigation sidebar (-1 = unlimited) + "navigation_depth": -1, + # Keep all navigation entries expanded by default + "collapse_navigation": False, +} \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 00000000..146de988 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,8 @@ +Sinch Python SDK +================ + +.. toctree:: + :maxdepth: 4 + :caption: API Reference + + api/modules From ffbbf893e5546914205dccd719e1ad5b0f3a4b69 Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Mon, 8 Jun 2026 15:51:55 +0200 Subject: [PATCH 02/16] feat(docs): add docs requirements to requirements-dev --- requirements-dev.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 384715db..e88d49f5 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -11,4 +11,8 @@ ruff requests # Data Validation -pydantic >= 2.0.0 \ No newline at end of file +pydantic >= 2.0.0 + +# Documentation +sphinx == 9.0.4 +sphinx-rtd-theme == 3.1.0 From 5f4809fa05cbf3d1ac6a3c01b17c339ca8a8863d Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Mon, 8 Jun 2026 16:51:07 +0200 Subject: [PATCH 03/16] feat(docs): remove pin for sphinx dev dependency --- requirements-dev.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index e88d49f5..986a8b72 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -14,5 +14,5 @@ requests pydantic >= 2.0.0 # Documentation -sphinx == 9.0.4 -sphinx-rtd-theme == 3.1.0 +sphinx +sphinx-rtd-theme From 563102f8c59766e4ba7a49727beac9dc0a22434f Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Tue, 9 Jun 2026 11:36:01 +0200 Subject: [PATCH 04/16] feat(docs): add push documentation workflow --- .github/workflows/documentation-upload.yaml | 72 +++++++++++++++++++++ Makefile | 6 ++ 2 files changed, 78 insertions(+) create mode 100644 .github/workflows/documentation-upload.yaml create mode 100644 Makefile diff --git a/.github/workflows/documentation-upload.yaml b/.github/workflows/documentation-upload.yaml new file mode 100644 index 00000000..1da27e6f --- /dev/null +++ b/.github/workflows/documentation-upload.yaml @@ -0,0 +1,72 @@ +name: Generate and upload documentation + +on: + release: + types: [published] + workflow_dispatch: + inputs: + version: + description: 'Version to use for the documentation package in semver format (e.g. 1.2.3)' + required: true + +jobs: + upload-documentation: + runs-on: ubuntu-latest + env: + SDK_NAME: sinch-sdk-python + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Resolve Version + id: version + run: | + if [ "${{ github.event_name }}" = "release" ]; then + VERSION="${{ github.event.release.tag_name }}" + else + VERSION="${{ inputs.version }}" + fi + # Strip leading 'v' if present (e.g. v1.2.3 → 1.2.3) + VERSION="${VERSION#v}" + echo "value=${VERSION}" >> "$GITHUB_OUTPUT" + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dev dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements-dev.txt + + - name: Generate Documentation + run: | + make docs + + - name: Package Documentation + run: | + cd docs/build/html + zip -r "../../../${{ env.SDK_NAME }}-${{ steps.version.outputs.value }}.zip" . + + - name: Upload to GitLab Registry + run: | + echo "Uploading documentation package to GitLab Registry..." + VERSION="${{ steps.version.outputs.value }}" + curl --fail --show-error --location --header "PRIVATE-TOKEN: ${{ secrets.GITLAB_REGISTRY_UPLOAD_DOC_TOKEN }}" \ + --upload-file "./${{ env.SDK_NAME }}-${VERSION}.zip" \ + "https://gitlab.com/api/v4/projects/63164411/packages/generic/${{ env.SDK_NAME }}/${VERSION}/${{ env.SDK_NAME }}-${VERSION}.zip" + echo "Documentation package for version ${VERSION} uploaded to GitLab Registry" + + - name: Trigger Downstream GitLab Pipeline + run: | + echo "Triggering downstream GitLab pipeline to notify about new documentation package version..." + VERSION="${{ steps.version.outputs.value }}" + curl --fail --show-error --location --request POST \ + --form "token=${{ secrets.GITLAB_NOTIFIY_REGISTRY_UPLOADED_DOC_TOKEN }}" \ + --form "ref=main" \ + --form "variables[UPSTREAM_PACKAGE_NAME]=${{ env.SDK_NAME }}" \ + --form "variables[UPSTREAM_PACKAGE_VERSION]=${VERSION}" \ + "https://gitlab.com/api/v4/projects/63164411/trigger/pipeline" + echo "Documentation repo notified about new package version ${VERSION}" diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..e4041da6 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +.PHONY: docs + +docs: + rm -rf docs/build + rm -rf docs/api + sphinx-build -b html docs docs/build/html From dafdd174c145c664d12d59fd5d1c72ceed50dfbd Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Tue, 9 Jun 2026 11:37:01 +0200 Subject: [PATCH 05/16] feat(docs): add push documentation workflow --- .github/workflows/documentation-upload.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/documentation-upload.yaml b/.github/workflows/documentation-upload.yaml index 1da27e6f..a8b9cd66 100644 --- a/.github/workflows/documentation-upload.yaml +++ b/.github/workflows/documentation-upload.yaml @@ -64,7 +64,7 @@ jobs: echo "Triggering downstream GitLab pipeline to notify about new documentation package version..." VERSION="${{ steps.version.outputs.value }}" curl --fail --show-error --location --request POST \ - --form "token=${{ secrets.GITLAB_NOTIFIY_REGISTRY_UPLOADED_DOC_TOKEN }}" \ + --form "token=${{ secrets.GITLAB_NOTIFY_REGISTRY_UPLOADED_DOC_TOKEN }}" \ --form "ref=main" \ --form "variables[UPSTREAM_PACKAGE_NAME]=${{ env.SDK_NAME }}" \ --form "variables[UPSTREAM_PACKAGE_VERSION]=${VERSION}" \ From 5070abc21f44eda79fa495fd6cacf3ced3799aa3 Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Thu, 11 Jun 2026 15:53:26 +0200 Subject: [PATCH 06/16] feat(docs): add version validation --- .github/workflows/documentation-upload.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/documentation-upload.yaml b/.github/workflows/documentation-upload.yaml index a8b9cd66..05f3ce93 100644 --- a/.github/workflows/documentation-upload.yaml +++ b/.github/workflows/documentation-upload.yaml @@ -31,6 +31,16 @@ jobs: VERSION="${VERSION#v}" echo "value=${VERSION}" >> "$GITHUB_OUTPUT" + - name: Validate Version Format + run: | + VERSION="${{ steps.version.outputs.value }}" + SEMVER_REGEX='^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((alpha|beta|preview)(\.[0-9]+)?))?$' + if [[ ! "$VERSION" =~ $SEMVER_REGEX ]]; then + echo "::error::Invalid version format: '$VERSION'. Expected semver (e.g. 1.2.3, 1.2.3-alpha, 1.2.3-beta.1, 1.2.3-preview)" + exit 1 + fi + echo "Version '$VERSION' is valid" + - name: Setup Python uses: actions/setup-python@v5 with: From a1247987713e688ae81cddbf6db942997111c483 Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Fri, 12 Jun 2026 11:36:06 +0200 Subject: [PATCH 07/16] feat(docs): enhance documentation generation and styling --- Makefile | 1 + docs/_static/custom.css | 21 ++++++++++++++++ docs/_templates/apidoc/package.rst.jinja | 31 ++++++++++++++++++++++++ docs/conf.py | 31 ++++++++++++------------ docs/index.rst | 4 +-- 5 files changed, 70 insertions(+), 18 deletions(-) create mode 100644 docs/_static/custom.css create mode 100644 docs/_templates/apidoc/package.rst.jinja diff --git a/Makefile b/Makefile index e4041da6..eab9efdc 100644 --- a/Makefile +++ b/Makefile @@ -3,4 +3,5 @@ docs: rm -rf docs/build rm -rf docs/api + sphinx-apidoc --force --no-toc --maxdepth 2 --templatedir docs/_templates/apidoc -o docs/api sinch sphinx-build -b html docs docs/build/html diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 00000000..91609f05 --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,21 @@ +/* --------------------------------------------------------------------------- + Multi-line signatures (one parameter per line). + + When a signature is wrapped, Sphinx renders each parameter as a
inside + a nested
. The Read the Docs theme styles every
/
with borders, + background tint and vertical margins, which leak into the signature and draw + ugly "lines" between parameters. Flatten that nested list so the parameters + read as a clean indented column. +--------------------------------------------------------------------------- */ +.rst-content .sig dl, +.rst-content .sig dd { + margin: 0; + padding: 0; + border: none; + background: none; +} + +/* Keep each parameter indented under the opening parenthesis. */ +.rst-content .sig dd { + margin-left: 2em; +} diff --git a/docs/_templates/apidoc/package.rst.jinja b/docs/_templates/apidoc/package.rst.jinja new file mode 100644 index 00000000..ef18fbf6 --- /dev/null +++ b/docs/_templates/apidoc/package.rst.jinja @@ -0,0 +1,31 @@ +{%- macro automodule(modname, options) -%} +.. automodule:: {{ modname }} +{%- for option in options %} + :{{ option }}: +{%- endfor %} +{%- endmacro %} + +{%- macro toctree(docnames) -%} +.. toctree:: + :maxdepth: {{ maxdepth }} +{% for docname in docnames %} + {{ docname }} +{%- endfor %} +{%- endmacro %} + +{{- [pkgname, "package"] | join(" ") | e | heading }} + +{%- if is_namespace %} +.. py:module:: {{ pkgname }} +{% endif %} + +{%- if subpackages %} +{{ toctree(subpackages) }} +{% endif %} + +{%- if submodules %} +{% for submodule in submodules %} +{{ [submodule.split(".")[-1], "module"] | join(" ") | e | heading(2) }} +{{ automodule(submodule, automodule_options) }} +{% endfor %} +{%- endif %} diff --git a/docs/conf.py b/docs/conf.py index 3e385ca6..d6aa2d74 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,33 +15,25 @@ # -- General configuration ----------------------------------------------------- extensions = [ - # Automatically generates .rst files from Python source (replaces running - # sphinx-apidoc manually — configured via apidoc_modules below) - "sphinx.ext.apidoc", # Pulls docstrings from Python source into the generated .rst files "sphinx.ext.autodoc", # Adds [source] links that open the highlighted source file "sphinx.ext.viewcode", ] -# -- sphinx.ext.apidoc --------------------------------------------------------- -# Runs apidoc automatically during the build — no need for a separate command. -# Each entry in the list corresponds to one package to document. - -apidoc_modules = [ - { - # Path to the Python package, relative to this conf.py file - "path": "../sinch", - # Output directory for the generated .rst files, relative to the docs source dir - "destination": "api", - } -] +# The .rst files under api/ are generated by the `sphinx-apidoc` CLI invoked +# from the Makefile (`make docs`), using the custom templates in +# _templates/apidoc/ to strip the "package" suffix and the +# "Subpackages"/"Submodules"/"Module contents" headings. The +# sphinx.ext.apidoc extension is intentionally NOT used because it ignores +# the template directory. # -- sphinx.ext.autodoc -------------------------------------------------------- autodoc_default_options = { # Document all public members (methods, attributes, nested classes) "members": True, + 'undoc-members': True, # Show the class inheritance chain "show-inheritance": True, # Preserve the order in which members appear in the source file @@ -50,6 +42,7 @@ # Render type hints as part of the parameter/return descriptions, not the signature autodoc_typehints = "both" +python_maximum_signature_line_length = 88 # -- HTML output --------------------------------------------------------------- @@ -60,4 +53,10 @@ "navigation_depth": -1, # Keep all navigation entries expanded by default "collapse_navigation": False, -} \ No newline at end of file +} + +# Directory with extra static files (custom CSS, etc.), relative to this conf.py +html_static_path = ["_static"] + +# Extra stylesheets loaded after the theme's own CSS +html_css_files = ["custom.css"] \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 146de988..9cb6c3fe 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,7 +2,7 @@ Sinch Python SDK ================ .. toctree:: - :maxdepth: 4 + :maxdepth: 3 :caption: API Reference - api/modules + api/sinch From f10c54644dc4b38de673506fc4e8dcfc2010498d Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Fri, 12 Jun 2026 13:20:33 +0200 Subject: [PATCH 08/16] feat(docs): update documentation templates and add new init file --- .github/workflows/ci.yml | 4 ++++ Makefile | 2 +- docs/_templates/apidoc/module.rst.jinja | 8 ++++++++ docs/_templates/apidoc/package.rst.jinja | 4 ++++ requirements-dev.txt | 5 +++-- .../models/v1/sinch_events/events/__init__.py | 0 sinch/domains/number_lookup/api/__init__.py | 0 sinch/domains/number_lookup/models/v1/__init__.py | 0 8 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 docs/_templates/apidoc/module.rst.jinja create mode 100644 sinch/domains/conversation/models/v1/sinch_events/events/__init__.py create mode 100644 sinch/domains/number_lookup/api/__init__.py create mode 100644 sinch/domains/number_lookup/models/v1/__init__.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0534969d..04a52f07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,10 @@ jobs: ruff check sinch/domains/conversation --statistics ruff format sinch/domains/conversation --check --diff + - name: Generate Documentation + run: | + make docs + - name: Test with Pytest run: | coverage run --source=. -m pytest diff --git a/Makefile b/Makefile index eab9efdc..a3b97256 100644 --- a/Makefile +++ b/Makefile @@ -3,5 +3,5 @@ docs: rm -rf docs/build rm -rf docs/api - sphinx-apidoc --force --no-toc --maxdepth 2 --templatedir docs/_templates/apidoc -o docs/api sinch + sphinx-apidoc --force --separate --no-toc --maxdepth 2 --templatedir docs/_templates/apidoc -o docs/api sinch sphinx-build -b html docs docs/build/html diff --git a/docs/_templates/apidoc/module.rst.jinja b/docs/_templates/apidoc/module.rst.jinja new file mode 100644 index 00000000..c694aaee --- /dev/null +++ b/docs/_templates/apidoc/module.rst.jinja @@ -0,0 +1,8 @@ +{%- if show_headings %} +{{- [basename, "module"] | join(" ") | e | heading }} + +{% endif -%} +.. automodule:: {{ qualname }} +{%- for option in automodule_options %} + :{{ option }}: +{%- endfor %} diff --git a/docs/_templates/apidoc/package.rst.jinja b/docs/_templates/apidoc/package.rst.jinja index ef18fbf6..be2e76c8 100644 --- a/docs/_templates/apidoc/package.rst.jinja +++ b/docs/_templates/apidoc/package.rst.jinja @@ -24,8 +24,12 @@ {% endif %} {%- if submodules %} +{% if separatemodules %} +{{ toctree(submodules) }} +{% else %} {% for submodule in submodules %} {{ [submodule.split(".")[-1], "module"] | join(" ") | e | heading(2) }} {{ automodule(submodule, automodule_options) }} {% endfor %} {%- endif %} +{%- endif %} diff --git a/requirements-dev.txt b/requirements-dev.txt index 986a8b72..5dd21212 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -14,5 +14,6 @@ requests pydantic >= 2.0.0 # Documentation -sphinx -sphinx-rtd-theme +# Sphinx 7.1 introduced python_maximum_signature_line_length and 7.x is also the last series supporting Python 3.9. +sphinx >= 7.1 +sphinx-rtd-theme >= 2.0 diff --git a/sinch/domains/conversation/models/v1/sinch_events/events/__init__.py b/sinch/domains/conversation/models/v1/sinch_events/events/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/sinch/domains/number_lookup/api/__init__.py b/sinch/domains/number_lookup/api/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/sinch/domains/number_lookup/models/v1/__init__.py b/sinch/domains/number_lookup/models/v1/__init__.py new file mode 100644 index 00000000..e69de29b From 0c20c029e4e387022caf3b4840be8911f8706a05 Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Fri, 12 Jun 2026 13:22:58 +0200 Subject: [PATCH 09/16] feat(docs): remove documentation generation step from CI workflow --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04a52f07..0534969d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,10 +57,6 @@ jobs: ruff check sinch/domains/conversation --statistics ruff format sinch/domains/conversation --check --diff - - name: Generate Documentation - run: | - make docs - - name: Test with Pytest run: | coverage run --source=. -m pytest From 5b24b477047cee973c8b1a20399971520ebd7884 Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Fri, 12 Jun 2026 13:26:02 +0200 Subject: [PATCH 10/16] fix(docs): update copyright year in project information --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index d6aa2d74..5d8b159e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -8,7 +8,7 @@ # -- Project information ------------------------------------------------------- project = "Sinch Python SDK" -copyright = "2024, Sinch Developer Experience Team" +copyright = "2026, Sinch Developer Experience Team" author = "Sinch Developer Experience Team" release = __version__ From d5d7bab02d09d8f0c4f6b203cd9eb5f0aaf59e4a Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Mon, 15 Jun 2026 15:55:35 +0200 Subject: [PATCH 11/16] feat(docs): add documentation generation step to CI workflow --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0534969d..ed8f35ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,10 @@ jobs: run: | pip install python-dotenv python scripts/check_snippet_coverage.py + + - name: Generate Documentation + run: | + make docs - name: Lint and format check with Ruff run: | From 409f89ff214460f8c36468320e88a6d917f2a073 Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Mon, 15 Jun 2026 16:05:55 +0200 Subject: [PATCH 12/16] feat(docs): add missing __init__.py file for message models in conversation domain --- sinch/domains/conversation/models/v1/messages/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 sinch/domains/conversation/models/v1/messages/__init__.py diff --git a/sinch/domains/conversation/models/v1/messages/__init__.py b/sinch/domains/conversation/models/v1/messages/__init__.py new file mode 100644 index 00000000..e69de29b From 38fd8dc8c80f2eb01fe822f99694f2e06193176a Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Mon, 15 Jun 2026 17:21:05 +0200 Subject: [PATCH 13/16] feat(docs): add __init__.py file for sms sinch_events module --- sinch/domains/sms/sinch_events/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 sinch/domains/sms/sinch_events/__init__.py diff --git a/sinch/domains/sms/sinch_events/__init__.py b/sinch/domains/sms/sinch_events/__init__.py new file mode 100644 index 00000000..e69de29b From 4e6a43021275b93110c0b7b9d840f3e28b1c1571 Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Mon, 15 Jun 2026 17:26:10 +0200 Subject: [PATCH 14/16] feat(docs): enhance documentation generation by removing internal implementation from documentation --- Makefile | 14 +++++++++++++- docs/_templates/apidoc/package.rst.jinja | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a3b97256..4fe5c654 100644 --- a/Makefile +++ b/Makefile @@ -3,5 +3,17 @@ docs: rm -rf docs/build rm -rf docs/api - sphinx-apidoc --force --separate --no-toc --maxdepth 2 --templatedir docs/_templates/apidoc -o docs/api sinch + sphinx-apidoc --force --separate --no-toc --maxdepth 2 \ + --templatedir docs/_templates/apidoc -o docs/api sinch \ + "sinch/core/models/base_model.py" \ + "sinch/core/models/utils.py" \ + "sinch/core/deserializers.py" \ + "sinch/core/endpoint.py" \ + "sinch/core/enums.py" \ + "sinch/core/types.py" \ + "sinch/*/api/v1/internal" "sinch/*/api/v1/internal/*" \ + "sinch/*/api/v1/base" "sinch/*/api/v1/base/*" \ + "sinch/*/models/v1/internal" "sinch/*/models/v1/internal/*" \ + "sinch/*/sinch_events/v1/internal" "sinch/*/sinch_events/v1/internal/*" \ + "sinch/domains/numbers/models/v1/utils" "sinch/domains/numbers/models/v1/utils/*" sphinx-build -b html docs docs/build/html diff --git a/docs/_templates/apidoc/package.rst.jinja b/docs/_templates/apidoc/package.rst.jinja index be2e76c8..4e34d501 100644 --- a/docs/_templates/apidoc/package.rst.jinja +++ b/docs/_templates/apidoc/package.rst.jinja @@ -33,3 +33,7 @@ {% endfor %} {%- endif %} {%- endif %} + +{%- if not is_namespace %} +{{ automodule(pkgname, automodule_options) }} +{% endif %} From 3e114ade7f8081f41df50edda58bffb073252ba3 Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Wed, 17 Jun 2026 14:04:23 +0200 Subject: [PATCH 15/16] feat(docs): update documentation generation to include additional modules and remove obsolete paths --- Makefile | 11 +++++++---- sinch/domains/sms/enums.py | 0 2 files changed, 7 insertions(+), 4 deletions(-) delete mode 100644 sinch/domains/sms/enums.py diff --git a/Makefile b/Makefile index 4fe5c654..26be1ca6 100644 --- a/Makefile +++ b/Makefile @@ -11,9 +11,12 @@ docs: "sinch/core/endpoint.py" \ "sinch/core/enums.py" \ "sinch/core/types.py" \ - "sinch/*/api/v1/internal" "sinch/*/api/v1/internal/*" \ + "sinch/domains/sms/enums.py" \ + "sinch/*/internal" "sinch/*/internal/*" \ "sinch/*/api/v1/base" "sinch/*/api/v1/base/*" \ - "sinch/*/models/v1/internal" "sinch/*/models/v1/internal/*" \ - "sinch/*/sinch_events/v1/internal" "sinch/*/sinch_events/v1/internal/*" \ - "sinch/domains/numbers/models/v1/utils" "sinch/domains/numbers/models/v1/utils/*" + "sinch/*/api/v1/utils" "sinch/*/api/v1/utils/*" \ + "sinch/domains/authentication/endpoints" "sinch/domains/authentication/endpoints/*" \ + "sinch/*/sinch_events/v1/authentication_validation.py" \ + "sinch/*/sinch_events/v1/sinch_event_utils.py" \ + "sinch/domains/numbers/models/v1/utils" "sinch/domains/numbers/models/v1/utils/*" sphinx-build -b html docs docs/build/html diff --git a/sinch/domains/sms/enums.py b/sinch/domains/sms/enums.py deleted file mode 100644 index e69de29b..00000000 From 9f9cda773a03ca0589140dad8e1e1d86aaac6605 Mon Sep 17 00:00:00 2001 From: Marcos Lozano Romero Date: Wed, 17 Jun 2026 14:16:39 +0200 Subject: [PATCH 16/16] feat(docs): update documentation generation to include sinch_events module and remove specific files --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 26be1ca6..9d123075 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,6 @@ docs: "sinch/*/api/v1/base" "sinch/*/api/v1/base/*" \ "sinch/*/api/v1/utils" "sinch/*/api/v1/utils/*" \ "sinch/domains/authentication/endpoints" "sinch/domains/authentication/endpoints/*" \ - "sinch/*/sinch_events/v1/authentication_validation.py" \ - "sinch/*/sinch_events/v1/sinch_event_utils.py" \ + "sinch/domains/authentication/sinch_events" "sinch/domains/authentication/sinch_events/*" \ "sinch/domains/numbers/models/v1/utils" "sinch/domains/numbers/models/v1/utils/*" sphinx-build -b html docs docs/build/html