mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-23 17:23:44 +08:00
Linter: Fix >160 line length test (#29287)
* test * fix line length * fix line length * fix file size * revert poetry * cleanup for PR old-commit-hash: cf64b27168614f851087adab2d7f766425922f64
This commit is contained in:
@@ -17,8 +17,9 @@ def get_sas_token():
|
||||
sas_token = open(TOKEN_PATH).read().strip()
|
||||
|
||||
if sas_token is None:
|
||||
sas_token = subprocess.check_output("az storage container generate-sas --account-name commadataci --name openpilotci --https-only --permissions lrw \
|
||||
--expiry $(date -u '+%Y-%m-%dT%H:%M:%SZ' -d '+1 hour') --auth-mode login --as-user --output tsv", shell=True).decode().strip("\n")
|
||||
sas_token = subprocess.check_output("az storage container generate-sas --account-name commadataci --name openpilotci \
|
||||
--https-only --permissions lrw --expiry $(date -u '+%Y-%m-%dT%H:%M:%SZ' -d '+1 hour') \
|
||||
--auth-mode login --as-user --output tsv", shell=True).decode().strip("\n")
|
||||
|
||||
return sas_token
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
from selfdrive.test.process_replay.process_replay import CONFIGS, get_process_config, get_custom_params_from_lr, replay_process, replay_process_with_name # noqa: F401
|
||||
from selfdrive.test.process_replay.process_replay import CONFIGS, get_process_config, get_custom_params_from_lr, \
|
||||
replay_process, replay_process_with_name # noqa: F401
|
||||
|
||||
@@ -323,7 +323,8 @@ def get_car_params_callback(rc, pm, msgs, fingerprint):
|
||||
canmsgs = [msg for msg in msgs if msg.which() == "can"]
|
||||
has_cached_cp = params.get("CarParamsCache") is not None
|
||||
assert len(canmsgs) != 0, "CAN messages are required for fingerprinting"
|
||||
assert os.environ.get("SKIP_FW_QUERY", False) or has_cached_cp, "CarParamsCache is required for fingerprinting. Make sure to keep carParams msgs in the logs."
|
||||
assert os.environ.get("SKIP_FW_QUERY", False) or has_cached_cp, \
|
||||
"CarParamsCache is required for fingerprinting. Make sure to keep carParams msgs in the logs."
|
||||
|
||||
for m in canmsgs[:300]:
|
||||
can.send(m.as_builder().to_bytes())
|
||||
@@ -606,7 +607,8 @@ def get_custom_params_from_lr(lr: Union[LogReader, List[capnp._DynamicStructRead
|
||||
return custom_params
|
||||
|
||||
|
||||
def replay_process_with_name(name: Union[str, Iterable[str]], lr: Union[LogReader, List[capnp._DynamicStructReader]], *args, **kwargs) -> List[capnp._DynamicStructReader]:
|
||||
def replay_process_with_name(name: Union[str, Iterable[str]], lr: Union[LogReader,
|
||||
List[capnp._DynamicStructReader]], *args, **kwargs) -> List[capnp._DynamicStructReader]:
|
||||
if isinstance(name, str):
|
||||
cfgs = [get_process_config(name)]
|
||||
elif isinstance(name, Iterable):
|
||||
@@ -660,7 +662,8 @@ def _replay_multi_process(
|
||||
continue
|
||||
|
||||
assert frs is not None, "frs must be provided when replaying process using vision streams"
|
||||
assert all(meta_from_camera_state(st) is not None for st in cfg.vision_pubs),f"undefined vision stream spotted, probably misconfigured process: {cfg.vision_pubs}"
|
||||
assert all(meta_from_camera_state(st) is not None for st in cfg.vision_pubs),\
|
||||
f"undefined vision stream spotted, probably misconfigured process: {cfg.vision_pubs}"
|
||||
assert all(st in frs for st in cfg.vision_pubs), f"frs for this process must contain following vision streams: {cfg.vision_pubs}"
|
||||
|
||||
all_msgs = sorted(lr, key=lambda msg: msg.logMonoTime)
|
||||
|
||||
@@ -6,7 +6,8 @@ import capnp
|
||||
|
||||
from typing import Union, Iterable, Optional, List, Any, Dict, Tuple
|
||||
|
||||
from selfdrive.test.process_replay.process_replay import CONFIGS, FAKEDATA, replay_process, get_process_config, check_openpilot_enabled, get_custom_params_from_lr
|
||||
from selfdrive.test.process_replay.process_replay import CONFIGS, FAKEDATA, replay_process, get_process_config, \
|
||||
check_openpilot_enabled, get_custom_params_from_lr
|
||||
from selfdrive.test.update_ci_routes import upload_route
|
||||
from tools.lib.route import Route
|
||||
from tools.lib.framereader import FrameReader
|
||||
|
||||
Reference in New Issue
Block a user