nextmv 1.0.0.dev6__py3-none-any.whl → 1.0.0.dev7__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 CHANGED
@@ -1 +1 @@
1
- __version__ = "v1.0.0.dev6"
1
+ __version__ = "v1.0.0.dev7"
@@ -9,6 +9,7 @@ import requests
9
9
  from nextmv.cloud.acceptance_test import AcceptanceTest, Metric
10
10
  from nextmv.cloud.batch_experiment import BatchExperimentRun, ExperimentStatus
11
11
  from nextmv.polling import DEFAULT_POLLING_OPTIONS, PollingOptions, poll
12
+ from nextmv.safe import safe_id
12
13
 
13
14
  if TYPE_CHECKING:
14
15
  from . import Application
@@ -163,8 +164,8 @@ class ApplicationAcceptanceMixin:
163
164
  self: "Application",
164
165
  candidate_instance_id: str,
165
166
  baseline_instance_id: str,
166
- id: str,
167
167
  metrics: list[Metric | dict[str, Any]],
168
+ id: str | None = None,
168
169
  name: str | None = None,
169
170
  input_set_id: str | None = None,
170
171
  description: str | None = None,
@@ -185,8 +186,8 @@ class ApplicationAcceptanceMixin:
185
186
  ID of the candidate instance.
186
187
  baseline_instance_id : str
187
188
  ID of the baseline instance.
188
- id : str
189
- ID of the acceptance test.
189
+ id : str | None, default=None
190
+ ID of the acceptance test. Will be generated if not provided.
190
191
  metrics : list[Union[Metric, dict[str, Any]]]
191
192
  List of metrics to use for the acceptance test.
192
193
  name : Optional[str], default=None
@@ -210,6 +211,11 @@ class ApplicationAcceptanceMixin:
210
211
  If the batch experiment ID does not match the acceptance test ID.
211
212
  """
212
213
 
214
+ # Generate ID if not provided
215
+ if id is None or id == "":
216
+ id = safe_id("acceptance")
217
+
218
+ # Use ID as name if name not provided
213
219
  if name is None or name == "":
214
220
  name = id
215
221
 
@@ -265,11 +271,10 @@ class ApplicationAcceptanceMixin:
265
271
  "metrics": payload_metrics,
266
272
  "experiment_id": batch_experiment_id,
267
273
  "name": name,
274
+ "id": id,
268
275
  }
269
276
  if description is not None:
270
277
  payload["description"] = description
271
- if id is not None:
272
- payload["id"] = id
273
278
 
274
279
  response = self.client.request(
275
280
  method="POST",
@@ -283,8 +288,8 @@ class ApplicationAcceptanceMixin:
283
288
  self: "Application",
284
289
  candidate_instance_id: str,
285
290
  baseline_instance_id: str,
286
- id: str,
287
291
  metrics: list[Metric | dict[str, Any]],
292
+ id: str | None = None,
288
293
  name: str | None = None,
289
294
  input_set_id: str | None = None,
290
295
  description: str | None = None,
@@ -302,8 +307,8 @@ class ApplicationAcceptanceMixin:
302
307
  ID of the candidate instance.
303
308
  baseline_instance_id : str
304
309
  ID of the baseline instance.
305
- id : str
306
- ID of the acceptance test.
310
+ id : str | None, default=None
311
+ ID of the acceptance test. Will be generated if not provided.
307
312
  metrics : list[Union[Metric, dict[str, Any]]]
308
313
  List of metrics to use for the acceptance test.
309
314
  name : Optional[str], default=None
@@ -217,7 +217,7 @@ class ApplicationSwitchbackMixin:
217
217
  payload = {
218
218
  "id": switchback_test_id,
219
219
  "name": name,
220
- "comparison": comparison,
220
+ "comparison": comparison.to_dict(),
221
221
  "generate_random_plan": {
222
222
  "unit_duration_minutes": unit_duration_minutes,
223
223
  "units": units,
@@ -225,12 +225,12 @@ class Integration(BaseModel):
225
225
  def new( # noqa: C901
226
226
  cls,
227
227
  client: Client,
228
- name: str,
229
228
  integration_type: IntegrationType | str,
230
229
  exec_types: list[ManifestType | str],
231
230
  provider: IntegrationProvider | str,
232
231
  provider_config: dict[str, Any],
233
232
  integration_id: str | None = None,
233
+ name: str | None = None,
234
234
  description: str | None = None,
235
235
  is_global: bool = False,
236
236
  application_ids: list[str] | None = None,
@@ -243,8 +243,6 @@ class Integration(BaseModel):
243
243
  ----------
244
244
  client : Client
245
245
  Client to use for interacting with the Nextmv Cloud API.
246
- name : str
247
- The name of the integration.
248
246
  integration_type : IntegrationType | str
249
247
  The type of the integration. Please refer to the `IntegrationType`
250
248
  enum for possible values.
@@ -259,6 +257,9 @@ class Integration(BaseModel):
259
257
  integration_id : str, optional
260
258
  The unique identifier of the integration. If not provided,
261
259
  it will be generated automatically.
260
+ name : str | None, optional
261
+ The name of the integration. If not provided, the integration ID
262
+ will be used as the name.
262
263
  description : str, optional
263
264
  An optional description of the integration.
264
265
  is_global : bool, optional, default=False
@@ -302,8 +303,10 @@ class Integration(BaseModel):
302
303
  elif not is_global and application_ids is None:
303
304
  raise ValueError("A non-global integration must have specific application IDs.")
304
305
 
305
- if integration_id is None:
306
+ if integration_id is None or integration_id == "":
306
307
  integration_id = safe_id("integration")
308
+ if name is None or name == "":
309
+ name = integration_id
307
310
 
308
311
  if exist_ok:
309
312
  try:
@@ -45,6 +45,8 @@ class TestComparisonSingle(BaseModel):
45
45
  ID of the candidate instance for comparison.
46
46
  """
47
47
 
48
+ __test__ = False # Prevents pytest from collecting this class as a test case
49
+
48
50
  baseline_instance_id: str
49
51
  """ID of the baseline instance for comparison."""
50
52
  candidate_instance_id: str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nextmv
3
- Version: 1.0.0.dev6
3
+ Version: 1.0.0.dev7
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://nextmv-py.docs.nextmv.io/en/latest/nextmv/
@@ -230,7 +230,7 @@ Provides-Extra: dev
230
230
  Requires-Dist: build>=1.0.3; extra == 'dev'
231
231
  Requires-Dist: folium>=0.20.0; extra == 'dev'
232
232
  Requires-Dist: mlflow>=2.19.0; extra == 'dev'
233
- Requires-Dist: nextpipe>=0.6.0.dev0; extra == 'dev'
233
+ Requires-Dist: nextpipe>=0.6.0; extra == 'dev'
234
234
  Requires-Dist: nextroute>=1.11.1; extra == 'dev'
235
235
  Requires-Dist: openpyxl>=3.1.5; extra == 'dev'
236
236
  Requires-Dist: pandas>=2.2.3; extra == 'dev'
@@ -1,4 +1,4 @@
1
- nextmv/__about__.py,sha256=guKp6r4S1rrHqbewcdYicE2J11aLul9T0IzxX78PTHg,28
1
+ nextmv/__about__.py,sha256=Fz6mkeJ5B6FYwEl4VTeOlcxzHJMSpJh63kWjeWhwUrs,28
2
2
  nextmv/__entrypoint__.py,sha256=XMT-ds1f2Yc6KoI2C0YEH-rJj5gVLfJMqUdRfcA3_KQ,1070
3
3
  nextmv/__init__.py,sha256=LwpGBSiV0UG13zKHO2N3Ikb7bCMV08Gfbl6Cp80b_2g,3813
4
4
  nextmv/_serialization.py,sha256=jYitMS1MU8ldsmObT-K_8V8P2Wx69tnDiEHCCgPGun4,2834
@@ -142,16 +142,16 @@ nextmv/cloud/community.py,sha256=LSiKF5agLTHFbW5fBAv-m3MsWm3XuROpw4_KkPpwtZM,130
142
142
  nextmv/cloud/ensemble.py,sha256=_hKPjSLtuGH1xGG70ZBsmY_IL5XinZqVHHwBxtX9Omw,8570
143
143
  nextmv/cloud/input_set.py,sha256=wsLmMI1C7BslWDN5j1RnVUA8z54-Hq1eLG9bkzyqafo,4187
144
144
  nextmv/cloud/instance.py,sha256=rLrgNNvNyC6hZtjxIfTR2Luylmbh2emJIZVCy_hTJZ4,5495
145
- nextmv/cloud/integration.py,sha256=S4BNX3GFGNA1SXDWaRAUeS0hW6XkYXWSdWXX-s-x_nA,18112
145
+ nextmv/cloud/integration.py,sha256=ce8TWOw_xIXxf8tzqHNriPmJ2dRA9v2EZSXnWZEvWVk,18314
146
146
  nextmv/cloud/package.py,sha256=88XSJ15QGcHboNJAw2hGowiLKBu2O2nV5ZieZFx7XDI,17133
147
147
  nextmv/cloud/scenario.py,sha256=1_4PI9ehYaSonEe_l59cFhZNmqQ_brXXP6-mVq9i8a8,14183
148
148
  nextmv/cloud/secrets.py,sha256=fA5cX0jfTsPVZWV7433wzETGlXpWRLHGswuObx9e6FQ,6820
149
149
  nextmv/cloud/shadow.py,sha256=U-s9alkDS3wmYCEVDKEvuceveWOZOiF7rkH4_8eKdNk,7711
150
- nextmv/cloud/switchback.py,sha256=AGA0LDMu7sHndczy2TrcZghn_ZRnTGlBDmGRZG34dZY,7344
150
+ nextmv/cloud/switchback.py,sha256=6e4J5zCewgGaitB5iJiO3u6BPHcAlzdAB5WU8j2b4K8,7427
151
151
  nextmv/cloud/url.py,sha256=Fz70ywkWdCLmP21ZBmJwZi5kDbjpmsX_VlwVF_xQeHg,1836
152
152
  nextmv/cloud/version.py,sha256=5_S7_pWUVBFbvAArku20eK7S645GJcHtgE2OpXLdSzQ,5300
153
153
  nextmv/cloud/application/__init__.py,sha256=x9khEFlWUdupBxzMuSyrCftopNtrK64LTTEaCRSRwyM,32712
154
- nextmv/cloud/application/_acceptance.py,sha256=ZwbVkur3-1fwM_L4F8ZUqrNaIdHgYGxKd3utoOCWjSc,13679
154
+ nextmv/cloud/application/_acceptance.py,sha256=PEkf9cDunK40UNw96QBhpJpH5SOFLZMtmnyX84uAo9k,13974
155
155
  nextmv/cloud/application/_batch_scenario.py,sha256=cSsX5vPOkm91UqRBPIcqlOvQ0iojwt4sQKYGZEE7x6k,28479
156
156
  nextmv/cloud/application/_ensemble.py,sha256=05l9uR0hTnW8nQjhRzjd2TPfvCoaAqNddWP-aVRL5rg,7666
157
157
  nextmv/cloud/application/_input_set.py,sha256=BXleeHOClCkwOh53vG6F_561XzAo_XgrHfGmNbJxIds,8131
@@ -160,7 +160,7 @@ nextmv/cloud/application/_managed_input.py,sha256=zaWqGpe8Y5XWheroAqZSo-xNHfn2MK
160
160
  nextmv/cloud/application/_run.py,sha256=4lrxyQCUGJszdiYNGynYg6RXBPqjQ4tFcDmxH9dfSXY,53869
161
161
  nextmv/cloud/application/_secrets.py,sha256=hWhPAyY8aDF8zlEz9opPNLrFOYtp-COFqG_jgOZ6VxI,9476
162
162
  nextmv/cloud/application/_shadow.py,sha256=ck1v0yBuayGnlLlq5pEIwNQOE3wU29m9jsx8II7MxqQ,9327
163
- nextmv/cloud/application/_switchback.py,sha256=QLL1PVtVY_hjVJA4p-9fATDXptjhJzR0xhyQpwKoORg,9984
163
+ nextmv/cloud/application/_switchback.py,sha256=MbB9MVlBUeQkm_xekRC56bgEdcIFKmFnLPtfMXGLItI,9994
164
164
  nextmv/cloud/application/_utils.py,sha256=GqksGBHCV2sc-itL6hlWnncUJjIxhw6LH3pOjs4M-us,1643
165
165
  nextmv/cloud/application/_version.py,sha256=o1jVLfoKJNCs-32P7hkL1IGba8Eb1hnT6vnaZpyc0dk,8543
166
166
  nextmv/default_app/.gitignore,sha256=gsfnfXMYNt-YTroh5hAzauwBZoPDJ6D_fB17rMSnIko,8
@@ -178,8 +178,8 @@ nextmv/local/geojson_handler.py,sha256=7FavJdkUonop-yskjis0x3qFGB8A5wZyoBUblw-bV
178
178
  nextmv/local/local.py,sha256=cp56UpI8h19Ob6Jvb_Ni0ceXH5Vv3ET_iPTDe6ftq3Y,2617
179
179
  nextmv/local/plotly_handler.py,sha256=bLb50e3AkVr_W-F6S7lXfeRdN60mG2jk3UElNmhoMWU,1930
180
180
  nextmv/local/runner.py,sha256=bM1dFIAG4f9pEtbyevzkRa9nSppqTeD8naomNzJVBRU,8560
181
- nextmv-1.0.0.dev6.dist-info/METADATA,sha256=-HLolADVOi3qsf9EFtOWpT7tqweuqBiWb4WDZzplmjU,16581
182
- nextmv-1.0.0.dev6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
183
- nextmv-1.0.0.dev6.dist-info/entry_points.txt,sha256=bH7kXUt_IOLpeW_O7Z-J2gALs2YYJ4CmWuzS8MdK6uY,48
184
- nextmv-1.0.0.dev6.dist-info/licenses/LICENSE,sha256=ZIbK-sSWA-OZprjNbmJAglYRtl5_K4l9UwAV3PGJAPc,11349
185
- nextmv-1.0.0.dev6.dist-info/RECORD,,
181
+ nextmv-1.0.0.dev7.dist-info/METADATA,sha256=4Q4VmDr3z1sztAQ7YtA-6I4jYWnu1DyZaPrxNRXB0EM,16576
182
+ nextmv-1.0.0.dev7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
183
+ nextmv-1.0.0.dev7.dist-info/entry_points.txt,sha256=bH7kXUt_IOLpeW_O7Z-J2gALs2YYJ4CmWuzS8MdK6uY,48
184
+ nextmv-1.0.0.dev7.dist-info/licenses/LICENSE,sha256=ZIbK-sSWA-OZprjNbmJAglYRtl5_K4l9UwAV3PGJAPc,11349
185
+ nextmv-1.0.0.dev7.dist-info/RECORD,,