nextmv 0.29.2.dev3__tar.gz → 0.29.3__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.
Files changed (65) hide show
  1. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/PKG-INFO +1 -1
  2. nextmv-0.29.3/nextmv/__about__.py +1 -0
  3. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/output.py +3 -1
  4. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/test_output.py +19 -19
  5. nextmv-0.29.2.dev3/nextmv/__about__.py +0 -1
  6. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/.gitignore +0 -0
  7. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/LICENSE +0 -0
  8. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/README.md +0 -0
  9. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/__entrypoint__.py +0 -0
  10. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/__init__.py +0 -0
  11. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/_serialization.py +0 -0
  12. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/base_model.py +0 -0
  13. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/__init__.py +0 -0
  14. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/acceptance_test.py +0 -0
  15. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/account.py +0 -0
  16. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/application.py +0 -0
  17. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/batch_experiment.py +0 -0
  18. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/client.py +0 -0
  19. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/input_set.py +0 -0
  20. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/instance.py +0 -0
  21. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/manifest.py +0 -0
  22. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/package.py +0 -0
  23. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/run.py +0 -0
  24. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/safe.py +0 -0
  25. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/scenario.py +0 -0
  26. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/secrets.py +0 -0
  27. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/status.py +0 -0
  28. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/cloud/version.py +0 -0
  29. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/deprecated.py +0 -0
  30. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/input.py +0 -0
  31. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/logger.py +0 -0
  32. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/model.py +0 -0
  33. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/nextmv/options.py +0 -0
  34. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/pyproject.toml +0 -0
  35. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/__init__.py +0 -0
  36. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/cloud/__init__.py +0 -0
  37. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/cloud/app.yaml +0 -0
  38. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/cloud/test_application.py +0 -0
  39. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/cloud/test_client.py +0 -0
  40. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/cloud/test_manifest.py +0 -0
  41. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/cloud/test_package.py +0 -0
  42. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/cloud/test_run.py +0 -0
  43. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/cloud/test_safe_name_id.py +0 -0
  44. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/cloud/test_scenario.py +0 -0
  45. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/scripts/__init__.py +0 -0
  46. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/scripts/options1.py +0 -0
  47. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/scripts/options2.py +0 -0
  48. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/scripts/options3.py +0 -0
  49. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/scripts/options4.py +0 -0
  50. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/scripts/options5.py +0 -0
  51. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/scripts/options6.py +0 -0
  52. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/scripts/options7.py +0 -0
  53. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/scripts/options_deprecated.py +0 -0
  54. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/test_base_model.py +0 -0
  55. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/test_entrypoint/__init__.py +0 -0
  56. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/test_entrypoint/test_entrypoint.py +0 -0
  57. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/test_input.py +0 -0
  58. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/test_inputs/test_data.csv +0 -0
  59. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/test_inputs/test_data.json +0 -0
  60. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/test_inputs/test_data.txt +0 -0
  61. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/test_logger.py +0 -0
  62. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/test_model.py +0 -0
  63. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/test_options.py +0 -0
  64. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/test_serialization.py +0 -0
  65. {nextmv-0.29.2.dev3 → nextmv-0.29.3}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nextmv
3
- Version: 0.29.2.dev3
3
+ Version: 0.29.3
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/
@@ -0,0 +1 @@
1
+ __version__ = "v0.29.3"
@@ -1330,7 +1330,9 @@ class LocalOutputWriter(OutputWriter):
1330
1330
  if not os.path.exists(final_dir):
1331
1331
  os.makedirs(final_dir)
1332
1332
 
1333
- serialized = serialize_json(element, json_configurations=json_configurations)
1333
+ keyed_element = {element_key: element} # The element is expected behind its key.
1334
+
1335
+ serialized = serialize_json(keyed_element, json_configurations=json_configurations)
1334
1336
 
1335
1337
  with open(os.path.join(final_dir, f"{element_key}.json"), "w", encoding="utf-8") as file:
1336
1338
  file.write(serialized + "\n")
@@ -1058,9 +1058,9 @@ class TestOutput(unittest.TestCase):
1058
1058
  # Verify statistics content
1059
1059
  with open(stats_path) as f:
1060
1060
  stats_content = json.loads(f.read())
1061
- self.assertEqual(stats_content["run"]["duration"], 15.5)
1062
- self.assertEqual(stats_content["run"]["iterations"], 100)
1063
- self.assertEqual(stats_content["result"]["value"], 42.0)
1061
+ self.assertEqual(stats_content["statistics"]["run"]["duration"], 15.5)
1062
+ self.assertEqual(stats_content["statistics"]["run"]["iterations"], 100)
1063
+ self.assertEqual(stats_content["statistics"]["result"]["value"], 42.0)
1064
1064
 
1065
1065
  finally:
1066
1066
  if os.path.exists(test_dir):
@@ -1095,9 +1095,9 @@ class TestOutput(unittest.TestCase):
1095
1095
  # Verify statistics content
1096
1096
  with open(stats_path) as f:
1097
1097
  stats_content = json.loads(f.read())
1098
- self.assertEqual(stats_content["custom_metric"], 123.45)
1099
- self.assertEqual(stats_content["total_processed"], 1000)
1100
- self.assertEqual(stats_content["success_rate"], 0.95)
1098
+ self.assertEqual(stats_content["statistics"]["custom_metric"], 123.45)
1099
+ self.assertEqual(stats_content["statistics"]["total_processed"], 1000)
1100
+ self.assertEqual(stats_content["statistics"]["success_rate"], 0.95)
1101
1101
 
1102
1102
  finally:
1103
1103
  if os.path.exists(test_dir):
@@ -1148,10 +1148,10 @@ class TestOutput(unittest.TestCase):
1148
1148
  # Verify assets content
1149
1149
  with open(assets_path) as f:
1150
1150
  assets_content = json.loads(f.read())
1151
- self.assertEqual(len(assets_content), 2)
1151
+ self.assertEqual(len(assets_content["assets"]), 2)
1152
1152
 
1153
1153
  # Check first asset
1154
- asset1 = assets_content[0]
1154
+ asset1 = assets_content["assets"][0]
1155
1155
  self.assertEqual(asset1["name"], "chart_data")
1156
1156
  self.assertEqual(asset1["content"]["type"], "bar")
1157
1157
  self.assertEqual(asset1["description"], "Chart visualization data")
@@ -1159,7 +1159,7 @@ class TestOutput(unittest.TestCase):
1159
1159
  self.assertEqual(asset1["visual"]["label"], "Performance Chart")
1160
1160
 
1161
1161
  # Check second asset
1162
- asset2 = assets_content[1]
1162
+ asset2 = assets_content["assets"][1]
1163
1163
  self.assertEqual(asset2["name"], "summary_table")
1164
1164
  self.assertEqual(asset2["content"]["headers"], ["Metric", "Value"])
1165
1165
  self.assertNotIn("visual", asset2)
@@ -1211,16 +1211,16 @@ class TestOutput(unittest.TestCase):
1211
1211
  # Verify assets content
1212
1212
  with open(assets_path) as f:
1213
1213
  assets_content = json.loads(f.read())
1214
- self.assertEqual(len(assets_content), 2)
1214
+ self.assertEqual(len(assets_content["assets"]), 2)
1215
1215
 
1216
1216
  # Check first asset
1217
- asset1 = assets_content[0]
1217
+ asset1 = assets_content["assets"][0]
1218
1218
  self.assertEqual(asset1["name"], "performance_metrics")
1219
1219
  self.assertEqual(asset1["content"]["cpu_usage"], 45.2)
1220
1220
  self.assertEqual(asset1["description"], "System performance metrics")
1221
1221
 
1222
1222
  # Check second asset with visual
1223
- asset2 = assets_content[1]
1223
+ asset2 = assets_content["assets"][1]
1224
1224
  self.assertEqual(asset2["name"], "optimization_trace")
1225
1225
  self.assertEqual(asset2["visual"]["schema"], "chartjs")
1226
1226
  self.assertEqual(asset2["visual"]["label"], "Convergence Plot")
@@ -1309,19 +1309,19 @@ class TestOutput(unittest.TestCase):
1309
1309
  self.assertTrue(os.path.exists(stats_path))
1310
1310
  with open(stats_path) as f:
1311
1311
  stats_content = json.loads(f.read())
1312
- self.assertEqual(stats_content["run"]["duration"], 120.0)
1313
- self.assertEqual(stats_content["run"]["iterations"], 500)
1314
- self.assertEqual(stats_content["result"]["value"], 150.5)
1312
+ self.assertEqual(stats_content["statistics"]["run"]["duration"], 120.0)
1313
+ self.assertEqual(stats_content["statistics"]["run"]["iterations"], 500)
1314
+ self.assertEqual(stats_content["statistics"]["result"]["value"], 150.5)
1315
1315
 
1316
1316
  # Verify assets file
1317
1317
  assets_path = os.path.join(test_dir, "assets", "assets.json")
1318
1318
  self.assertTrue(os.path.exists(assets_path))
1319
1319
  with open(assets_path) as f:
1320
1320
  assets_content = json.loads(f.read())
1321
- self.assertEqual(len(assets_content), 2)
1322
- self.assertEqual(assets_content[0]["name"], "route_visualization")
1323
- self.assertEqual(assets_content[0]["visual"]["schema"], "chartjs")
1324
- self.assertEqual(assets_content[1]["name"], "convergence_data")
1321
+ self.assertEqual(len(assets_content["assets"]), 2)
1322
+ self.assertEqual(assets_content["assets"][0]["name"], "route_visualization")
1323
+ self.assertEqual(assets_content["assets"][0]["visual"]["schema"], "chartjs")
1324
+ self.assertEqual(assets_content["assets"][1]["name"], "convergence_data")
1325
1325
 
1326
1326
  # Verify solution file contents
1327
1327
  with open(os.path.join(test_dir, "solutions", "optimization_result.json")) as f:
@@ -1 +0,0 @@
1
- __version__ = "v0.29.2.dev3"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes