Skip to content

chore(cleanup): clean up the T4Dataset 1.0 stack - #318

Merged
jacoblambert merged 10 commits into
v1-devfrom
v1/cleanup
Oct 22, 2026
Merged

jacoblambert merged 10 commits into
v1-devfrom
v1/cleanup

Conversation

@jacoblambert

Copy link
Copy Markdown
Contributor

Summary

This PR cleans up the 1.0 stack (#294 to #317) after a review pass over the whole diff. Behavior does not change.

The fixes are on top of the stack instead of in each PR, so the earlier PRs did not need another rebase. The table below says which PR each change belongs to. Each commit is one kind of change and can be reviewed alone.

Content fixes (spec text, real bugs) were already pushed to the PR that introduced them.

Commits

Commit What Belongs to
Stale notes and dead code Distortion model list in the 0.x loading docs gets equidistant. A stale "to be removed" note. A repeated comment. A term that never changed has_key_frame. A redundant skip in REC019. __all__ in reference/files.py. #305, #307, #313
One implementation for shared logic file_sha256 replaces 4 hash helpers (and reads in chunks). Instance.annotation_spans is used by the 0.x converter and REC013. Manifest.ASSET_DIRS is used by the writer and STR013. The migrator reads the 0.x point layout from sensor.lidar.fields instead of working it out again. #307, #313, #316, #317
Style Constants used by one function move into it (REC022, REC027, XYZI, the frame-number regex). match instead of == Nothing in sanity code. REC012 / REC013 helpers become methods. #305, #307, #313
Docstrings "Return …" summaries, and Args / Returns on the public 0.x converter methods. #297, #307, #310, #316
No ** dict spreading dict(x, key=…) in tests, {…} | label(…) in the sample generator. The sample files are unchanged. #295, #298, #307, #313
Tests See below. all
Version color t4sanity --version / t4viz --version create their Rich console when called. Before, it was created at import, so in a terminal the captured output had colors and test_version failed. CI was not affected. from main (#293)

Tests

The suite goes from 654 to 623 tests with the same coverage.

  • tests/helpers.py: SampleCopy, a writable copy of a sample dataset (read, edit, reports, write_labels). It replaces helpers copied between test files and about 15 inline copies.
  • The per-table JSON round trips (5 files, 20 cases) are one loop in test_load_dataset, manifest included.
  • The invalid-value tests (5 files) are one parametrized test_invalid_record with named cases. Each case also checks that the unedited record builds.
  • Removed tests that another test already covers, for example the per-rule "sample passes" tests. test_v1_sample_passes now runs with --checksum, so it covers the manifest hashes too.
  • New: test_generator_reproduces_sample checks that make_sample_v1.py still writes the committed sample (tables, LiDAR, map). Video and manifest bytes are left out: they depend on the encoder build and the t4-devkit version.

Checked

  • All tests pass, also inside a terminal.
  • make_sample_v1.py writes byte-identical files.
  • LiDAR migration matches the 0.x values frame by frame on 77f0c093 (7 fields, merged sources) and 7aa8888b (lidarseg).
  • t4migrate on all 16 local datasets (before this cleanup): 0 sanity failures.

@jacoblambert jacoblambert changed the title chore: clean up the T4Dataset 1.0 stack chore(cleanup): clean up the T4Dataset 1.0 stack Oct 15, 2026
@jacoblambert
jacoblambert added this pull request to stack #315 October 15, 2026 08:27
@ktro2828
ktro2828 self-requested a review October 21, 2026 05:32
@jacoblambert
jacoblambert removed this pull request from stack #315 October 22, 2026 08:55
Base automatically changed from v1/migrate to v1-dev October 22, 2026 09:57
@jacoblambert
jacoblambert merged commit 3d7e4cc into v1-dev Oct 22, 2026
0 of 5 checks passed
@jacoblambert
jacoblambert deleted the v1/cleanup branch October 22, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants