Skip to content

Commit 987769e

Browse files
authored
Merge pull request #101 from NodeJSmith/fix/telemtry_zones_optional
Fix/telemtry zones optional
2 parents e16682b + beff05f commit 987769e

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

.bumpversion.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.bumpversion]
2-
current_version = "0.15.0"
2+
current_version = "0.15.1"
33

44
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(?:-(?P<rc_l>rc)(?P<rc>0|[1-9]\\d*))?"
55

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "otf-api"
3-
version = "0.15.0"
3+
version = "0.15.1"
44
description = "Python OrangeTheory Fitness API Client"
55
authors = [{ name = "Jessica Smith", email = "[email protected]" }]
66
requires-python = ">=3.11"

source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
project = "OrangeTheory API"
1515
copyright = "2025, Jessica Smith"
1616
author = "Jessica Smith"
17-
release = "0.15.0"
17+
release = "0.15.1"
1818

1919
# -- General configuration ---------------------------------------------------
2020
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

src/otf_api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _setup_logging() -> None:
3636

3737
_setup_logging()
3838

39-
__version__ = "0.15.0"
39+
__version__ = "0.15.1"
4040

4141

4242
__all__ = ["Otf", "OtfUser", "models"]

src/otf_api/models/workouts/telemetry.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,17 @@ class Telemetry(OtfItemBase):
5959
)
6060
class_start_time: datetime | None = Field(None, validation_alias="classStartTime")
6161
max_hr: int | None = Field(None, validation_alias="maxHr")
62-
zones: Zones
62+
zones: Zones | None = Field(default=None, description="The zones associated with the telemetry.")
6363
window_size: int | None = Field(None, validation_alias="windowSize")
6464
telemetry: list[TelemetryItem] = Field(default_factory=list)
6565

6666
def __init__(self, **data: dict[str, Any]):
6767
super().__init__(**data)
68-
for telem in self.telemetry:
69-
if self.class_start_time is None:
70-
continue
7168

69+
if self.class_start_time is None:
70+
return
71+
72+
for telem in self.telemetry:
7273
telem.timestamp = self.class_start_time + timedelta(seconds=telem.relative_timestamp)
7374

7475
@field_serializer("telemetry", when_used="json")

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)