Skip to content

Commit 3189f77

Browse files
committed
added containers docs, incl auto-generated examples from examples dir
also some minor improvements to docs
1 parent 7d02d69 commit 3189f77

File tree

12 files changed

+102
-8
lines changed

12 files changed

+102
-8
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Changelog
22
=========
33

44
v1.8.2 (2025-03-25)
5+
-------------------
56

67
* Added missing packages to setup requirements
78

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Containers
2+
==========
3+
4+
.. autoclass:: datacrunch.containers.containers.ContainersService
5+
:members:
6+
7+
.. autoclass:: datacrunch.containers.containers.Container
8+
:members:
9+

docs/source/conf.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@
1212
# add these directories to sys.path here. If the directory is relative to the
1313
# documentation root, use os.path.abspath to make it absolute, like shown here.
1414
#
15+
import datetime
16+
from recommonmark.parser import CommonMarkParser
17+
from datacrunch.__version__ import VERSION
1518
import os
1619
import sys
1720
sys.path.insert(0, os.path.abspath('../../'))
18-
from datacrunch.__version__ import VERSION
19-
from recommonmark.parser import CommonMarkParser
2021

2122
# -- Project information -----------------------------------------------------
23+
current_year = datetime.datetime.now().year
2224

2325
project = 'DataCrunch Python SDK'
24-
copyright = '2021, DataCrunch.io'
26+
copyright = f'{current_year}, DataCrunch.io'
2527
author = 'DataCrunch.io'
2628

2729
# The short X.Y version
@@ -68,7 +70,7 @@
6870
#
6971
# This is also used if you do content translation via gettext catalogs.
7072
# Usually you set "language" from the command line for these cases.
71-
language = None
73+
language = 'en'
7274

7375
# List of patterns, relative to source directory, that match files and
7476
# directories to ignore when looking for source files.
@@ -90,12 +92,15 @@
9092
# further. For a list of options available for each theme, see the
9193
# documentation.
9294
#
93-
# html_theme_options = {}
95+
html_theme_options = {
96+
'page_width': '1900px',
97+
'body_min_width': '1400px',
98+
}
9499

95100
# Add any paths that contain custom static files (such as style sheets) here,
96101
# relative to this directory. They are copied after the builtin static files,
97102
# so a file named "default.css" will overwrite the builtin "default.css".
98-
html_static_path = ['_static']
103+
html_static_path = []
99104

100105
# Custom sidebar templates, must be a dictionary that maps document names
101106
# to template names.

docs/source/examples.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ All the examples code can be also found in the repository `Examples folder <http
1313

1414
.. toctree::
1515
:maxdepth: 3
16-
:glob:
16+
:caption: Contents:
1717

18-
examples/*
18+
examples/containers/index
19+
examples/advanced_create_instance
20+
examples/instances_and_volumes
21+
examples/instance_actions
22+
examples/simple_create_instance
23+
examples/ssh_keys
24+
examples/startup_scripts
25+
examples/storage_volumes
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Compute Resources
2+
=================
3+
4+
This example demonstrates how to list and manage compute resources for containers in DataCrunch.
5+
6+
.. literalinclude:: ../../../../examples/containers/compute_resources_example.py
7+
:language: python
8+
:caption: Compute Resources
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Container Deployments
2+
=====================
3+
4+
This example demonstrates how to create, manage, and monitor container deployments in DataCrunch.
5+
6+
.. literalinclude:: ../../../../examples/containers/container_deployments_example.py
7+
:language: python
8+
:caption: Container Deployments
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Environment Variables
2+
=====================
3+
4+
This example shows how to manage environment variables for container deployments in DataCrunch.
5+
6+
.. literalinclude:: ../../../../examples/containers/environment_variables_example.py
7+
:language: python
8+
:caption: Environment Variables
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Container Examples
2+
==================
3+
4+
This section contains examples demonstrating how to work with containers in DataCrunch.
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
:caption: Contents:
9+
10+
compute_resources
11+
deployments
12+
environment_variables
13+
registry_credentials
14+
secrets
15+
sglang
16+
scaling
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Registry Credentials
2+
====================
3+
4+
This example demonstrates how to manage container registry credentials in DataCrunch.
5+
6+
.. literalinclude:: ../../../../examples/containers/registry_credentials_example.py
7+
:language: python
8+
:caption: Registry Credentials
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Update Deployment Scaling
2+
=========================
3+
4+
This example shows how to update and manage the scaling of container deployments in DataCrunch.
5+
6+
.. literalinclude:: ../../../../examples/containers/update_deployment_scaling_example.py
7+
:language: python
8+
:caption: Update Deployment Scaling

0 commit comments

Comments
 (0)