add openpilot prefix to imports (#29498)

* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
This commit is contained in:
Adeeb Shihadeh
2023-08-20 20:49:55 -07:00
committed by GitHub
parent d61f86d339
commit a9626f95b6
337 changed files with 1153 additions and 1142 deletions
+2 -2
View File
@@ -5,8 +5,8 @@ import time
from collections import defaultdict
import cereal.messaging as messaging
from selfdrive.debug.can_table import can_table
from tools.lib.logreader import logreader_from_route_or_segment
from openpilot.selfdrive.debug.can_table import can_table
from openpilot.tools.lib.logreader import logreader_from_route_or_segment
RED = '\033[91m'
CLEAR = '\033[0m'
@@ -4,9 +4,9 @@ import time
from tqdm import tqdm
from cereal import car
from selfdrive.car.tests.routes import CarTestRoute
from selfdrive.car.tests.test_models import TestCarModelBase
from tools.plotjuggler.juggle import DEMO_ROUTE
from openpilot.selfdrive.car.tests.routes import CarTestRoute
from openpilot.selfdrive.car.tests.test_models import TestCarModelBase
from openpilot.tools.plotjuggler.juggle import DEMO_ROUTE
N_RUNS = 10
+2 -2
View File
@@ -8,8 +8,8 @@ from tqdm import tqdm
from typing import List, Tuple, cast
from cereal.services import service_list
from tools.lib.route import Route
from tools.lib.logreader import LogReader
from openpilot.tools.lib.route import Route
from openpilot.tools.lib.logreader import LogReader
if __name__ == "__main__":
r = Route(sys.argv[1])
+1 -1
View File
@@ -24,7 +24,7 @@ import argparse
import re
from collections import defaultdict
from selfdrive.manager.process_config import managed_processes
from openpilot.selfdrive.manager.process_config import managed_processes
# Do statistics every 5 seconds
PRINT_INTERVAL = 5
+5 -5
View File
@@ -4,11 +4,11 @@ import random
from cereal import car, log
import cereal.messaging as messaging
from common.realtime import DT_CTRL
from selfdrive.car.honda.interface import CarInterface
from selfdrive.controls.lib.events import ET, Events
from selfdrive.controls.lib.alertmanager import AlertManager
from selfdrive.manager.process_config import managed_processes
from openpilot.common.realtime import DT_CTRL
from openpilot.selfdrive.car.honda.interface import CarInterface
from openpilot.selfdrive.controls.lib.events import ET, Events
from openpilot.selfdrive.controls.lib.alertmanager import AlertManager
from openpilot.selfdrive.manager.process_config import managed_processes
EventName = car.CarEvent.EventName
+1 -1
View File
@@ -2,7 +2,7 @@
import argparse
import pickle
from selfdrive.car.docs import get_all_car_info
from openpilot.selfdrive.car.docs import get_all_car_info
def dump_car_info(path):
+2 -2
View File
@@ -4,8 +4,8 @@ import argparse
import json
import cereal.messaging as messaging
from tools.lib.logreader import LogReader
from tools.lib.route import Route
from openpilot.tools.lib.logreader import LogReader
from openpilot.tools.lib.route import Route
LEVELS = {
"DEBUG": 10,
+2 -2
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
import sys
from tools.lib.route import Route
from tools.lib.logreader import MultiLogIterator
from openpilot.tools.lib.route import Route
from openpilot.tools.lib.logreader import MultiLogIterator
def get_fingerprint(lr):
@@ -5,11 +5,11 @@ from collections import defaultdict
from tqdm import tqdm
from selfdrive.car.fw_versions import match_fw_to_car_fuzzy
from selfdrive.car.toyota.values import FW_VERSIONS as TOYOTA_FW_VERSIONS
from selfdrive.car.honda.values import FW_VERSIONS as HONDA_FW_VERSIONS
from selfdrive.car.hyundai.values import FW_VERSIONS as HYUNDAI_FW_VERSIONS
from selfdrive.car.volkswagen.values import FW_VERSIONS as VW_FW_VERSIONS
from openpilot.selfdrive.car.fw_versions import match_fw_to_car_fuzzy
from openpilot.selfdrive.car.toyota.values import FW_VERSIONS as TOYOTA_FW_VERSIONS
from openpilot.selfdrive.car.honda.values import FW_VERSIONS as HONDA_FW_VERSIONS
from openpilot.selfdrive.car.hyundai.values import FW_VERSIONS as HYUNDAI_FW_VERSIONS
from openpilot.selfdrive.car.volkswagen.values import FW_VERSIONS as VW_FW_VERSIONS
FWS = {}
+2 -2
View File
@@ -6,8 +6,8 @@ from collections import defaultdict
import matplotlib.pyplot as plt
from cereal.services import service_list
from tools.lib.logreader import LogReader
from tools.lib.route import Route
from openpilot.tools.lib.logreader import LogReader
from openpilot.tools.lib.route import Route
MIN_SIZE = 0.5 # Percent size of total to show as separate entry
+1 -1
View File
@@ -4,7 +4,7 @@ import capnp
from collections import defaultdict
from cereal.messaging import SubMaster
from common.numpy_fast import mean
from openpilot.common.numpy_fast import mean
from typing import Optional, Dict
def cputime_total(ct):
+2 -2
View File
@@ -4,8 +4,8 @@ from collections import defaultdict
import difflib
import pickle
from selfdrive.car.docs import get_all_car_info
from selfdrive.car.docs_definitions import Column
from openpilot.selfdrive.car.docs import get_all_car_info
from openpilot.selfdrive.car.docs_definitions import Column
FOOTNOTE_TAG = "<sup>{}</sup>"
STAR_ICON = '<a href="##"><img valign="top" src="https://raw.githubusercontent.com/commaai/openpilot/master/docs/assets/icon-star-{}.svg" width="22" /></a>'
+4 -4
View File
@@ -2,10 +2,10 @@
import argparse
from selfdrive.test.process_replay.process_replay import CONFIGS, replay_process
from tools.lib.logreader import MultiLogIterator
from tools.lib.route import Route
from tools.lib.helpers import save_log
from openpilot.selfdrive.test.process_replay.process_replay import CONFIGS, replay_process
from openpilot.tools.lib.logreader import MultiLogIterator
from openpilot.tools.lib.route import Route
from openpilot.tools.lib.helpers import save_log
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Run process on route and create new logs",
+2 -2
View File
@@ -10,8 +10,8 @@ import sys
import numpy as np
from collections import defaultdict
from tools.lib.logreader import LogReader
from tools.lib.route import Route
from openpilot.tools.lib.logreader import LogReader
from openpilot.tools.lib.route import Route
import matplotlib.pyplot as plt
+3 -3
View File
@@ -2,9 +2,9 @@
import sys
from cereal import car
from common.params import Params
from tools.lib.route import Route
from tools.lib.logreader import LogReader
from openpilot.common.params import Params
from openpilot.tools.lib.route import Route
from openpilot.tools.lib.logreader import LogReader
if __name__ == "__main__":
CP = None
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_legacy_fingerprint_cars
from openpilot.selfdrive.car.fingerprints import eliminate_incompatible_cars, all_legacy_fingerprint_cars
import cereal.messaging as messaging
+3 -3
View File
@@ -4,9 +4,9 @@ import sys
from typing import List
import unittest
from selfdrive.car.tests.routes import CarTestRoute
from selfdrive.car.tests.test_models import TestCarModel
from tools.lib.route import SegmentName
from openpilot.selfdrive.car.tests.routes import CarTestRoute
from openpilot.selfdrive.car.tests.test_models import TestCarModel
from openpilot.tools.lib.route import SegmentName
def create_test_models_suite(routes: List[CarTestRoute], ci=False) -> unittest.TestSuite:
+4 -4
View File
@@ -6,10 +6,10 @@ import argparse
import os
import traceback
from tqdm import tqdm
from tools.lib.logreader import LogReader
from tools.lib.route import Route
from selfdrive.car.car_helpers import interface_names
from selfdrive.car.fw_versions import VERSIONS, match_fw_to_car
from openpilot.tools.lib.logreader import LogReader
from openpilot.tools.lib.route import Route
from openpilot.selfdrive.car.car_helpers import interface_names
from openpilot.selfdrive.car.fw_versions import VERSIONS, match_fw_to_car
NO_API = "NO_API" in os.environ
+3 -3
View File
@@ -3,10 +3,10 @@ import sys
import numpy as np
import matplotlib.pyplot as plt
from sklearn import linear_model # pylint: disable=import-error
from selfdrive.car.toyota.values import STEER_THRESHOLD
from openpilot.selfdrive.car.toyota.values import STEER_THRESHOLD
from tools.lib.route import Route
from tools.lib.logreader import MultiLogIterator
from openpilot.tools.lib.route import Route
from openpilot.tools.lib.logreader import MultiLogIterator
MIN_SAMPLES = 30 * 100
+2 -2
View File
@@ -2,8 +2,8 @@
import time
from cereal import car, log, messaging
from common.params import Params
from selfdrive.manager.process_config import managed_processes
from openpilot.common.params import Params
from openpilot.selfdrive.manager.process_config import managed_processes
if __name__ == "__main__":
CP = car.CarParams(notCar=True)