-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: split_gaze_data by column values #859
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #859 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 74 74
Lines 3419 3432 +13
Branches 613 614 +1
=========================================
+ Hits 3419 3432 +13 ☔ View full report in Codecov by Sentry. |
c557a78
to
16b7ae7
Compare
16b7ae7
to
1c6c769
Compare
Some modules where missing from the html documentation. This PR adds these.
* docs: Add missing EyeTracker class to html docs * the eye tracker class was not correctly integrated somehow
updates: - [github.com/asottile/pyupgrade: v3.18.0 → v3.19.0](asottile/pyupgrade@v3.18.0...v3.19.0) - [github.com/pre-commit/mirrors-mypy: v1.12.1 → v1.13.0](pre-commit/mirrors-mypy@v1.12.1...v1.13.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates: - [github.com/kynan/nbstripout: 0.7.1 → 0.8.0](kynan/nbstripout@0.7.1...0.8.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…9.6 (#777) Updates the requirements on [nbsphinx](https://github.com/spatialaudio/nbsphinx) to permit the latest version. - [Release notes](https://github.com/spatialaudio/nbsphinx/releases) - [Changelog](https://github.com/spatialaudio/nbsphinx/blob/master/NEWS.rst) - [Commits](spatialaudio/nbsphinx@0.8.8...0.9.5) --- updated-dependencies: - dependency-name: nbsphinx dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]>
updates: - [github.com/nbQA-dev/nbQA: 1.8.7 → 1.9.1](nbQA-dev/nbQA@1.8.7...1.9.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Updates the requirements on [setuptools-git-versioning](https://github.com/dolfinus/setuptools-git-versioning) to permit the latest version. - [Release notes](https://github.com/dolfinus/setuptools-git-versioning/releases) - [Changelog](https://github.com/dolfinus/setuptools-git-versioning/blob/master/CHANGELOG.rst) - [Commits](dolfinus/setuptools-git-versioning@v0.0.1...v2.0.0) --- updated-dependencies: - dependency-name: setuptools-git-versioning dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: aarbeikop <[email protected]>
* updated io file * updated test file * Add tests for metadata parsing from ASC file * Squashed commit of the following: commit 14d047c Author: Faizan Ansari <[email protected]> Date: Thu Oct 24 22:02:30 2024 +0200 Remove files from remote directory commit aa78078 Author: Faizan Ansari <[email protected]> Date: Thu Oct 24 21:53:35 2024 +0200 updated code commit cae54cc Author: Faizan Ansari <[email protected]> Date: Thu Oct 24 15:40:16 2024 +0200 changes in io.py file * Fix formatting * Fix indentation * Fix circular imports * 2 test passed * Fix attribute name * Refactor metadata checks, add tests * Fix f-strings * Fix tests * Address comments * Improve test coverage * Add comment about screen resolution * Fix metadata conflict check * Fix test coverage * Fix type hint * Trigger codecov * rebase me * Upgrade codecov action * Revert codecov action upgrade --------- Co-authored-by: Faizan Ansari <[email protected]> Co-authored-by: SiQube <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for your work!
I think there are still some rough edges we need to iron out. There's probably some misunderstanding about how the column specifiers are treated during init.
Adding proper tests of GazeDataFrame.split()
will probably resolve these issues.
updates: - [github.com/pappasam/toml-sort: v0.23.1 → v0.24.1](pappasam/toml-sort@v0.23.1...v0.24.1) - [github.com/kynan/nbstripout: 0.8.0 → 0.8.1](kynan/nbstripout@0.8.0...0.8.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates: - [github.com/pappasam/toml-sort: v0.24.1 → v0.24.2](pappasam/toml-sort@v0.24.1...v0.24.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates: - [github.com/PyCQA/pylint: v3.3.1 → v3.3.2](pylint-dev/pylint@v3.3.1...v3.3.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates: - [github.com/jsh9/pydoclint: 0.5.9 → 0.5.10](jsh9/pydoclint@0.5.9...0.5.10) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
only one trial id per gaze dataframe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thank you so much for taking care of all the PRs!
I'd just like to change the type to be more open to sequence types other than just lists.
@@ -231,6 +231,30 @@ def load_precomputed_reading_measures(self) -> None: | |||
self.paths, | |||
) | |||
|
|||
def split_gaze_data( | |||
self, | |||
by: list[str] | str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use Sequence
here from collections
, this way it's more in line with the polars signature: https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.partition_by.html
@@ -307,6 +308,33 @@ def apply( | |||
else: | |||
raise ValueError(f"unsupported method '{function}'") | |||
|
|||
def split(self, by: list[str] | str) -> list[GazeDataFrame]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use Sequence[str]
the newly added gaze files in the copco dataset, are on a per-subject file basis. unfortunately many trials are within one file -- this (a bit hacky) feature gives a user the possibility to split data into trial-level GazeDataFrames.