Skip to content

Commit

Permalink
[bot] Update Python packages (#33436)
Browse files Browse the repository at this point in the history
* Update Python packages

* bump

* specify any list of sources

ooh this is pretty nice

* update

* y

* fix

* fix that

* bump

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 239cc69
  • Loading branch information
3 people authored Sep 4, 2024
1 parent 0b52262 commit 1e92af9
Show file tree
Hide file tree
Showing 6 changed files with 252 additions and 231 deletions.
2 changes: 1 addition & 1 deletion rednose_repo
6 changes: 4 additions & 2 deletions selfdrive/car/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import random
import unittest # noqa: TID251
from collections import defaultdict, Counter
from functools import partial
import hypothesis.strategies as st
from hypothesis import Phase, given, settings
from parameterized import parameterized_class
Expand All @@ -24,7 +25,7 @@
from openpilot.selfdrive.pandad import can_capnp_to_list
from openpilot.selfdrive.test.helpers import read_segment_list
from openpilot.system.hardware.hw import DEFAULT_DOWNLOAD_CACHE_ROOT
from openpilot.tools.lib.logreader import LogReader, internal_source, openpilotci_source
from openpilot.tools.lib.logreader import LogReader, auto_source, internal_source, openpilotci_source, openpilotci_source_zst
from openpilot.tools.lib.route import SegmentName

from panda.tests.libpanda import libpanda_py
Expand Down Expand Up @@ -132,7 +133,8 @@ def get_testing_data(cls):
segment_range = f"{cls.test_route.route}/{seg}"

try:
lr = LogReader(segment_range, source=internal_source if is_internal else openpilotci_source)
source = partial(auto_source, sources=[internal_source] if is_internal else [openpilotci_source, openpilotci_source_zst])
lr = LogReader(segment_range, source=source)
return cls.get_testing_data_from_logreader(lr)
except Exception:
pass
Expand Down
7 changes: 4 additions & 3 deletions tools/lib/logreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,13 @@ def check_source(source: Source, *args) -> list[LogPath]:
return files


def auto_source(sr: SegmentRange, mode=ReadMode.RLOG) -> list[LogPath]:
def auto_source(sr: SegmentRange, mode=ReadMode.RLOG, sources: list[Source] = None) -> list[LogPath]:
if mode == ReadMode.SANITIZED:
return comma_car_segments_source(sr, mode)

sources: list[Source] = [internal_source, internal_source_zst, openpilotci_source, openpilotci_source_zst,
comma_api_source, comma_car_segments_source, testing_closet_source]
if sources is None:
sources = [internal_source, internal_source_zst, openpilotci_source, openpilotci_source_zst,
comma_api_source, comma_car_segments_source, testing_closet_source]
exceptions = {}

# for automatic fallback modes, auto_source needs to first check if rlogs exist for any source
Expand Down
Loading

0 comments on commit 1e92af9

Please sign in to comment.