Commit Graph

47 Commits

Author SHA1 Message Date
Adeeb Shihadeh
adf9ec5360 tools: speed up Route() (#36963)
* tools: speed up Route()

* cleanup
2025-12-28 15:39:20 -08:00
Shane Smiskol
6005b12f94 format logreader 2025-08-19 15:04:17 -07:00
Shane Smiskol
52a4b52628 FileName clean up (#35938)
two spaces!
2025-08-06 14:07:02 -07:00
Harald Schäfer
d1e0a60408 Filename refactor: no enum (#35930)
* conflict

* typing

* typing

* no value

* fix typing

* whitespace

* whitespace

* unused

* Reapply "Filename: minor refactor (#35927)"

This reverts commit 8c7d53004f.

* unused import

* done
2025-08-05 20:37:09 -07:00
Adeeb Shihadeh
8c7d53004f Revert "Filename: minor refactor (#35927)"
This reverts commit 96313fa4c0.
2025-08-05 19:07:17 -07:00
Harald Schäfer
96313fa4c0 Filename: minor refactor (#35927)
* Filename

* rest of refactor
2025-08-05 16:29:25 -07:00
Harald Schäfer
4d39d50858 Route: add more helpers for now (#35783)
* add helpers

* another name

* whitespace

* f string

* add log id

* add logid

* another dumb function

* add more crap

* fix naming

* whitespace

* fstring
2025-07-22 18:50:56 -07:00
Harald Schäfer
103b4df18c Log filenames: make tuples (#35771)
* make tuples

* spelling: this linter is hardcore
2025-07-19 19:19:13 -07:00
Shane Smiskol
e1fa04b678 Remove qcamera.ts.gz filename (#35766)
rm
2025-07-18 20:20:34 -07:00
Bruce Wayne
dbe172f7fd Fragile xx code needs this 2025-07-18 15:39:00 -07:00
Harald Schäfer
54da96dbdf Route: add name format (#35743)
* needed for now

* TODO

* Add TODO
2025-07-17 18:22:36 -07:00
Trey Moen
19ad50a185 feat(route.py): add metadata, events retrieval (#35261)
* feat(route.py): add metadata, events retrieval

* whitespace

* raise for status
2025-05-21 11:33:47 -07:00
Trey Moen
60113632b4 feat(clip): delete get_metadata call (#35229)
* feat: delete get_metadata call

* no one else is using this now
2025-05-15 10:02:46 -07:00
Trey Moen
f704d18a8b feat(clip): title and metadata overlay (#35099)
* wip

* moar

* ensure inter is installed

* line len

* refactor

* dont need this

* no longer than

* show meta for 4s
2025-05-04 10:16:35 -07:00
Shane Smiskol
309ccf6482 LogReader: support multiple log extensions in route (#33066)
* support rlog.zst

* TODO
old-commit-hash: e38a1428aa
2024-07-24 14:47:33 -07:00
Shane Smiskol
8f402f29a3 SegmentRange: remove timestamp (#32750)
* add deprecation warning

* remove timestamp

* Update logreader.py
old-commit-hash: d5ce4b3085
2024-06-13 23:19:32 -07:00
Shane Smiskol
cd8d440c86 LogReader: support reading zst logs from Azure (#32745)
* staging api

* other stuff

* ugh this should really not be duplicated, we already check the max segnum in Route class

* better error message!!

* more better

* clean up

* clean up

* breaks again
old-commit-hash: a0bbc005b6
2024-06-13 22:43:24 -07:00
Justin Newberry
881ccd321e fix logreader after segment_numbers api removal (#32073)
fix
old-commit-hash: fc9f50c90d
2024-04-01 10:01:50 -07:00
Adeeb Shihadeh
9735cf2eb6 timeless routes (#31119)
* timeless route

* update sort

* update test

* fix param name
old-commit-hash: 7cfc571f56
2024-03-05 20:43:33 -08:00
Cameron Clough
9bd90112d0 use pyupgrade to update to new typing syntax (#31580)
* add pyupgrade hook

* run pyupgrade (pre-commit run -a)

* ruff --fix

* Revert "add pyupgrade hook"

This reverts commit 56ec18bb6b8602a0b612f3803d96cdad14b52066.

* revert changes to third_party/

* manual type fixes

* explicit Optional wrapping capnp objects
old-commit-hash: 995250ae49
2024-02-24 16:41:23 -08:00
Shane Smiskol
aeb904d5da test_fw_query_on_routes: get first qlog (#31496)
* fast

* this isn't internal

* see
old-commit-hash: c5f1f4c676
2024-02-16 17:55:15 -08:00
Shane Smiskol
9d941a9682 SegmentRange: more explicit slice matching (#31451)
* more explicit

* fix it

* use non capturing group

* only needed for regex101

* make test_logreader.py executable

* fix

* stash

* passes test

* none

* type anotate

* test

* fix

* nice for syntax highlighting
old-commit-hash: 796671fe1a
2024-02-14 04:36:58 -08:00
Shane Smiskol
5c16ae62d8 SegmentRange: simplify slice (#31455)
* simplify slicing

* rm
old-commit-hash: 8fe9bc7a69
2024-02-14 04:17:03 -08:00
Shane Smiskol
7afdb2393d SegmentRange: type annotations (#31453)
* type annotate SegmentRange

* proper formatting

* oops

* numpy?

format test too

* draft

* fixed

* clean up

* rm

* more

* clean up

* clean up

* rm

* not here

* revert
old-commit-hash: 8276371009
2024-02-14 02:05:55 -08:00
Shane Smiskol
4c7ad7f3b7 tools/lib: format code (#31454)
easier to read. pylint used to catch all this stuff, but it's mostly missing in ruff :'(
old-commit-hash: 0846175f44
2024-02-14 01:56:17 -08:00
Shane Smiskol
a4e61c1022 SegmentRange: define __repr__
old-commit-hash: 884bd5c7f6
2024-02-13 22:58:44 -08:00
Justin Newberry
8768be968b LogReader: don't use route for max_segment (#31129)
* dont use route

* fix and cleanup
old-commit-hash: d574013d7b
2024-01-23 14:51:45 -08:00
Justin Newberry
0ae82f96c6 SegmentRange: __str__ get preferred format (#31126)
get canonical
old-commit-hash: 35e1e8ecd2
2024-01-23 11:40:22 -08:00
Justin Newberry
1b65d5cd85 segmentrangereader: support direct parsing (#30973)
* use correct source

* revert

* cleanup imports

* clean

* direct parsing

* rename

* move up

* fixes

* fix that

* better error message
old-commit-hash: eb09294fc2
2024-01-11 16:56:48 -08:00
Justin Newberry
11449845e7 segmentrangereader: support more sources (#30970)
* support more sources

* remove this
old-commit-hash: fb994ae782
2024-01-11 12:55:19 -08:00
Justin Newberry
3b86243f1f SegmentRangeReader: log type selector (#30960)
* log type selector

* test this too

* and this

* invalid selector

* use strenum

* don't hardcode size

* oneline
old-commit-hash: be814ed447
2024-01-11 10:25:24 -08:00
Justin Newberry
1f434b2714 SegmentRangeReader: new format for reading multiple segments (#30940)
* segment range reader

* rename that

* revert that

* cleanup

* revert this for now

* revert this for now

* Fix + test

* rm that

* rm that

* use for auto_fingerprint

* simpler

* for notebook too

* match numpy indexing

* just use numpy directly

* remove that

* spacing

* spacing

* use qlog for auto fingerprint

* add 'read mode'

* pass in read mode

* add test for modes

* numpy indexing

* fix that case

* more examples

* fix the notebook

* cleanup the notebook

* cleaner

* fix those
old-commit-hash: 0d126e1e9e
2024-01-10 11:55:19 -08:00
Adeeb Shihadeh
16ec56398c 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
old-commit-hash: a9626f95b6
2023-08-20 20:49:55 -07:00
ntegan1
0a3fde5334 Tools: allow using plotjuggler on local data (#24473)
local juggler
old-commit-hash: 07f7570840
2022-05-17 19:50:23 +02:00
ntegan1
d4d72ab938 Tools: allow uncompressed logs (#24471)
old-commit-hash: bf269bd883
2022-05-09 12:07:19 -07:00
Adeeb Shihadeh
8f9a6b06df tools: add bootlog helpers (#23504)
* tools: add bootlog helpers

* this is nice

* types
old-commit-hash: 7d7c0ff35f
2022-01-12 21:37:43 -08:00
Greg Hogan
bb3402b54d plotjuggler: support segment names (#23263)
* plotjuggler: support segment names

* update docs

* generic parser

* convert segment number to int when parsing

* add SegmentName

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 71132edf17
2022-01-04 15:55:46 +01:00
Ewout ter Hoeven
f206ebd054 Pyupgrade 3.6: Update syntax with Python 3.6+ features (#23305)
Updated Python code with Python 3.6+ features:
- utf-8 encoding is now the default (PEP 3120)
- Replace list comprehensions by Generator Expressions (PEP 289)
- Replace yield loop by yield from (PEP 380)
- Remove the (object) subclass when defining a class
- Replace the IOError alias by OSError (PEP 3151)
- Define sets with curly braces {} instead of set()
- Remove "r" parameter from open function, which is default

Co-Authored-By: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-Authored-By: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>

Co-authored-by: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-authored-by: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
old-commit-hash: 332f568a82
2021-12-24 11:18:39 -08:00
Ewout ter Hoeven
a962365292 Convert format strings strings to f-strings (#23241)
* Convert all text strings to f-strings

Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+.

Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files.

F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale

* revert pyextra changes

* revert ublox.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 55390d273f
2021-12-16 14:58:17 +01:00
Adeeb Shihadeh
605c84634a tools/lib/route: expose raw file paths
old-commit-hash: ee33f8a8cd
2021-11-04 20:32:02 -07:00
Adeeb Shihadeh
b5ebe63878 lib/route: support for e/d cams (#22529)
* lib/route: support for e/d cams

* comment
old-commit-hash: b6514a5cb3
2021-10-12 00:34:53 -07:00
Willem Melching
3ec4a7916b add qcamera support to Route (#20521)
old-commit-hash: 3755081145
2021-03-30 11:48:27 +02:00
iejMac
b97a2a3dd3 plotjuggler falling back to qlog (#20105)
* fallback to qlogs

* minor fixes

* removed extra line

* help on no args

* Update tools/plotjuggler/juggle.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: d4feecd803
2021-02-17 22:59:31 -08:00
Adeeb
5e857427ba Enable more flake8 checks (#1602)
* enable some more flake8 checks

* some more quick ones

* bump opendbc

* e401

* e711 e712

* e115 e116

* e222

* e301

* remove that

* e129

* e701 e702

* e125 e131

* e227

* e306

* e262

* W503

* e713

* e704

* e731

* bump opendbc

* fix some e722
old-commit-hash: d9bf9f0a40
2020-05-30 20:14:58 -07:00
Greg Hogan
f70e7ba371 support any number of top level dirs
old-commit-hash: f48e39778d
2020-03-06 17:55:42 -08:00
Andy
738c3cca79 Tools: Storage API (#1161)
* filereader

* support URLs in filereader, logreader

* unused

* use route files api; add auth file

* Implement browser auth

* Update readme, fix up cache paths

* Add tests, clear token on 401

* Factor out URLFile

* space

old-commit-hash: c4af05868b
2020-02-24 21:24:54 -05:00
George Hotz
99c5800ea5 merge in tools
old-commit-hash: 29ac3da7b8
2020-01-17 10:07:22 -08:00