aceiot-models-cli 0.3.0__tar.gz → 0.3.2__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 (83) hide show
  1. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/CHANGELOG.md +19 -0
  2. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/PKG-INFO +1 -1
  3. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/pyproject.toml +1 -1
  4. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/cli.py +8 -15
  5. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/config.py +1 -1
  6. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/formatters.py +5 -4
  7. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/volttron_commands.py +10 -3
  8. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/tests/test_error_handling.py +17 -1
  9. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.github/workflows/publish.yml +0 -0
  10. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.github/workflows/test.yml +0 -0
  11. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.gitignore +0 -0
  12. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.hive-mind/config.json +0 -0
  13. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.hive-mind/hive.db +0 -0
  14. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.hive-mind/hive.db-shm +0 -0
  15. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.hive-mind/hive.db-wal +0 -0
  16. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.hive-mind/memory.db +0 -0
  17. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.hive-mind/sessions/session-1753211745508-yuylk957g-auto-save-1753211775510.json +0 -0
  18. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.hive-mind/sessions/session-1753218717423-518j1u7mc-auto-save-1753218747424.json +0 -0
  19. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.hive-mind/sessions/session-1753226483889-l6t8sliyv-auto-save-1753226513890.json +0 -0
  20. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.hive-mind/sessions/session-1753244606046-hwadu65zx-auto-save-1753244636047.json +0 -0
  21. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.hive-mind/sessions/session-1753281994715-c69q6r8uu-auto-save-1753282024716.json +0 -0
  22. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.hive-mind/sessions/session-1753300987160-kalws26dy-auto-save-1753301017161.json +0 -0
  23. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.pre-commit-config.yaml +0 -0
  24. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/.python-version +0 -0
  25. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/ACEIOT_MODELS_REQUIREMENTS.md +0 -0
  26. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/EXECUTIVE_SUMMARY.md +0 -0
  27. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/EXTRACTION_SUMMARY.md +0 -0
  28. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/IMPLEMENTATION_SUMMARY.md +0 -0
  29. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/IMPLEMENTATION_UPDATE_SUMMARY.md +0 -0
  30. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/LICENSE +0 -0
  31. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/MANIFEST.in +0 -0
  32. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/MISSING_FEATURES.md +0 -0
  33. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/NEW_USE_CASES.md +0 -0
  34. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/PYPI_SETUP.md +0 -0
  35. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/README.md +0 -0
  36. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/REFACTORING_COMPLETE.md +0 -0
  37. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/REPL_IMPLEMENTATION_SPECIFICATION.md +0 -0
  38. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/ROADMAP.md +0 -0
  39. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/TEST_PLAN.md +0 -0
  40. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/UX_SPECIFICATION_REPL_MODE.md +0 -0
  41. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/VOLTTRON_CLI_UX_DESIGN.md +0 -0
  42. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/VOLTTRON_DEPLOYMENT_USER_FLOW.md +0 -0
  43. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/VOLTTRON_DESIGN_SUMMARY.md +0 -0
  44. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/VOLTTRON_IMPLEMENTATION_SUMMARY.md +0 -0
  45. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/VOLTTRON_REPL_UX_DESIGN.md +0 -0
  46. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/ace-api-kit +0 -0
  47. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/adr_demo_container-2025-05-01-2025-07-14.csv +0 -0
  48. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover/README.md +0 -0
  49. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover/config +0 -0
  50. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover/conftest.py +0 -0
  51. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover/datamover/__init__.py +0 -0
  52. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover/datamover/agent.py +0 -0
  53. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover/setup.py +0 -0
  54. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover/tests/test_datamover.py +0 -0
  55. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover 3/README.md +0 -0
  56. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover 3/config +0 -0
  57. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover 3/conftest.py +0 -0
  58. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover 3/datamover/__init__.py +0 -0
  59. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover 3/datamover/agent.py +0 -0
  60. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover 3/setup.py +0 -0
  61. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/datamover 3/tests/test_datamover.py +0 -0
  62. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/example-config.yaml +0 -0
  63. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/__init__.py +0 -0
  64. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/repl/__init__.py +0 -0
  65. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/repl/context.py +0 -0
  66. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/repl/core.py +0 -0
  67. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/repl/executor.py +0 -0
  68. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/repl/parser.py +0 -0
  69. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/repl/volttron_repl.py +0 -0
  70. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/test_serializers.py +0 -0
  71. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/utils/__init__.py +0 -0
  72. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/src/aceiot_models_cli/utils/api_helpers.py +0 -0
  73. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/tests/__init__.py +0 -0
  74. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/tests/conftest.py +0 -0
  75. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/tests/test_cli.py +0 -0
  76. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/tests/test_client_commands.py +0 -0
  77. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/tests/test_config.py +0 -0
  78. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/tests/test_point_commands.py +0 -0
  79. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/tests/test_repl.py +0 -0
  80. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/tests/test_site_commands.py +0 -0
  81. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/tests/test_utils.py +0 -0
  82. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/tests/test_volttron_commands.py +0 -0
  83. {aceiot_models_cli-0.3.0 → aceiot_models_cli-0.3.2}/tests/test_volttron_directory_upload.py +0 -0
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.2] - 2025-07-26
9
+
10
+ ### Changed
11
+ - Code formatting improvements for consistency
12
+ - Minor code style updates to comply with project standards
13
+
14
+ ## [0.3.1] - 2025-07-25
15
+
16
+ ### Fixed
17
+ - Addressed all ruff linting issues (trailing whitespace, formatting)
18
+ - Fixed pyright type checking errors
19
+ - Resolved undefined variable issues in volttron commands
20
+ - Fixed type annotations for better type safety
21
+ - Updated error handling tests to match new client/gateway fallback logic
22
+
23
+ ### Changed
24
+ - Improved variable initialization to prevent runtime errors
25
+ - Enhanced type safety with proper type guards
26
+
8
27
  ## [0.3.0] - 2025-07-25
9
28
 
10
29
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aceiot-models-cli
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Command-line interface for ACE IoT Aerodrome API using aceiot-models package
5
5
  Project-URL: Homepage, https://github.com/ACE-IoT-Solutions/aceiot-models-cli
6
6
  Project-URL: Repository, https://github.com/ACE-IoT-Solutions/aceiot-models-cli
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "aceiot-models-cli"
3
- version = "0.3.0"
3
+ version = "0.3.2"
4
4
  description = "Command-line interface for ACE IoT Aerodrome API using aceiot-models package"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -7,13 +7,6 @@ from aceiot_models import (
7
7
  from aceiot_models.api import APIClient
8
8
  from click import Context
9
9
  from rich.console import Console
10
- from rich.progress import (
11
- BarColumn,
12
- MofNCompleteColumn,
13
- Progress,
14
- SpinnerColumn,
15
- TextColumn,
16
- )
17
10
 
18
11
  from .config import load_config
19
12
  from .formatters import format_json, format_table, print_error, print_success
@@ -376,16 +369,16 @@ def site_timeseries(
376
369
  # Need to determine format before creating default filename
377
370
  if format == "auto":
378
371
  format = "csv" # Default to CSV when no file specified
379
-
372
+
380
373
  # Clean up timestamps for filename (remove colons and timezone indicators)
381
374
  start_clean = start.replace(':', '-').replace('Z', '').replace('+', '_')
382
375
  end_clean = end.replace(':', '-').replace('Z', '').replace('+', '_')
383
-
376
+
384
377
  # Use appropriate extension based on format
385
378
  extension = ".parquet" if format == "parquet" else ".csv"
386
379
  output_file = f"{site_name}-{start_clean}-{end_clean}{extension}"
387
380
  console.print(f"[yellow]Using default output file: {output_file}[/yellow]")
388
-
381
+
389
382
  # Now handle the case where output_file was provided
390
383
  output_path = Path(output_file)
391
384
  if format == "auto" and output_file: # Only auto-detect if file was provided
@@ -400,7 +393,7 @@ def site_timeseries(
400
393
  if not output_path.suffix:
401
394
  output_path = output_path.with_suffix('.csv')
402
395
  output_file = str(output_path)
403
-
396
+
404
397
  # Ensure output_path is always a Path object
405
398
  output_path = Path(output_file)
406
399
 
@@ -428,12 +421,12 @@ def site_timeseries(
428
421
  # Get unique points from the data
429
422
  unique_points = {sample.get("name") for sample in all_samples if sample.get("name")}
430
423
  console.print(f"[green]✓ Fetched {len(all_samples)} data samples from {len(unique_points)} points[/green]")
431
-
424
+
432
425
  # If metadata is requested, fetch point details
433
426
  point_metadata = {}
434
427
  if include_metadata and unique_points:
435
428
  console.print("[cyan]Fetching point metadata...[/cyan]")
436
-
429
+
437
430
  # Get site points to extract metadata
438
431
  all_points = []
439
432
  page = 1
@@ -442,11 +435,11 @@ def site_timeseries(
442
435
  result = client.get_site_points(site_name, page=page, per_page=500)
443
436
  items = result.get("items", [])
444
437
  all_points.extend(items)
445
-
438
+
446
439
  if page >= result.get("pages", 1):
447
440
  break
448
441
  page += 1
449
-
442
+
450
443
  # Build metadata map
451
444
  for point in all_points:
452
445
  if point.get("name") in unique_points:
@@ -132,7 +132,7 @@ def init_config(api_key: str | None = None, api_url: str | None = None) -> None:
132
132
  )
133
133
 
134
134
  # Create config
135
- config = Config(api_url=api_url, api_key=api_key)
135
+ config = Config(api_url=api_url or "https://flightdeck.aceiot.cloud/api", api_key=api_key)
136
136
 
137
137
  # Save config
138
138
  save_config(config)
@@ -100,9 +100,10 @@ def truncate_string(text: str, max_length: int = 50, suffix: str = "...") -> str
100
100
 
101
101
  def format_size(size_bytes: int) -> str:
102
102
  """Format byte size as human-readable string."""
103
+ size = float(size_bytes)
103
104
  for unit in ["B", "KB", "MB", "GB", "TB"]:
104
- if size_bytes < 1024.0:
105
- return f"{size_bytes:.1f} {unit}"
106
- size_bytes /= 1024.0
105
+ if size < 1024.0:
106
+ return f"{size:.1f} {unit}"
107
+ size /= 1024.0
107
108
 
108
- return f"{size_bytes:.1f} PB"
109
+ return f"{size:.1f} PB"
@@ -127,7 +127,7 @@ def upload_agent(
127
127
  """Upload a Volttron agent package to a client.
128
128
 
129
129
  The package is uploaded to the specified client. If a gateway name is provided,
130
- the client that owns that gateway will be used. Packages are shared across
130
+ the client that owns that gateway will be used. Packages are shared across
131
131
  all gateways belonging to the same client.
132
132
 
133
133
  Directories are automatically compressed to tar.gz format before upload.
@@ -314,6 +314,9 @@ def create_config(
314
314
  if not name:
315
315
  name = file_path.stem
316
316
 
317
+ # Read configuration file
318
+ content = file_path.read_text()
319
+
317
320
  # Validate configuration if requested
318
321
  if validate:
319
322
  console.print("Validating configuration...")
@@ -322,7 +325,6 @@ def create_config(
322
325
 
323
326
  import yaml
324
327
 
325
- content = file_path.read_text()
326
328
  if file_path.suffix in ['.yaml', '.yml']:
327
329
  yaml.safe_load(content)
328
330
  else:
@@ -467,7 +469,7 @@ def deploy(
467
469
  )
468
470
 
469
471
  config_name = "default"
470
- config_data = None
472
+ config_data = "" # Initialize as empty string
471
473
 
472
474
  if config_choice == "custom":
473
475
  config_name = click.prompt("Configuration name")
@@ -572,6 +574,11 @@ def deploy(
572
574
 
573
575
  try:
574
576
  with console.status("Creating deployment...", spinner="dots"):
577
+ # Ensure we have at least volttron_agent data
578
+ if not volttron_agent_data:
579
+ print_error("Volttron agent data is required")
580
+ ctx.exit(1)
581
+
575
582
  result = client.create_gateway_volttron_agent_config_package(
576
583
  gateway,
577
584
  volttron_agent=volttron_agent_data,
@@ -43,6 +43,21 @@ class TestErrorHandling:
43
43
  status_code=404,
44
44
  response_data={"detail": "Gateway 'nonexistent-gateway' not found"}
45
45
  )
46
+
47
+ # Since the code now falls back to treating it as a client name,
48
+ # we need to mock the client upload to also fail
49
+ mock_client.get_client.side_effect = APIError(
50
+ "API request failed",
51
+ status_code=404,
52
+ response_data={"detail": "Client 'nonexistent-gateway' not found"}
53
+ )
54
+
55
+ # Or we can make the upload fail
56
+ mock_client.upload_client_volttron_agent_package.side_effect = APIError(
57
+ "API request failed",
58
+ status_code=404,
59
+ response_data={"detail": "Client 'nonexistent-gateway' not found"}
60
+ )
46
61
 
47
62
  runner = CliRunner()
48
63
  with runner.isolated_filesystem():
@@ -62,7 +77,8 @@ class TestErrorHandling:
62
77
  )
63
78
 
64
79
  assert result.exit_code == 1
65
- assert "Failed to get gateway info: Gateway 'nonexistent-gateway' not found" in result.output
80
+ # The error message should now be about upload failure since it falls back to client
81
+ assert "Upload failed: Client 'nonexistent-gateway' not found" in result.output
66
82
 
67
83
  @patch('aceiot_models_cli.volttron_commands.require_api_client')
68
84
  def test_list_packages_client_not_found(self, mock_require_client):