sima-cli 0.0.12__tar.gz → 0.0.13__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 (44) hide show
  1. {sima_cli-0.0.12/sima_cli.egg-info → sima_cli-0.0.13}/PKG-INFO +2 -2
  2. {sima_cli-0.0.12 → sima_cli-0.0.13}/pyproject.toml +2 -2
  3. {sima_cli-0.0.12 → sima_cli-0.0.13}/setup.cfg +1 -1
  4. {sima_cli-0.0.12 → sima_cli-0.0.13}/setup.py +1 -1
  5. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/__version__.py +1 -1
  6. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/cli.py +6 -0
  7. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/update/local.py +2 -2
  8. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/update/remote.py +2 -1
  9. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/utils/artifactory.py +1 -0
  10. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/utils/config_loader.py +10 -0
  11. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/utils/env.py +3 -2
  12. {sima_cli-0.0.12 → sima_cli-0.0.13/sima_cli.egg-info}/PKG-INFO +2 -2
  13. {sima_cli-0.0.12 → sima_cli-0.0.13}/LICENSE +0 -0
  14. {sima_cli-0.0.12 → sima_cli-0.0.13}/MANIFEST.in +0 -0
  15. {sima_cli-0.0.12 → sima_cli-0.0.13}/README.md +0 -0
  16. {sima_cli-0.0.12 → sima_cli-0.0.13}/requirements.txt +0 -0
  17. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/__init__.py +0 -0
  18. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/__main__.py +0 -0
  19. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/app_zoo/__init__.py +0 -0
  20. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/app_zoo/app.py +0 -0
  21. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/auth/__init__.py +0 -0
  22. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/auth/login.py +0 -0
  23. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/download/__init__.py +0 -0
  24. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/download/downloader.py +0 -0
  25. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/model_zoo/__init__.py +0 -0
  26. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/model_zoo/model.py +0 -0
  27. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/update/__init__.py +0 -0
  28. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/update/updater.py +0 -0
  29. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/utils/__init__.py +0 -0
  30. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/utils/config.py +0 -0
  31. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli/utils/network.py +0 -0
  32. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli.egg-info/SOURCES.txt +0 -0
  33. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli.egg-info/dependency_links.txt +0 -0
  34. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli.egg-info/entry_points.txt +0 -0
  35. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli.egg-info/requires.txt +0 -0
  36. {sima_cli-0.0.12 → sima_cli-0.0.13}/sima_cli.egg-info/top_level.txt +0 -0
  37. {sima_cli-0.0.12 → sima_cli-0.0.13}/tests/__init__.py +0 -0
  38. {sima_cli-0.0.12 → sima_cli-0.0.13}/tests/test_app_zoo.py +0 -0
  39. {sima_cli-0.0.12 → sima_cli-0.0.13}/tests/test_auth.py +0 -0
  40. {sima_cli-0.0.12 → sima_cli-0.0.13}/tests/test_cli.py +0 -0
  41. {sima_cli-0.0.12 → sima_cli-0.0.13}/tests/test_download.py +0 -0
  42. {sima_cli-0.0.12 → sima_cli-0.0.13}/tests/test_firmware.py +0 -0
  43. {sima_cli-0.0.12 → sima_cli-0.0.13}/tests/test_model_zoo.py +0 -0
  44. {sima_cli-0.0.12 → sima_cli-0.0.13}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sima-cli
3
- Version: 0.0.12
3
+ Version: 0.0.13
4
4
  Summary: CLI tool for SiMa Developer Portal to download models, firmware, and apps.
5
5
  Home-page: https://developer.sima.ai/
6
6
  Author: SiMa.ai
@@ -13,7 +13,7 @@ Classifier: Development Status :: 3 - Alpha
13
13
  Classifier: Intended Audience :: Developers
14
14
  Classifier: Topic :: Software Development :: Build Tools
15
15
  Classifier: Environment :: Console
16
- Requires-Python: >=3.10
16
+ Requires-Python: >=3.8
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  Requires-Dist: requests
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sima-cli"
7
- version = "0.0.12"
7
+ version = "0.0.13"
8
8
  description = "CLI tool for SiMa Developer Portal to download models, firmware, and apps."
9
9
  readme = "README.md"
10
- requires-python = ">=3.10"
10
+ requires-python = ">=3.8"
11
11
  license = "MIT"
12
12
  authors = [
13
13
  { name="Sima.ai", email="support@sima.ai" }
@@ -17,7 +17,7 @@ classifiers =
17
17
 
18
18
  [options]
19
19
  packages = find:
20
- python_requires = >=3.10
20
+ python_requires = >=3.8
21
21
  install_requires =
22
22
  click
23
23
  requests
@@ -23,5 +23,5 @@ setup(
23
23
  "sima-cli=sima_cli.__main__:main"
24
24
  ]
25
25
  },
26
- python_requires=">=3.10",
26
+ python_requires=">=3.8",
27
27
  )
@@ -1,2 +1,2 @@
1
1
  # sima_cli/__version__.py
2
- __version__ = "0.0.12"
2
+ __version__ = "0.0.13"
@@ -3,6 +3,7 @@ import click
3
3
  from sima_cli.utils.env import get_environment_type
4
4
  from sima_cli.update.updater import perform_update
5
5
  from sima_cli.model_zoo.model import list_models, download_model
6
+ from sima_cli.utils.config_loader import internal_resource_exists
6
7
 
7
8
  # Entry point for the CLI tool using Click's command group decorator
8
9
  @click.group()
@@ -21,6 +22,11 @@ def main(ctx, internal):
21
22
  if not internal:
22
23
  internal = os.getenv("SIMA_CLI_INTERNAL", "0") in ("1", "true", "yes")
23
24
 
25
+ if internal and not internal_resource_exists():
26
+ click.echo("❌ You have specified -i or --internal argument to access internal resources, but you do not have an internal resource map configured.")
27
+ click.echo("Refer to the confluence page to find out how to configure internal resource map.")
28
+ exit(0)
29
+
24
30
  ctx.obj["internal"] = internal
25
31
 
26
32
  from sima_cli.utils.env import get_environment_type
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  import subprocess
3
3
  import tempfile
4
- from typing import List
4
+ from typing import List, Tuple
5
5
  import pty
6
6
  import click
7
7
 
@@ -44,7 +44,7 @@ def _run_local_cmd(command: str, passwd: str) -> bool:
44
44
  return False
45
45
 
46
46
 
47
- def get_local_board_info() -> tuple[str, str]:
47
+ def get_local_board_info() -> Tuple[str, str]:
48
48
  """
49
49
  Retrieve the local board type and build version by reading /etc/build.
50
50
 
@@ -7,6 +7,7 @@ import itertools
7
7
  import threading
8
8
  import sys
9
9
  import select
10
+ from typing import Tuple
10
11
 
11
12
  DEFAULT_USER = "sima"
12
13
  DEFAULT_PASSWORD = "edgeai"
@@ -50,7 +51,7 @@ def _wait_for_ssh(ip: str, timeout: int = 120):
50
51
  else:
51
52
  print("\r✅ Board is online! \n")
52
53
 
53
- def get_remote_board_info(ip: str, passwd: str = DEFAULT_PASSWORD) -> tuple[str, str]:
54
+ def get_remote_board_info(ip: str, passwd: str = DEFAULT_PASSWORD) -> Tuple[str, str]:
54
55
  """
55
56
  Connect to the remote board and retrieve board type and build version.
56
57
 
@@ -1,4 +1,5 @@
1
1
  import requests
2
+ import logging
2
3
  from typing import Optional, Tuple
3
4
 
4
5
  def exchange_identity_token(
@@ -28,3 +28,13 @@ def load_resource_config():
28
28
  config["internal"] = yaml.safe_load(f) or {}
29
29
 
30
30
  return config
31
+
32
+ def internal_resource_exists():
33
+ """
34
+ Check if the internal resource YAML file exists.
35
+
36
+ Returns:
37
+ bool: True if the internal resource file exists, False otherwise.
38
+ """
39
+ internal_path = os.path.join(os.path.expanduser("~"), ".sima-cli", "resources_internal.yaml")
40
+ return os.path.exists(internal_path)
@@ -1,6 +1,7 @@
1
1
  import os
2
2
  import subprocess
3
3
  import platform
4
+ from typing import Tuple
4
5
 
5
6
  # Utility functions to determine the environment:
6
7
  # - Whether we are running on a SiMa board
@@ -86,7 +87,7 @@ def is_palette_sdk() -> bool:
86
87
  except Exception:
87
88
  return False
88
89
 
89
- def get_environment_type() -> tuple[str, str]:
90
+ def get_environment_type() -> Tuple[str, str]:
90
91
  """
91
92
  Return the environment type and subtype as a tuple.
92
93
 
@@ -113,7 +114,7 @@ def get_environment_type() -> tuple[str, str]:
113
114
 
114
115
  return "host", "unknown"
115
116
 
116
- def check_pcie_card_installation() -> tuple[bool, str]:
117
+ def check_pcie_card_installation() -> Tuple[bool, str]:
117
118
  """
118
119
  Check whether the PCIe SiMa card is properly installed on a supported Linux host.
119
120
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sima-cli
3
- Version: 0.0.12
3
+ Version: 0.0.13
4
4
  Summary: CLI tool for SiMa Developer Portal to download models, firmware, and apps.
5
5
  Home-page: https://developer.sima.ai/
6
6
  Author: SiMa.ai
@@ -13,7 +13,7 @@ Classifier: Development Status :: 3 - Alpha
13
13
  Classifier: Intended Audience :: Developers
14
14
  Classifier: Topic :: Software Development :: Build Tools
15
15
  Classifier: Environment :: Console
16
- Requires-Python: >=3.10
16
+ Requires-Python: >=3.8
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  Requires-Dist: requests
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes