From 88aeff5f48c3e19919bee8dee6731f20388f31fe Mon Sep 17 00:00:00 2001 From: Mike Guida Date: Mon, 21 Oct 2024 11:12:10 -0600 Subject: [PATCH] use mcap as default OutputFormat (#110) ### Changelog Use `mcap` as the default OutputFormat. ### Docs None ### Description Support `mcap` and use it as the default OutputFormat. It functions the same as `mcap0`, which is being deprecated in favor of using `mcap`. Fixes FG-9084 --- foxglove/client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/foxglove/client.py b/foxglove/client.py index 263a4f3..14840e0 100644 --- a/foxglove/client.py +++ b/foxglove/client.py @@ -97,6 +97,7 @@ def __call__(self, size: int, progress: int) -> None: class OutputFormat(Enum): bag = "bag1" + mcap = "mcap" mcap0 = "mcap0" @@ -361,7 +362,7 @@ def download_recording_data( *, id: Optional[str] = None, key: Optional[str] = None, - output_format: OutputFormat = OutputFormat.mcap0, + output_format: OutputFormat = OutputFormat.mcap, include_attachments: bool = False, callback: Optional[ProgressCallback] = None, ): @@ -402,7 +403,7 @@ def _make_stream_link( start: datetime.datetime, end: datetime.datetime, topics: List[str] = [], - output_format: OutputFormat = OutputFormat.mcap0, + output_format: OutputFormat = OutputFormat.mcap, ) -> str: if device_id is None and device_name is None: raise RuntimeError("device_id or device_name must be provided") @@ -431,7 +432,7 @@ def download_data( start: datetime.datetime, end: datetime.datetime, topics: List[str] = [], - output_format: OutputFormat = OutputFormat.mcap0, + output_format: OutputFormat = OutputFormat.mcap, callback: Optional[ProgressCallback] = None, ) -> bytes: """