nextmv 0.27.0__py3-none-any.whl → 0.28.1__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/__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 +1213 -382
- 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 +508 -132
- nextmv/cloud/package.py +2 -2
- nextmv/cloud/run.py +372 -41
- 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 +298 -80
- nextmv/logger.py +71 -7
- nextmv/model.py +223 -56
- nextmv/options.py +281 -66
- nextmv/output.py +552 -159
- {nextmv-0.27.0.dist-info → nextmv-0.28.1.dist-info}/METADATA +24 -4
- nextmv-0.28.1.dist-info/RECORD +30 -0
- nextmv-0.27.0.dist-info/RECORD +0 -30
- {nextmv-0.27.0.dist-info → nextmv-0.28.1.dist-info}/WHEEL +0 -0
- {nextmv-0.27.0.dist-info → nextmv-0.28.1.dist-info}/licenses/LICENSE +0 -0
nextmv/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "v0.
|
|
1
|
+
__version__ = "v0.28.1"
|
nextmv/__init__.py
CHANGED
nextmv/base_model.py
CHANGED
|
@@ -1,17 +1,52 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""
|
|
2
|
+
Provides base functionality for handling JSON data in models.
|
|
3
|
+
|
|
4
|
+
This module contains utilities for converting between dictionaries and model
|
|
5
|
+
instances, facilitating data serialization and deserialization.
|
|
6
|
+
|
|
7
|
+
Classes
|
|
8
|
+
-------
|
|
9
|
+
BaseModel:
|
|
10
|
+
A base class extending Pydantic's BaseModel with additional methods for
|
|
11
|
+
JSON data serialization and deserialization.
|
|
12
|
+
|
|
13
|
+
Functions
|
|
14
|
+
---------
|
|
15
|
+
from_dict:
|
|
16
|
+
Load a data model instance from a dictionary containing class information
|
|
17
|
+
and attributes.
|
|
18
|
+
"""
|
|
2
19
|
|
|
3
20
|
from importlib import import_module
|
|
4
21
|
from typing import Any, Optional
|
|
5
22
|
|
|
6
|
-
from pydantic import BaseModel
|
|
23
|
+
from pydantic import BaseModel as PydanticBaseModel
|
|
7
24
|
|
|
8
25
|
|
|
9
|
-
class BaseModel(
|
|
10
|
-
"""
|
|
26
|
+
class BaseModel(PydanticBaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Base class for data wrangling tasks with JSON.
|
|
29
|
+
|
|
30
|
+
This class extends Pydantic's `BaseModel` to provide additional methods
|
|
31
|
+
for converting between Python objects and JSON/dictionary representations.
|
|
32
|
+
"""
|
|
11
33
|
|
|
12
34
|
@classmethod
|
|
13
35
|
def from_dict(cls, data: Optional[dict[str, Any]] = None):
|
|
14
|
-
"""
|
|
36
|
+
"""
|
|
37
|
+
Instantiate the class from a dictionary.
|
|
38
|
+
|
|
39
|
+
Parameters
|
|
40
|
+
----------
|
|
41
|
+
data : dict[str, Any], optional
|
|
42
|
+
The dictionary containing the data to instantiate the class.
|
|
43
|
+
If None, returns None.
|
|
44
|
+
|
|
45
|
+
Returns
|
|
46
|
+
-------
|
|
47
|
+
cls or None
|
|
48
|
+
An instance of the class with the given data or None if data is None.
|
|
49
|
+
"""
|
|
15
50
|
|
|
16
51
|
if data is None:
|
|
17
52
|
return None
|
|
@@ -19,14 +54,24 @@ class BaseModel(BaseModel):
|
|
|
19
54
|
return cls(**data)
|
|
20
55
|
|
|
21
56
|
def to_dict(self) -> dict[str, Any]:
|
|
22
|
-
"""
|
|
57
|
+
"""
|
|
58
|
+
Convert the class instance to a dictionary.
|
|
59
|
+
|
|
60
|
+
The conversion uses Pydantic's model_dump method, excluding None values
|
|
61
|
+
and using field aliases if defined.
|
|
62
|
+
|
|
63
|
+
Returns
|
|
64
|
+
-------
|
|
65
|
+
dict[str, Any]
|
|
66
|
+
Dictionary representation of the class instance.
|
|
67
|
+
"""
|
|
23
68
|
|
|
24
69
|
return self.model_dump(mode="json", exclude_none=True, by_alias=True)
|
|
25
70
|
|
|
26
71
|
|
|
27
72
|
def from_dict(data: dict[str, Any]) -> Any:
|
|
28
73
|
"""
|
|
29
|
-
Load a data model instance from a dict with associated class info.
|
|
74
|
+
Load a data model instance from a `dict` with associated class info.
|
|
30
75
|
|
|
31
76
|
Parameters
|
|
32
77
|
----------
|
nextmv/cloud/__init__.py
CHANGED
|
@@ -23,15 +23,18 @@ from .application import Application as Application
|
|
|
23
23
|
from .application import DownloadURL as DownloadURL
|
|
24
24
|
from .application import PollingOptions as PollingOptions
|
|
25
25
|
from .application import UploadURL as UploadURL
|
|
26
|
+
from .application import poll as poll
|
|
26
27
|
from .batch_experiment import BatchExperiment as BatchExperiment
|
|
27
28
|
from .batch_experiment import BatchExperimentInformation as BatchExperimentInformation
|
|
28
29
|
from .batch_experiment import BatchExperimentMetadata as BatchExperimentMetadata
|
|
29
30
|
from .batch_experiment import BatchExperimentRun as BatchExperimentRun
|
|
30
31
|
from .client import Client as Client
|
|
32
|
+
from .client import get_size as get_size
|
|
31
33
|
from .input_set import InputSet as InputSet
|
|
32
34
|
from .input_set import ManagedInput as ManagedInput
|
|
33
35
|
from .instance import Instance as Instance
|
|
34
36
|
from .instance import InstanceConfiguration as InstanceConfiguration
|
|
37
|
+
from .manifest import MANIFEST_FILE_NAME as MANIFEST_FILE_NAME
|
|
35
38
|
from .manifest import Manifest as Manifest
|
|
36
39
|
from .manifest import ManifestBuild as ManifestBuild
|
|
37
40
|
from .manifest import ManifestOption as ManifestOption
|