Skip to content

Re-export core public types from the package root#15

Merged
stepankonev merged 1 commit into
mainfrom
stepankonev/top-level-exports
Jun 2, 2026
Merged

Re-export core public types from the package root#15
stepankonev merged 1 commit into
mainfrom
stepankonev/top-level-exports

Conversation

@stepankonev

Copy link
Copy Markdown
Owner

Summary

The most-used public types had to be imported from deep submodule paths:

from standard_e2e.data_structures.frame_data import TransformedFrameData
from standard_e2e.enums import Modality, TrajectoryComponent

Re-export a curated set from the package root so this works:

from standard_e2e import TransformedFrameData, Modality, TrajectoryComponent

What's surfaced

Alongside the existing UnifiedE2EDataset:

  • frame containersStandardFrameData, TransformedFrameData,
    CameraData, LidarData, LidarPointCloud, HDMap, MapElement,
    Detection3D, FrameDetections3D, Trajectory
  • enumsModality, TrajectoryComponent, CameraDirection,
    Intent, DetectionType, MapElementType, LidarComponent

Internal types (adapters, converters, processors) are intentionally left
out so the top-level namespace stays meaningful.

Notes

  • Additive aliases. The submodule paths keep working and resolve to the
    same objects — nothing is moved, nothing breaks.
  • No new import cost. The package already imports torch via
    unified_dataset; data_structures / enums are lightweight and were
    already loaded transitively. TensorFlow is still not imported.
  • Adds tests/test_public_api.py asserting the re-exports resolve to the
    canonical objects and that every __all__ name is importable.

User code and notebooks had to reach into submodules for the most-used
types, e.g.:

    from standard_e2e.data_structures.frame_data import TransformedFrameData
    from standard_e2e.enums import Modality, TrajectoryComponent

Re-export a curated set from the package root so this works:

    from standard_e2e import TransformedFrameData, Modality, TrajectoryComponent

Surfaces the frame containers (StandardFrameData / TransformedFrameData,
CameraData, LidarData, LidarPointCloud, HDMap, MapElement, Detection3D,
FrameDetections3D, Trajectory) and the user-facing enums (Modality,
TrajectoryComponent, CameraDirection, Intent, DetectionType,
MapElementType, LidarComponent), alongside the existing
UnifiedE2EDataset.

These are additive aliases — the submodule paths keep working and point
at the same objects. No new import cost (the package already imports
torch via unified_dataset; data_structures / enums are lightweight and
already loaded transitively). Internal types (adapters, converters,
processors) are intentionally not surfaced.

Adds tests/test_public_api.py guarding that the re-exports resolve to
the canonical objects and that every __all__ name is importable.
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@stepankonev stepankonev merged commit 11e3bd2 into main Jun 2, 2026
3 checks passed
@stepankonev stepankonev deleted the stepankonev/top-level-exports branch June 2, 2026 17:33
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.

1 participant