nextmv 0.27.0__tar.gz → 0.28.1.dev0__tar.gz
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-0.27.0 → nextmv-0.28.1.dev0}/.gitignore +3 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/PKG-INFO +24 -4
- nextmv-0.28.1.dev0/README.md +40 -0
- nextmv-0.28.1.dev0/nextmv/__about__.py +1 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/nextmv/__init__.py +1 -0
- nextmv-0.28.1.dev0/nextmv/base_model.py +90 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/nextmv/cloud/__init__.py +3 -0
- nextmv-0.28.1.dev0/nextmv/cloud/acceptance_test.py +948 -0
- nextmv-0.28.1.dev0/nextmv/cloud/account.py +213 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/nextmv/cloud/application.py +1213 -382
- nextmv-0.28.1.dev0/nextmv/cloud/batch_experiment.py +217 -0
- nextmv-0.28.1.dev0/nextmv/cloud/client.py +452 -0
- nextmv-0.28.1.dev0/nextmv/cloud/input_set.py +143 -0
- nextmv-0.28.1.dev0/nextmv/cloud/instance.py +126 -0
- nextmv-0.28.1.dev0/nextmv/cloud/manifest.py +921 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/nextmv/cloud/package.py +2 -2
- nextmv-0.28.1.dev0/nextmv/cloud/run.py +671 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/nextmv/cloud/safe.py +7 -7
- nextmv-0.28.1.dev0/nextmv/cloud/scenario.py +414 -0
- nextmv-0.28.1.dev0/nextmv/cloud/secrets.py +234 -0
- nextmv-0.28.1.dev0/nextmv/cloud/status.py +122 -0
- nextmv-0.28.1.dev0/nextmv/cloud/version.py +174 -0
- nextmv-0.28.1.dev0/nextmv/deprecated.py +47 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/nextmv/input.py +298 -80
- nextmv-0.28.1.dev0/nextmv/logger.py +111 -0
- nextmv-0.28.1.dev0/nextmv/model.py +423 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/nextmv/options.py +281 -66
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/nextmv/output.py +552 -159
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/cloud/test_safe_name_id.py +2 -2
- nextmv-0.27.0/README.md +0 -20
- nextmv-0.27.0/nextmv/__about__.py +0 -1
- nextmv-0.27.0/nextmv/base_model.py +0 -45
- nextmv-0.27.0/nextmv/cloud/acceptance_test.py +0 -257
- nextmv-0.27.0/nextmv/cloud/account.py +0 -68
- nextmv-0.27.0/nextmv/cloud/batch_experiment.py +0 -105
- nextmv-0.27.0/nextmv/cloud/client.py +0 -258
- nextmv-0.27.0/nextmv/cloud/input_set.py +0 -50
- nextmv-0.27.0/nextmv/cloud/instance.py +0 -40
- nextmv-0.27.0/nextmv/cloud/manifest.py +0 -545
- nextmv-0.27.0/nextmv/cloud/run.py +0 -340
- nextmv-0.27.0/nextmv/cloud/scenario.py +0 -229
- nextmv-0.27.0/nextmv/cloud/secrets.py +0 -61
- nextmv-0.27.0/nextmv/cloud/status.py +0 -29
- nextmv-0.27.0/nextmv/cloud/version.py +0 -46
- nextmv-0.27.0/nextmv/deprecated.py +0 -13
- nextmv-0.27.0/nextmv/logger.py +0 -47
- nextmv-0.27.0/nextmv/model.py +0 -256
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/LICENSE +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/nextmv/__entrypoint__.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/pyproject.toml +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/requirements.txt +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/__init__.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/cloud/__init__.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/cloud/app.yaml +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/cloud/test_application.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/cloud/test_client.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/cloud/test_manifest.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/cloud/test_package.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/cloud/test_run.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/cloud/test_scenario.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/scripts/__init__.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/scripts/options1.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/scripts/options2.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/scripts/options3.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/scripts/options4.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/scripts/options5.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/scripts/options6.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/scripts/options7.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/scripts/options_deprecated.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/test_base_model.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/test_entrypoint/__init__.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/test_entrypoint/test_entrypoint.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/test_input.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/test_logger.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/test_model.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/test_options.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/test_output.py +0 -0
- {nextmv-0.27.0 → nextmv-0.28.1.dev0}/tests/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nextmv
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.28.1.dev0
|
|
4
4
|
Summary: The all-purpose Python SDK for Nextmv
|
|
5
5
|
Project-URL: Homepage, https://www.nextmv.io
|
|
6
6
|
Project-URL: Documentation, https://www.nextmv.io/docs/python-sdks/nextmv/installation
|
|
@@ -229,8 +229,28 @@ Description-Content-Type: text/markdown
|
|
|
229
229
|
|
|
230
230
|
# Nextmv Python SDK
|
|
231
231
|
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
<!-- markdownlint-disable MD033 MD013 -->
|
|
233
|
+
|
|
234
|
+
<p align="center">
|
|
235
|
+
<a href="https://nextmv.io"><img src="https://cdn.prod.website-files.com/60dee0fad10d14c8ab66dd74/674628a824bc14307c1727aa_blog-prototype-p-2000.png" alt="Nextmv" width="45%"></a>
|
|
236
|
+
</p>
|
|
237
|
+
<p align="center">
|
|
238
|
+
<em>Nextmv: The home for all your optimization work</em>
|
|
239
|
+
</p>
|
|
240
|
+
<p align="center">
|
|
241
|
+
<a href="https://pypi.org/project/nextmv" target="_blank">
|
|
242
|
+
<img src="https://img.shields.io/pypi/pyversions/nextmv.svg?color=%2334D058" alt="Supported Python versions">
|
|
243
|
+
</a>
|
|
244
|
+
<a href="https://pypi.org/project/nextmv" target="_blank">
|
|
245
|
+
<img src="https://img.shields.io/pypi/v/nextmv?color=%2334D058&label=nextmv" alt="Package version">
|
|
246
|
+
</a>
|
|
247
|
+
</p>
|
|
248
|
+
|
|
249
|
+
<!-- markdownlint-enable MD033 MD013 -->
|
|
250
|
+
|
|
251
|
+
Welcome to `nextmv`, the general Python SDK for the Nextmv Platform.
|
|
252
|
+
|
|
253
|
+
📖 To learn more about the `nextmv`, visit the [docs][docs].
|
|
234
254
|
|
|
235
255
|
## Installation
|
|
236
256
|
|
|
@@ -246,4 +266,4 @@ Install all optional dependencies (recommended):
|
|
|
246
266
|
pip install "nextmv[all]"
|
|
247
267
|
```
|
|
248
268
|
|
|
249
|
-
[docs]: https://nextmv.io/
|
|
269
|
+
[docs]: https://nextmv-py.readthedocs.io/en/latest/nextmv/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Nextmv Python SDK
|
|
2
|
+
|
|
3
|
+
<!-- markdownlint-disable MD033 MD013 -->
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://nextmv.io"><img src="https://cdn.prod.website-files.com/60dee0fad10d14c8ab66dd74/674628a824bc14307c1727aa_blog-prototype-p-2000.png" alt="Nextmv" width="45%"></a>
|
|
7
|
+
</p>
|
|
8
|
+
<p align="center">
|
|
9
|
+
<em>Nextmv: The home for all your optimization work</em>
|
|
10
|
+
</p>
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://pypi.org/project/nextmv" target="_blank">
|
|
13
|
+
<img src="https://img.shields.io/pypi/pyversions/nextmv.svg?color=%2334D058" alt="Supported Python versions">
|
|
14
|
+
</a>
|
|
15
|
+
<a href="https://pypi.org/project/nextmv" target="_blank">
|
|
16
|
+
<img src="https://img.shields.io/pypi/v/nextmv?color=%2334D058&label=nextmv" alt="Package version">
|
|
17
|
+
</a>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
<!-- markdownlint-enable MD033 MD013 -->
|
|
21
|
+
|
|
22
|
+
Welcome to `nextmv`, the general Python SDK for the Nextmv Platform.
|
|
23
|
+
|
|
24
|
+
📖 To learn more about the `nextmv`, visit the [docs][docs].
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
Requires Python `>=3.9`. Install using `pip`:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install nextmv
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Install all optional dependencies (recommended):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install "nextmv[all]"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
[docs]: https://nextmv-py.readthedocs.io/en/latest/nextmv/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "v0.28.1.dev0"
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
"""
|
|
19
|
+
|
|
20
|
+
from importlib import import_module
|
|
21
|
+
from typing import Any, Optional
|
|
22
|
+
|
|
23
|
+
from pydantic import BaseModel as PydanticBaseModel
|
|
24
|
+
|
|
25
|
+
|
|
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
|
+
"""
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def from_dict(cls, data: Optional[dict[str, Any]] = None):
|
|
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
|
+
"""
|
|
50
|
+
|
|
51
|
+
if data is None:
|
|
52
|
+
return None
|
|
53
|
+
|
|
54
|
+
return cls(**data)
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> dict[str, Any]:
|
|
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
|
+
"""
|
|
68
|
+
|
|
69
|
+
return self.model_dump(mode="json", exclude_none=True, by_alias=True)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def from_dict(data: dict[str, Any]) -> Any:
|
|
73
|
+
"""
|
|
74
|
+
Load a data model instance from a `dict` with associated class info.
|
|
75
|
+
|
|
76
|
+
Parameters
|
|
77
|
+
----------
|
|
78
|
+
data : dict[str, Any]
|
|
79
|
+
The data to load.
|
|
80
|
+
|
|
81
|
+
Returns
|
|
82
|
+
-------
|
|
83
|
+
Any
|
|
84
|
+
The loaded data model instance.
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
module = import_module(data["class"]["module"])
|
|
88
|
+
cls = getattr(module, data["class"]["name"])
|
|
89
|
+
|
|
90
|
+
return cls.from_dict(data["attributes"])
|
|
@@ -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
|