autoverse-cli 0.26.1__tar.gz → 0.28.1__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 (56) hide show
  1. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/PKG-INFO +1 -1
  2. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/pyproject.toml +2 -2
  3. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/autoverse_cli.egg-info/PKG-INFO +1 -1
  4. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/app_version.py +2 -2
  5. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/launcher.py +23 -16
  6. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/launcher_util.py +18 -8
  7. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/simconfig_util.py +1 -1
  8. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/LICENSE +0 -0
  9. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/README.md +0 -0
  10. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/setup.cfg +0 -0
  11. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/autoverse_cli.egg-info/SOURCES.txt +0 -0
  12. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/autoverse_cli.egg-info/dependency_links.txt +0 -0
  13. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/autoverse_cli.egg-info/entry_points.txt +0 -0
  14. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/autoverse_cli.egg-info/requires.txt +0 -0
  15. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/autoverse_cli.egg-info/top_level.txt +0 -0
  16. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/__init__.py +0 -0
  17. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/argparse_help.py +0 -0
  18. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/avrs.py +0 -0
  19. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/can_tool.py +0 -0
  20. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/can_tool_util.py +0 -0
  21. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/cfg.py +0 -0
  22. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/race_cloud.py +0 -0
  23. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/race_cloud_bridge_can.py +0 -0
  24. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/race_cloud_cfg_util.py +0 -0
  25. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/race_cloud_fwd_api.py +0 -0
  26. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/race_cloud_util.py +0 -0
  27. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/change_camera.py +0 -0
  28. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/code_booz.py +0 -0
  29. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/demo.py +0 -0
  30. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/dump_sim_config.py +0 -0
  31. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/environment.py +0 -0
  32. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/fault_injection.py +0 -0
  33. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/get_object_config.py +0 -0
  34. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/get_web_viz_meta.py +0 -0
  35. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/leaderboard.py +0 -0
  36. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/list_sim_objects.py +0 -0
  37. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/log_path.py +0 -0
  38. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/misc.py +0 -0
  39. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/move_to_landmark.py +0 -0
  40. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/npc.py +0 -0
  41. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/race_control.py +0 -0
  42. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/request.py +0 -0
  43. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/reset_to_track.py +0 -0
  44. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/rest_request.py +0 -0
  45. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/restart.py +0 -0
  46. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/scenario_control.py +0 -0
  47. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/spawn_object.py +0 -0
  48. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/teleport.py +0 -0
  49. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/toggle_hud.py +0 -0
  50. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/vd.py +0 -0
  51. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/vehicle_input.py +0 -0
  52. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/requests/vehicle_replay.py +0 -0
  53. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/shell_completion.py +0 -0
  54. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/simconfig.py +0 -0
  55. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/tests.py +0 -0
  56. {autoverse_cli-0.26.1 → autoverse_cli-0.28.1}/src/avrs/util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: autoverse-cli
3
- Version: 0.26.1
3
+ Version: 0.28.1
4
4
  Summary: The Autoverse CLI
5
5
  Author-email: Dan Kamrath <dan.kamrath@autonomalabs.com>
6
6
  License: # End-User License Agreement (EULA) of the Autonoma AutoVerse CLI
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "autoverse-cli"
3
- version = "0.26.1"
3
+ version = "0.28.1"
4
4
  dependencies = [
5
5
  "boto3",
6
6
  "cantools",
@@ -18,4 +18,4 @@ classifiers = [
18
18
  "Operating System :: OS Independent",
19
19
  ]
20
20
  [project.scripts]
21
- avrs = "avrs.avrs:main"
21
+ avrs = "avrs.avrs:main"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: autoverse-cli
3
- Version: 0.26.1
3
+ Version: 0.28.1
4
4
  Summary: The Autoverse CLI
5
5
  Author-email: Dan Kamrath <dan.kamrath@autonomalabs.com>
6
6
  License: # End-User License Agreement (EULA) of the Autonoma AutoVerse CLI
@@ -2,7 +2,7 @@ import http.client
2
2
  import json
3
3
 
4
4
  def get_app_version():
5
- return '0.26.1'
5
+ return '0.28.1'
6
6
 
7
7
  def check_app_is_latest():
8
8
  pass
@@ -21,4 +21,4 @@ def check_app_is_latest():
21
21
  # response = connection.getresponse()
22
22
  # if response.status != 200:
23
23
  # print('response had status code {}'.format(response))
24
- # print('{}'.format(response.read().decode('utf-8')))
24
+ # print('{}'.format(response.read().decode('utf-8')))
@@ -5,6 +5,7 @@ import logging
5
5
  import http.client
6
6
  import boto3
7
7
  import sys
8
+ import shutil
8
9
  from avrs.cfg import *
9
10
  from avrs.launcher_util import *
10
11
 
@@ -114,7 +115,7 @@ class AvrsLauncher:
114
115
 
115
116
  # Check if variant is valid (for backwards compatibility, we still proceed even if invalid)
116
117
  variant_is_invalid = False
117
- if args.variant != "staged":
118
+ if args.variant not in ["staged", "feature"]:
118
119
  # Ensure variants are loaded
119
120
  if 'variants' not in self.cfg:
120
121
  (dl_keys_ok, dl_keys_status, self.cfg) = try_get_launcher_download_keys(self.cfg)
@@ -127,22 +128,26 @@ class AvrsLauncher:
127
128
  sys.stderr.write('Warning: "{}" is not a known variant. Available variants: {}\n'.format(
128
129
  args.variant, self.cfg['variants']))
129
130
 
130
- # special case where we want staged version
131
+ variant_to_query = "autoverse" if args.variant in ["staged", "feature"] else args.variant
132
+
133
+ # Get latest build info from API
134
+ build_info_ok, build_info_status, latest_version, staged_version, build_info = get_launcher_build_info(
135
+ self.cfg, variant_to_query)
136
+ if not build_info_ok:
137
+ print('Error Getting Latest Version Info: {}'.format(build_info_status))
138
+ return
139
+
131
140
  if args.variant == "staged":
132
- # Get latest build info from API
133
- build_info_ok, build_info_status, latest_version, staged_version = get_launcher_build_info(
134
- self.cfg, "autoverse")
135
- if not build_info_ok:
136
- print('Error Getting Latest Version Info: {}'.format(build_info_status))
137
- return
138
141
  print('{}'.format(staged_version))
142
+ elif args.variant == "feature":
143
+ feature_info = build_info.get('feature', {})
144
+ if isinstance(feature_info, str):
145
+ try:
146
+ feature_info = json.loads(feature_info)
147
+ except json.JSONDecodeError:
148
+ pass
149
+ print('{}'.format(json.dumps(feature_info)))
139
150
  else:
140
- # Get latest build info from API
141
- build_info_ok, build_info_status, latest_version, staged_version = get_launcher_build_info(
142
- self.cfg, args.variant)
143
- if not build_info_ok:
144
- print('Error Getting Latest Version Info: {}'.format(build_info_status))
145
- return
146
151
  print('{}'.format(latest_version))
147
152
  if variant_is_invalid:
148
153
  # Explain that the output is the default/prod variant version, not the requested variant
@@ -172,7 +177,7 @@ class AvrsLauncher:
172
177
  return
173
178
 
174
179
  # Get latest build info from API
175
- build_info_ok, build_info_status, latest_version, staged_version = get_launcher_build_info(
180
+ build_info_ok, build_info_status, latest_version, staged_version, _build_info = get_launcher_build_info(
176
181
  self.cfg, args.variant)
177
182
  if not build_info_ok:
178
183
  print('Error Getting Latest Version Info: {}'.format(build_info_status))
@@ -204,6 +209,8 @@ class AvrsLauncher:
204
209
 
205
210
  package_zip_name = 'autoverse-linux-{}.zip'.format(target_version)
206
211
  package_name = 'autoverse-linux'
212
+ if target_version == 'feature':
213
+ args.variant = 'feature'
207
214
  bucket_path = '{}/{}'.format(args.variant, package_zip_name)
208
215
  dl_path = os.path.join(args.install_path, package_zip_name)
209
216
  unzip_path = os.path.join(args.install_path, package_name)
@@ -246,4 +253,4 @@ If you are sure, re-run with the --update-existing flag
246
253
  os.chmod(autoverse_exe, st.st_mode | stat.S_IEXEC)
247
254
 
248
255
  print('Cleaning up')
249
- os.remove(dl_path)
256
+ os.remove(dl_path)
@@ -121,7 +121,7 @@ def get_launcher_license_status_string(cfg):
121
121
 
122
122
  def get_launcher_build_info(cfg, variant):
123
123
  """
124
- Contacts API to discover the current latest build version
124
+ Contacts API to discover the current latest build version and returns full build info
125
125
  """
126
126
 
127
127
  api_url = 'zn5boqqk60.execute-api.us-east-1.amazonaws.com'
@@ -134,17 +134,24 @@ def get_launcher_build_info(cfg, variant):
134
134
  response = connection.getresponse()
135
135
 
136
136
  if response.status != 200:
137
- return (False, "get build info api returned {}".format(response.status), "", "")
137
+ return (False, "get build info api returned {}".format(response.status), "", "", {})
138
138
 
139
139
  res_full = json.loads(response.read().decode('utf-8'))
140
- info = json.loads(res_full['body'])
141
- code = res_full['statusCode']
140
+ raw_body = res_full.get('body', "{}")
141
+ info = json.loads(raw_body) if isinstance(raw_body, str) else raw_body
142
+ if not isinstance(info, dict):
143
+ return (False, "get build info api returned unexpected format", "", "", {})
144
+
145
+ code = res_full.get('statusCode')
142
146
  if code != 200:
143
- return (False, "get build info api returned {}".format(code), "", "")
147
+ return (False, "get build info api returned {}".format(code), "", "", info)
148
+
149
+ latest_version = info.get('prod', '')
150
+ if latest_version == '':
151
+ return (False, "get build info api response missing prod", "", "", info)
144
152
 
145
- latest_version = info['prod']
146
153
  staged_version = info.get('staging', latest_version)
147
- return (True, "ok", latest_version, staged_version)
154
+ return (True, "ok", latest_version, staged_version, info)
148
155
 
149
156
  def download_simulator_archive(cfg, source_path, target_path):
150
157
  """
@@ -184,7 +191,10 @@ def s3_download_with_progress(s3_client, s3_bucket, s3_object_key, local_file_pa
184
191
  def progress(chunk):
185
192
  nonlocal downloaded
186
193
  downloaded += chunk
187
- done = int(50 * downloaded / total_length)
194
+ if total_length > 0:
195
+ done = int(50 * downloaded / total_length)
196
+ else:
197
+ done = 0
188
198
  sys.stdout.write("\r[%s%s]" % ('=' * done, ' ' * (50-done)) )
189
199
  sys.stdout.flush()
190
200
 
@@ -130,7 +130,7 @@ def compare_dicts(a, b, parent_key, out_checks):
130
130
 
131
131
  def apply_simconfig_preset(sim_saved_dir, preset_name):
132
132
  cfg_files = SimConfigFiles(sim_saved_dir)
133
- ok, status = cfg_files.valdiate()
133
+ ok, status = cfg_files.validate()
134
134
  if not ok:
135
135
  print(status)
136
136
  return
File without changes
File without changes
File without changes