Skip to content

Commit b752d9a

Browse files
Bugfix/resolve security issues (#247)
* Update min actfast version * Add action commit hash * bump dependencies * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update README.md typo? wonder how long that has been there --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent b663d37 commit b752d9a

6 files changed

Lines changed: 851 additions & 425 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ jobs:
3030
run: |
3131
poetry run pdoc src/wristpy -o docs_build -t docs/pdoc-theme --docformat google
3232
touch docs_build/.nojekyll
33-
- uses: JamesIves/github-pages-deploy-action@v4
33+
- uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8
3434
with:
3535
folder: docs_build

.github/workflows/pypi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
poetry build
4242
4343
- name: Publish to PyPi.
44-
uses: pypa/gh-action-pypi-publish@release/v1
44+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
4545
with:
4646
user: __token__
4747
password: ${{ secrets.PYPI_KEY }}

.github/workflows/test.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Python Tests
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches:
@@ -13,7 +16,7 @@ jobs:
1316
fail-fast: false
1417
matrix:
1518
os: [ubuntu-latest, windows-latest, macos-latest]
16-
python_version: ['3.10', '3.11', '3.12', '3.13']
19+
python_version: ['3.10', '3.11', '3.12']
1720
resolution: [lowest-direct, highest]
1821
steps:
1922
- uses: actions/checkout@v4
@@ -48,7 +51,7 @@ jobs:
4851
--verbose
4952
shell: bash
5053
- name: Upload coverage to Codecov
51-
uses: codecov/codecov-action@v5
54+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7
5255
with:
5356
token: ${{ secrets.CODECOV_TOKEN }}
5457
verbose: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The main processing pipeline of the wristpy module can be described as follows:
3535
- **Data calibration**: A post-manufacturer calibration step can be applied, to ensure that the acceleration sensor is measuring 1*g* force during periods of no motion. There are three possible options: `None`, `gradient`, `ggir`.
3636
- ***Data imputation*** In the special case when dealing with the Actigraph `idle_sleep_mode == enabled`, the gaps in acceleration are filled in after calibration, to avoid biasing the calibration phase.
3737
- **Metrics Calculation**: Calculates various activity metrics on the calibrated data, namely ENMO (Euclidean norm, minus one), MAD (mean amplitude deviation) <sup>1</sup>, Actigraph activity counts<sup>2</sup>, MIMS (monitor-independent movement summary) unit <sup>3</sup>, and angle-Z (angle of acceleration relative to the *x-y* axis).
38-
- **Non-wear detection**: We find periods of non-wear based on the acceleration data. Specifically, the standard deviation of the acceleration values in a given time window, along each axis, is used as a threshold to decide `wear` or `not wear`. Additionally, we can use the temperature sensor, when avaia\lable, to augment the acceleration data. This is used in the CTA (combined temperature and acceleration) algorithm <sup>4</sup>, and in the `skdh` DETACH algorithm <sup>5</sup>. Furthermore, ensemble classification of non-wear periods is possible by providing a list (of any length) of non-wear algorithm options.
38+
- **Non-wear detection**: We find periods of non-wear based on the acceleration data. Specifically, the standard deviation of the acceleration values in a given time window, along each axis, is used as a threshold to decide `wear` or `not wear`. Additionally, we can use the temperature sensor, when avaialable, to augment the acceleration data. This is used in the CTA (combined temperature and acceleration) algorithm <sup>4</sup>, and in the `skdh` DETACH algorithm <sup>5</sup>. Furthermore, ensemble classification of non-wear periods is possible by providing a list (of any length) of non-wear algorithm options.
3939
- **Sleep Detection**: Using the HDCZ<sup>6</sup> and HSPT<sup>7</sup> algorithms to analyze changes in arm angle we are able to find periods of sleep. We find the sleep onset-wakeup times for all sleep windows detected. Any sleep periods that overlap with detected non-wear times are removed, and any remaining sleep periods shorter than 15 minutes (default value) are removed. Additionally, the SIB (sustained inactivity bouts) and the SPT (sleep period time) windows are provided as part of the output to aid in sleep metric post-processing.
4040
- **Physical activity levels**: Using the chosen physical activity metric (aggregated into time bins, 5 second default) we compute activity levels into the following categories: [`inactive`, `light`, `moderate`, `vigorous`]. The threshold values can be defined by the user, while the default values are chosen based on the specific activity metric and the values found in the literature <sup>8-10</sup>.
4141
- **Data output**: The output results can be saved in `.csv` or `.parquet` data formats, with the run-time configuration parameters saved in a `.json` dictionary.

0 commit comments

Comments
 (0)