diff --git a/poetry.lock b/poetry.lock index 5c596ccf..fe850a19 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. [[package]] name = "actfast" @@ -687,7 +687,7 @@ description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" groups = ["dev", "docs"] -markers = "python_version == \"3.10\"" +markers = "python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598"}, {file = "exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219"}, @@ -3324,7 +3324,7 @@ files = [ {file = "tomli-2.4.0-py3-none-any.whl", hash = "sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a"}, {file = "tomli-2.4.0.tar.gz", hash = "sha256:aa89c3f6c277dd275d8e243ad24f3b5e701491a860d5121f2cdd399fbb31fc9c"}, ] -markers = {dev = "python_full_version <= \"3.11.0a6\"", docs = "python_version == \"3.10\""} +markers = {dev = "python_full_version <= \"3.11.0a6\"", docs = "python_version < \"3.11\""} [[package]] name = "tornado" @@ -3332,7 +3332,7 @@ version = "6.5.5" description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." optional = false python-versions = ">=3.9" -groups = ["dev", "docs"] +groups = ["docs"] files = [ {file = "tornado-6.5.5-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:487dc9cc380e29f58c7ab88f9e27cdeef04b2140862e5076a66fb6bb68bb1bfa"}, {file = "tornado-6.5.5-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:65a7f1d46d4bb41df1ac99f5fcb685fb25c7e61613742d5108b010975a9a6521"}, @@ -3407,6 +3407,18 @@ files = [ [package.dependencies] typing-extensions = ">=4.12.0" +[[package]] +name = "tzdata" +version = "2025.3" +description = "Provider of IANA time zone data" +optional = false +python-versions = ">=2" +groups = ["main"] +files = [ + {file = "tzdata-2025.3-py2.py3-none-any.whl", hash = "sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1"}, + {file = "tzdata-2025.3.tar.gz", hash = "sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7"}, +] + [[package]] name = "urllib3" version = "2.6.3" @@ -3692,4 +3704,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.10, <3.14" -content-hash = "1f5808203533274de3dd46ed74b64343a2ebcf090fb1aa65aa8d68832f4aa254" +content-hash = "964a8ad31fd613af1dc0f1bc750387c9b92db4cbc40d27dd2289e28a96dafedb" diff --git a/pyproject.toml b/pyproject.toml index 0510ca8e..2fb5419a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wristpy" -version = "0.2.6" +version = "0.2.7" description = "wristpy is a Python package designed for processing and analyzing wrist-worn accelerometer data." authors = [ "Adam Santorelli ", @@ -25,6 +25,7 @@ pydantic-settings = "^2.3.4" scipy = "^1.14.1" typer = ">=0.20.0" rich = "^14.1.0" +tzdata = "^2025.3" [tool.poetry.group.dev.dependencies] pytest = "^8.0.0" diff --git a/src/wristpy/io/readers/readers.py b/src/wristpy/io/readers/readers.py index b1dd34bc..a589d79d 100644 --- a/src/wristpy/io/readers/readers.py +++ b/src/wristpy/io/readers/readers.py @@ -2,6 +2,7 @@ import datetime import pathlib +import zoneinfo from typing import Literal, Union import actfast @@ -220,9 +221,11 @@ def _read_actigraph_csv( start_time = lines[2].strip().split()[-1] start_date = lines[3].strip().split()[-1] + ny_tz = zoneinfo.ZoneInfo("America/New_York") start_datetime = datetime.datetime.strptime( f"{start_date} {start_time}", "%d/%m/%Y %H:%M:%S" - ) + ).replace(tzinfo=ny_tz) + idle_sleep_mode_value = lines[4].strip().split()[-1] idle_sleep_mode_flag = idle_sleep_mode_value.lower() == "true" sampling_rate = int(lines[5].strip().split()[-1])