Skip to content

feat(schema): add T4Dataset 1.0 table names and registry - #302

Merged
jacoblambert merged 1 commit into
v1-devfrom
v1/registry
Oct 22, 2026
Merged

jacoblambert merged 1 commit into
v1-devfrom
v1/registry

Conversation

@jacoblambert

@jacoblambert jacoblambert commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Registers the 1.0 table classes by name, so the loader (next PR) can build every table without a hard-coded list.

  • t4_devkit/schema/v1/name.py: SchemaName for the 1.0 tables (no calibrated_sensor, surface_ann; adds vehicle, route, scenario, caption), with filename and is_optional(). Required tables: sample, sample_data, ego_pose, sensor, scene, log, vehicle.
  • t4_devkit/schema/v1/registry.py: a 1.0 SCHEMAS registry. Every 1.0 class registers itself with @SCHEMAS.register(SchemaName.X), as the 0.x tables do.

Change to existing code

SchemaRegistry (t4_devkit/schema/tables/registry.py) takes the name enum it accepts as an argument, instead of only the 0.x SchemaName. The default is the 0.x enum, so existing code and the 0.x SCHEMAS are unchanged. Each registry rejects names from the other version.

Tests

tests/schema/v1/test_registry.py:

  • Every 1.0 table name has a registered class, and filenames are <name>.json.
  • The required tables match the spec.
  • The 0.x and 1.0 registries only accept their own names.
  • A table class can be replaced with force=True, as documented for 0.x.

ktro2828
ktro2828 previously approved these changes Oct 16, 2026

@ktro2828 ktro2828 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jacoblambert
jacoblambert removed this pull request from stack #315 October 22, 2026 08:55
Base automatically changed from v1/schema-caption to v1-dev October 22, 2026 09:38
@jacoblambert
jacoblambert merged commit de02184 into v1-dev Oct 22, 2026
0 of 5 checks passed
@jacoblambert
jacoblambert deleted the v1/registry branch October 22, 2026 09:40
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