nextmv 0.26.3__py3-none-any.whl → 0.28.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nextmv/__about__.py +1 -1
- nextmv/__entrypoint__.py +3 -5
- nextmv/__init__.py +1 -0
- nextmv/base_model.py +52 -7
- nextmv/cloud/__init__.py +3 -0
- nextmv/cloud/acceptance_test.py +711 -20
- nextmv/cloud/account.py +152 -7
- nextmv/cloud/application.py +1231 -396
- nextmv/cloud/batch_experiment.py +133 -21
- nextmv/cloud/client.py +240 -46
- nextmv/cloud/input_set.py +96 -3
- nextmv/cloud/instance.py +89 -3
- nextmv/cloud/manifest.py +625 -87
- nextmv/cloud/package.py +2 -2
- nextmv/cloud/run.py +376 -45
- nextmv/cloud/safe.py +7 -7
- nextmv/cloud/scenario.py +205 -20
- nextmv/cloud/secrets.py +179 -6
- nextmv/cloud/status.py +95 -2
- nextmv/cloud/version.py +132 -4
- nextmv/deprecated.py +36 -2
- nextmv/input.py +300 -82
- nextmv/logger.py +71 -7
- nextmv/model.py +225 -58
- nextmv/options.py +301 -69
- nextmv/output.py +667 -236
- {nextmv-0.26.3.dist-info → nextmv-0.28.0.dist-info}/METADATA +1 -1
- nextmv-0.28.0.dist-info/RECORD +30 -0
- nextmv-0.26.3.dist-info/RECORD +0 -30
- {nextmv-0.26.3.dist-info → nextmv-0.28.0.dist-info}/WHEEL +0 -0
- {nextmv-0.26.3.dist-info → nextmv-0.28.0.dist-info}/licenses/LICENSE +0 -0
nextmv/cloud/instance.py
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""Classes for working with Nextmv Cloud Instances.
|
|
2
|
+
|
|
3
|
+
This module provides classes for interacting with instances in Nextmv Cloud.
|
|
4
|
+
It defines the core data structures for both instance configuration and the
|
|
5
|
+
instance itself.
|
|
6
|
+
|
|
7
|
+
Classes
|
|
8
|
+
-------
|
|
9
|
+
InstanceConfiguration
|
|
10
|
+
Configuration settings for a Nextmv Cloud instance.
|
|
11
|
+
Instance
|
|
12
|
+
Representation of a Nextmv Cloud instance tied to an application version.
|
|
13
|
+
"""
|
|
2
14
|
|
|
3
15
|
from datetime import datetime
|
|
4
16
|
from typing import Optional
|
|
@@ -7,7 +19,34 @@ from nextmv.base_model import BaseModel
|
|
|
7
19
|
|
|
8
20
|
|
|
9
21
|
class InstanceConfiguration(BaseModel):
|
|
10
|
-
"""Configuration for
|
|
22
|
+
"""Configuration for a Nextmv Cloud instance.
|
|
23
|
+
|
|
24
|
+
You can import the `InstanceConfiguration` class directly from `cloud`:
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
from nextmv.cloud import InstanceConfiguration
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This class represents the configuration settings that can be applied to a
|
|
31
|
+
Nextmv Cloud instance, including execution class, options, and secrets.
|
|
32
|
+
|
|
33
|
+
Parameters
|
|
34
|
+
----------
|
|
35
|
+
execution_class : str, optional
|
|
36
|
+
The execution class for the instance, which determines compute resources.
|
|
37
|
+
options : dict, optional
|
|
38
|
+
Runtime options/parameters for the application.
|
|
39
|
+
secrets_collection_id : str, optional
|
|
40
|
+
ID of the secrets collection to use with this instance.
|
|
41
|
+
|
|
42
|
+
Examples
|
|
43
|
+
--------
|
|
44
|
+
>>> config = InstanceConfiguration(
|
|
45
|
+
... execution_class="small",
|
|
46
|
+
... options={"max_runtime": 30},
|
|
47
|
+
... secrets_collection_id="sc_1234567890"
|
|
48
|
+
... )
|
|
49
|
+
"""
|
|
11
50
|
|
|
12
51
|
execution_class: Optional[str] = None
|
|
13
52
|
"""Execution class for the instance."""
|
|
@@ -18,7 +57,54 @@ class InstanceConfiguration(BaseModel):
|
|
|
18
57
|
|
|
19
58
|
|
|
20
59
|
class Instance(BaseModel):
|
|
21
|
-
"""
|
|
60
|
+
"""An instance of an application tied to a version with configuration.
|
|
61
|
+
|
|
62
|
+
You can import the `Instance` class directly from `cloud`:
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from nextmv.cloud import Instance
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
A Nextmv Cloud instance represents a deployable configuration of an application
|
|
69
|
+
version. Instances have their own unique identity and can be used to run jobs
|
|
70
|
+
with specific configurations.
|
|
71
|
+
|
|
72
|
+
Parameters
|
|
73
|
+
----------
|
|
74
|
+
id : str
|
|
75
|
+
The unique identifier of the instance.
|
|
76
|
+
application_id : str
|
|
77
|
+
ID of the application that this instance belongs to.
|
|
78
|
+
version_id : str
|
|
79
|
+
ID of the application version this instance uses.
|
|
80
|
+
name : str
|
|
81
|
+
Human-readable name of the instance.
|
|
82
|
+
description : str
|
|
83
|
+
Detailed description of the instance.
|
|
84
|
+
configuration : InstanceConfiguration
|
|
85
|
+
Configuration settings for this instance.
|
|
86
|
+
locked : bool
|
|
87
|
+
Whether the instance is locked for modifications.
|
|
88
|
+
created_at : datetime
|
|
89
|
+
Timestamp when the instance was created.
|
|
90
|
+
updated_at : datetime
|
|
91
|
+
Timestamp when the instance was last updated.
|
|
92
|
+
|
|
93
|
+
Examples
|
|
94
|
+
--------
|
|
95
|
+
>>> from nextmv.cloud import Instance, InstanceConfiguration
|
|
96
|
+
>>> instance = Instance(
|
|
97
|
+
... id="inst_1234567890",
|
|
98
|
+
... application_id="app_1234567890",
|
|
99
|
+
... version_id="ver_1234567890",
|
|
100
|
+
... name="Production Routing Instance",
|
|
101
|
+
... description="Instance for daily production routing jobs",
|
|
102
|
+
... configuration=InstanceConfiguration(execution_class="small"),
|
|
103
|
+
... locked=False,
|
|
104
|
+
... created_at=datetime.now(),
|
|
105
|
+
... updated_at=datetime.now()
|
|
106
|
+
... )
|
|
107
|
+
"""
|
|
22
108
|
|
|
23
109
|
id: str
|
|
24
110
|
"""ID of the instance."""
|