From 3189f7704b910a6a726082dfeed058cb9b028b24 Mon Sep 17 00:00:00 2001 From: Tamir Date: Tue, 25 Mar 2025 10:40:53 +0200 Subject: [PATCH] added containers docs, incl auto-generated examples from examples dir also some minor improvements to docs --- CHANGELOG.rst | 1 + docs/source/api/services/containers.rst | 9 +++++++++ docs/source/conf.py | 17 +++++++++++------ docs/source/examples.rst | 11 +++++++++-- .../examples/containers/compute_resources.rst | 8 ++++++++ docs/source/examples/containers/deployments.rst | 8 ++++++++ .../containers/environment_variables.rst | 8 ++++++++ docs/source/examples/containers/index.rst | 16 ++++++++++++++++ .../containers/registry_credentials.rst | 8 ++++++++ docs/source/examples/containers/scaling.rst | 8 ++++++++ docs/source/examples/containers/secrets.rst | 8 ++++++++ docs/source/examples/containers/sglang.rst | 8 ++++++++ 12 files changed, 102 insertions(+), 8 deletions(-) create mode 100644 docs/source/api/services/containers.rst create mode 100644 docs/source/examples/containers/compute_resources.rst create mode 100644 docs/source/examples/containers/deployments.rst create mode 100644 docs/source/examples/containers/environment_variables.rst create mode 100644 docs/source/examples/containers/index.rst create mode 100644 docs/source/examples/containers/registry_credentials.rst create mode 100644 docs/source/examples/containers/scaling.rst create mode 100644 docs/source/examples/containers/secrets.rst create mode 100644 docs/source/examples/containers/sglang.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4527477..3423c4c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,7 @@ Changelog ========= v1.8.2 (2025-03-25) +------------------- * Added missing packages to setup requirements diff --git a/docs/source/api/services/containers.rst b/docs/source/api/services/containers.rst new file mode 100644 index 0000000..b33e387 --- /dev/null +++ b/docs/source/api/services/containers.rst @@ -0,0 +1,9 @@ +Containers +========== + +.. autoclass:: datacrunch.containers.containers.ContainersService + :members: + +.. autoclass:: datacrunch.containers.containers.Container + :members: + diff --git a/docs/source/conf.py b/docs/source/conf.py index 330859a..9b0c09a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,16 +12,18 @@ # 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 datetime +from recommonmark.parser import CommonMarkParser +from datacrunch.__version__ import VERSION import os import sys sys.path.insert(0, os.path.abspath('../../')) -from datacrunch.__version__ import VERSION -from recommonmark.parser import CommonMarkParser # -- Project information ----------------------------------------------------- +current_year = datetime.datetime.now().year project = 'DataCrunch Python SDK' -copyright = '2021, DataCrunch.io' +copyright = f'{current_year}, DataCrunch.io' author = 'DataCrunch.io' # The short X.Y version @@ -68,7 +70,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -90,12 +92,15 @@ # further. For a list of options available for each theme, see the # documentation. # -# html_theme_options = {} +html_theme_options = { + 'page_width': '1900px', + 'body_min_width': '1400px', +} # 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_static_path = [] # Custom sidebar templates, must be a dictionary that maps document names # to template names. diff --git a/docs/source/examples.rst b/docs/source/examples.rst index a08da97..4345a56 100644 --- a/docs/source/examples.rst +++ b/docs/source/examples.rst @@ -13,6 +13,13 @@ All the examples code can be also found in the repository `Examples folder