Skip to content

Commit

Permalink
Addressing TODO comments
Browse files Browse the repository at this point in the history
  • Loading branch information
frey-perez committed Sep 23, 2024
1 parent 9debaa2 commit 83a928f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/wristpy/core/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ def format_nonwear_data(
) -> np.ndarray:
"""Formats nonwear data to match the temporal resolution of the other measures.
#TODO: Add the reason why polars.upsample isnt valid here.
The detect_nonweaer algorithm outputs non-wear values in 15-minute windows, where
each timestamp represents the beginning of the window. This structure does not align
well with the polars upsample function, which treats the last timestamp as the end
of the time series. As a result, using the upsample function would cut off the
final window. To avoid this, we manually map the non-wear data to the reference
measure's resolution.
Args:
nonwear_data: The nonwear array to be upsampled.
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ def sample_data_bin() -> pathlib.Path:

@pytest.fixture
def sample_data_txt() -> pathlib.Path:
"""#TODO: define what data. --> Test data to run."""
"""Text data to test invalid file types."""
return pathlib.Path(__file__).parent / "sample_data" / "example_text.txt"

0 comments on commit 83a928f

Please sign in to comment.