autoverse-cli 0.15.1__py3-none-any.whl → 0.15.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: autoverse-cli
3
- Version: 0.15.1
3
+ Version: 0.15.3
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,5 +1,5 @@
1
1
  avrs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- avrs/app_version.py,sha256=veVu_KrcJYSF9Cf_FWE7CerqxeWYz-b4IMc00t15q2Q,856
2
+ avrs/app_version.py,sha256=ox0hImY65F0gZIHO70CriD16XrpTUpCWXm6ACjKwXb8,856
3
3
  avrs/argparse_help.py,sha256=EoEaohGXZXqJvs1dFEzbo9vh47CYdHdSY2Im2Ps2iFo,945
4
4
  avrs/avrs.py,sha256=bGF35a72MZU41OVWnFHmchqmgKXBKh9djokzGA_4pL4,4621
5
5
  avrs/can_tool.py,sha256=IBoctKobBJ3wCq4ZdtuXuXH4AMEUxazCfYT6YP0Luw8,7161
@@ -7,10 +7,10 @@ avrs/can_tool_util.py,sha256=G3q21dTGMLc09SDq_RieoW7kSn-kXPkXxPDjavPh4hQ,7710
7
7
  avrs/cfg.py,sha256=kMn08Z4Ms1PAu2-U1QI8weEJeIVEppP4A4_tFfwnjtg,2924
8
8
  avrs/launcher.py,sha256=kk1lyHHLgFZ4zsFfa_zV5f1kYbUODT6wEILJ8TZ16rQ,9353
9
9
  avrs/launcher_util.py,sha256=sO3k_z3A-HIQdJVkVXNXUAE_MGFwAYiZUqQBoFwOqew,5325
10
- avrs/race_cloud.py,sha256=tyHsBTzTCPB5qpJ_zWVc6vVv5t9EHKzdeZfMfwurJ4g,18844
10
+ avrs/race_cloud.py,sha256=ZIB4W3nBcf9T6N5nXmFGg2eiRMO10FeEysIqWoMGUpk,19009
11
11
  avrs/race_cloud_cfg_util.py,sha256=PlHhW0PWhxRIA1X9CPMu9HqFcfu14--JwLR6DYr7qX0,6061
12
12
  avrs/race_cloud_fwd_api.py,sha256=HuLE5kfmzVq08aP3tlEh3f8WNjGL5N3K5EbXg9uQomo,1506
13
- avrs/race_cloud_util.py,sha256=ykTFSk9AVDEFAAS7wXBz-By4RnEp_kJKRvvACruv8Sk,10709
13
+ avrs/race_cloud_util.py,sha256=7pi6x2lgCqEgwmo3HXbdBZiCj43rTw5U9a1UDcClLm8,10753
14
14
  avrs/simconfig.py,sha256=UZc4FrxVHUkk2e9IglSpuojXkaL_nPrJW7trbEGgOOo,2907
15
15
  avrs/simconfig_util.py,sha256=1RmnmhK5C4HlCicTQeqn-1ORz3Xrku_QMt1Fqr9XjZs,4839
16
16
  avrs/tests.py,sha256=3JeYBjn0tRqHXERDROfzmYuW1KXeCcKur5Bw-EIegto,153
@@ -37,9 +37,9 @@ avrs/requests/toggle_hud.py,sha256=sV5t5QZc4uvRihPVk8jEKZiQNsyF9tsUwq5b4jjZplc,3
37
37
  avrs/requests/vd.py,sha256=gdt5XCdCCVdECL3qt8y-PKDrlArjeY_lxtT4VpZmAJo,1804
38
38
  avrs/requests/vehicle_input.py,sha256=R1b1xkRtOBkwyU6OSN4bWVlYsIUroZG0WKbYbc4pEH8,729
39
39
  avrs/requests/vehicle_replay.py,sha256=nCAE21VNyKoeIjjXBGAihgOLO7zYHcu-HWvPZYxdQ2c,11099
40
- autoverse_cli-0.15.1.dist-info/LICENSE,sha256=d4eWXho-u18HkBsX4K21uHX_bBb2UXZSrJdsb7Z_JlM,2647
41
- autoverse_cli-0.15.1.dist-info/METADATA,sha256=ZCG-_epPXZeIkbHaBGjLmf2l8L42-J21MogwjpoCH4A,3342
42
- autoverse_cli-0.15.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
43
- autoverse_cli-0.15.1.dist-info/entry_points.txt,sha256=Cb9qsUyU5AKkklehCcvtfT0-N3SXbUEqvjze4iEU5kE,40
44
- autoverse_cli-0.15.1.dist-info/top_level.txt,sha256=-AJO2e4MCVej6hY0U84pu5NfMeMW5qaAPSMisDT5rmA,5
45
- autoverse_cli-0.15.1.dist-info/RECORD,,
40
+ autoverse_cli-0.15.3.dist-info/LICENSE,sha256=d4eWXho-u18HkBsX4K21uHX_bBb2UXZSrJdsb7Z_JlM,2647
41
+ autoverse_cli-0.15.3.dist-info/METADATA,sha256=qf3AxGIPzM73XcAH5jGCOTSE6BmWB2FVp7dJmrebFpQ,3342
42
+ autoverse_cli-0.15.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
43
+ autoverse_cli-0.15.3.dist-info/entry_points.txt,sha256=Cb9qsUyU5AKkklehCcvtfT0-N3SXbUEqvjze4iEU5kE,40
44
+ autoverse_cli-0.15.3.dist-info/top_level.txt,sha256=-AJO2e4MCVej6hY0U84pu5NfMeMW5qaAPSMisDT5rmA,5
45
+ autoverse_cli-0.15.3.dist-info/RECORD,,
avrs/app_version.py CHANGED
@@ -2,7 +2,7 @@ import http.client
2
2
  import json
3
3
 
4
4
  def get_app_version():
5
- return '0.15.1'
5
+ return '0.15.3'
6
6
 
7
7
  def check_app_is_latest():
8
8
  pass
avrs/race_cloud.py CHANGED
@@ -213,7 +213,7 @@ class AvrsRaceCloud(AvrsApiRequest):
213
213
  'team_name': args.team_name,
214
214
  'sim_id_override': args.instance_id,
215
215
  'ensure_instance_is_running': False,
216
- 'should_restart_sim_program': args.no_restart_sim,
216
+ 'should_restart_sim_program': not args.no_restart_sim,
217
217
  'config_data': vcfg_data
218
218
  }
219
219
 
@@ -326,12 +326,6 @@ class AvrsRaceCloud(AvrsApiRequest):
326
326
  connect_peer_vcan(slot, args.ip, 1)
327
327
  connect_peer_vcan(slot, args.ip, 2)
328
328
 
329
- response = {
330
- 'ok': ok,
331
- 'msg': msg,
332
- 'slot': slot
333
- }
334
-
335
329
  # go ahead and restart forwarding script here
336
330
  # stop it if its already running
337
331
  stop_result = stop_fwd_api()
@@ -341,13 +335,22 @@ class AvrsRaceCloud(AvrsApiRequest):
341
335
 
342
336
  if args.restart:
343
337
  logger.info('restarting sim program for new connection')
344
- print('stopping sim program on sim instance')
338
+ logger.info('stopping sim program on sim instance')
345
339
  bash_kill_process('Autoverse')
346
- print('starting sim program on sim instance')
340
+ logger.info('starting sim program on sim instance')
347
341
  exe_path = os.path.join(get_sim_exe_path())
348
342
  start_exe(exe_path)
349
343
  extra_msg += '\n' if len(extra_msg) > 0 else ''
350
344
  extra_msg += 'automatically restarting sim program on sim instance'
345
+ else:
346
+ logger.info('--restart not specified, not restarting sim program for this connection')
347
+
348
+ response = {
349
+ 'ok': ok,
350
+ 'msg': msg,
351
+ 'slot': slot,
352
+ 'extra_msg': extra_msg
353
+ }
351
354
 
352
355
  print(json.dumps(response)) # print this so that when called from the ssh lambda we can get the result
353
356
 
avrs/race_cloud_util.py CHANGED
@@ -119,7 +119,7 @@ CREATE_VCANS_SCRIPT = '''
119
119
  sudo ip link add name "{a}" type vcan
120
120
  sudo ip link set dev "{a}" up
121
121
  sudo ip link add name "{b}" type vcan
122
- sudo ip link set dev "{b}"" up
122
+ sudo ip link set dev "{b}" up
123
123
  sudo ip link add name "{c}" type vcan
124
124
  sudo ip link set dev "{c}" up
125
125
  '''
@@ -148,7 +148,8 @@ def bash_kill_process(pname):
148
148
  # start an exectuable in the background, sending output to a file
149
149
  # stored at root with its name
150
150
  def start_exe(exe_path):
151
- print('running {} and saving under {}'.format(exe_path, os.path.basename(exe_path).replace(' ', '')))
151
+ logger = logging.getLogger('avrs')
152
+ logger.info('running {} and saving under {}'.format(exe_path, os.path.basename(exe_path).replace(' ', '')))
152
153
  return run_process(['bash', '-c',
153
154
  'nohup {} > ~/{}_output.log 2>&1 < /dev/null &'.format(exe_path, os.path.basename(exe_path).replace(' ', ''))])
154
155
 
@@ -203,8 +204,8 @@ def setup_vcans(vcan0, vcan1, vcan2):
203
204
  'b': vcan1,
204
205
  'c': vcan2
205
206
  }
206
- pres = run_process(['bash'], '-c',
207
- CREATE_VCANS_SCRIPT.format(**pargs))
207
+ pres = run_process(['bash', '-c',
208
+ CREATE_VCANS_SCRIPT.format(**pargs)])
208
209
  return pres.out + ' ' + pres.err
209
210
 
210
211
  def start_fwd_api(source_port, target_port):