Skip to content

Commit

Permalink
Merge branch 'main' into aoi_events
Browse files Browse the repository at this point in the history
  • Loading branch information
SiQube authored Dec 29, 2024
2 parents 9625ab1 + c4576eb commit 0865d30
Show file tree
Hide file tree
Showing 17 changed files with 296 additions and 64 deletions.
9 changes: 7 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ categories:
labels: deprecation
- title: ✨ Enhancements
labels: enhancement
- title: 📀 Datasets
labels: dataset
- title: 🐞 Bug Fixes
labels: fix
- title: 🛠️ Maintenance
Expand All @@ -34,20 +36,23 @@ change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&'
replacers:
# Remove conventional commits from titles
- search: '/- (build|chore|ci|depr|docs|feat|fix|perf|refactor|release|test)(\(.*\))?(\!)?\: /g'
- search: '/- (build|chore|ci|dataset|depr|docs|feat|fix|perf|refactor|release|test)(\(.*\))?(\!)?\: /g'
replace: '- '

autolabeler:
- label: breaking
title:
# Example: feat!: ...
- '/^(build|chore|ci|depr|docs|feat|fix|perf|refactor|release|test)(\(.*\))?\!\: /'
- '/^(build|chore|ci|dataset|depr|docs|feat|fix|perf|refactor|release|test)(\(.*\))?\!\: /'
- label: build
title:
- '/^build/'
- label: internal
title:
- '/^(chore|ci|perf|refactor|test)/'
- label: dataset
title:
- '/^dataset/'
- label: deprecation
title:
- '/^depr/'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- py310
- py311
- py312
- py313
exclude:
- os: macos-latest
tox_env: py39
Expand All @@ -33,6 +34,8 @@ jobs:
tox_env: py311
- os: macos-13
tox_env: py312
- os: macos-13
tox_env: py313
include:
- tox_env: py39
python: "3.9"
Expand All @@ -42,6 +45,8 @@ jobs:
python: "3.11"
- tox_env: py312
python: "3.12"
- tox_env: py313
python: "3.13"
steps:
- uses: actions/checkout@v4
with:
Expand Down
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repos:
hooks:
- id: add-trailing-comma
- repo: https://github.com/asottile/pyupgrade
rev: v3.18.0
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py39-plus]
Expand All @@ -35,15 +35,15 @@ repos:
- id: databooks-meta
args: [--cell-fields-keep=id]
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
rev: v0.24.2
hooks:
- id: toml-sort-fix
- repo: https://github.com/dannysepler/rm_unneeded_f_str
rev: v0.2.0
hooks:
- id: rm-unneeded-f-str
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
rev: 0.8.1
hooks:
- id: nbstripout
- repo: https://github.com/Lucas-C/pre-commit-hooks
Expand All @@ -53,12 +53,12 @@ repos:
args: [--use-current-year]
types: [python]
- repo: https://github.com/jsh9/pydoclint
rev: 0.5.9
rev: 0.5.10
hooks:
- id: pydoclint
args: ["--config=pyproject.toml"]
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.7
rev: 1.9.1
hooks:
- id: nbqa-autopep8
- id: nbqa-flake8
Expand All @@ -68,7 +68,7 @@ repos:
- id: nbqa-pyupgrade
args: ["--py39-plus"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.12.1
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies: [pandas-stubs, types-tqdm]
Expand Down Expand Up @@ -121,7 +121,7 @@ repos:
'--ignore=D103,D107,D213',
]
- repo: https://github.com/PyCQA/pylint
rev: v3.3.1
rev: v3.3.2
hooks:
- id: pylint
name: pylint
Expand Down
36 changes: 36 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
preferred-citation:
authors:
- family-names: "Krakowczyk"
given-names: "Daniel G."
- family-names: "Reich"
given-names: "David R."
- family-names: "Chwastek"
given-names: "Jakob"
- family-names: "Jakobi"
given-names: "Deboah N."
- family-names: "Prasse"
given-names: "Paul"
- family-names: "Süss"
given-names: "Assunta"
- family-names: "Turuta"
given-names: "Oleksii"
- family-names: "Kasprowski"
given-names: "Paweł"
- family-names: "Jäger"
given-names: "Lena A."
title: "pymovements: A Python Package for Processing Eye Movement Data"
version: 0.18.0
type: conference-paper
doi: 10.1145/3588015.3590134
url: "https://doi.org/10.1145/3588015.3590134"
year: 2023
collection-type: proceedings
collection-title: "2023 Symposium on Eye Tracking Research and Applications"
collection-location: "Tubingen, Germany"
collection-series: "ETRA '23"
publisher:
name: "Association for Computing Machinery"
address: New York, NY, USA
isbn: "979-8-4007-0150-4/23/05"
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
requires = [
"setuptools>=61.0.0",
"setuptools-git-versioning<2",
"setuptools-git-versioning<3",
"versioneer[toml]>=0.29,<1.0",
"wheel"
]
Expand All @@ -28,6 +28,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Typing :: Typed"
]
Expand All @@ -48,7 +49,7 @@ dynamic = ["version"]
docs = [
"ipykernel>=6.13.0",
"nbconvert>=7.0.0,<7.17",
"nbsphinx>=0.8.8,<0.9.5",
"nbsphinx>=0.8.8,<0.9.6",
"pandoc",
"pybtex",
"pydata-sphinx-theme>=0.12",
Expand Down Expand Up @@ -116,6 +117,7 @@ check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
warn_redundant_casts = true
disable_error_code = ["override"]

[[tool.mypy.overrides]]
module = "scipy.*"
Expand Down
2 changes: 2 additions & 0 deletions src/pymovements/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from pymovements.events import EventGazeProcessor
from pymovements.events import EventProcessor
from pymovements.gaze import Experiment
from pymovements.gaze import EyeTracker
from pymovements.gaze import GazeDataFrame
from pymovements.gaze import Screen
from pymovements.measure import register_sample_measure
Expand All @@ -60,6 +61,7 @@

'gaze',
'Experiment',
'EyeTracker',
'Screen',
'GazeDataFrame',

Expand Down
2 changes: 1 addition & 1 deletion src/pymovements/dataset/dataset_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def load_gaze_file(
column_schema_overrides=definition.filename_format_schema_overrides['gaze'],
)
elif filepath.suffix == '.asc':
gaze_df, _ = from_asc(
gaze_df = from_asc(
filepath,
experiment=definition.experiment,
add_columns=add_columns,
Expand Down
4 changes: 2 additions & 2 deletions src/pymovements/datasets/fakenews.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class FakeNewsPerception(DatasetDefinition):

mirrors: dict[str, tuple[str, ...]] = field(
default_factory=lambda: {
'precomputed_events': ('https://doi.org/10.7910/DVN/C1UD2A',),
'precomputed_events': ('https://dataverse.harvard.edu/',),
},
)

Expand Down Expand Up @@ -132,7 +132,7 @@ class FakeNewsPerception(DatasetDefinition):

filename_format: dict[str, str] = field(
default_factory=lambda: {
'precomputed_events': r'P{subject_id:d}_{session_id:d}_{truth_value:s}.csv',
'precomputed_events': r'P{subject_id:d}_S{session_id:d}_{truth_value:s}.csv',
},
)

Expand Down
4 changes: 2 additions & 2 deletions src/pymovements/datasets/toy_dataset_eyelink.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ class ToyDatasetEyeLink(DatasetDefinition):
origin='upper left',
eyetracker=EyeTracker(
sampling_rate=1000.0,
left=False,
right=True,
left=True,
right=False,
model='EyeLink Portable Duo',
vendor='EyeLink',
),
Expand Down
3 changes: 3 additions & 0 deletions src/pymovements/gaze/gaze_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ def __init__(
else:
self.events = events.copy()

# Remove this attribute once #893 is fixed
self._metadata: dict[str, Any] | None = None

def apply(
self,
function: str,
Expand Down
Loading

0 comments on commit 0865d30

Please sign in to comment.