Skip to content

Commit 6a0684b

Browse files
authored
🔧 EEG eligibility fields (#23)
2 parents 21836cf + 3d33ca9 commit 6a0684b

21 files changed

Lines changed: 1879 additions & 1328 deletions

‎.pre-commit-config.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ repos:
3737
- --args=--config-file __GIT_WORKING_DIR__/infrastructure/tests/.checkov.yaml
3838
files: ^infrastructure/
3939
- repo: https://github.com/DavidAnson/markdownlint-cli2
40-
rev: v0.22.0
40+
rev: v0.22.1
4141
hooks:
4242
- id: markdownlint-cli2
4343
- repo: https://github.com/ninoseki/uv-sort
@@ -52,13 +52,13 @@ repos:
5252
files: ^python_jobs/pyproject\.toml$
5353
args: [--project, python_jobs]
5454
- repo: https://github.com/astral-sh/ruff-pre-commit
55-
rev: v0.15.10
55+
rev: v0.15.11
5656
hooks:
5757
- id: ruff-check
5858
args: [ --fix ]
5959
- id: ruff-format
6060
- repo: https://github.com/pre-commit/mirrors-mypy
61-
rev: v1.20.1
61+
rev: v1.20.2
6262
hooks:
6363
- id: mypy
6464
exclude: \**/_config_variables/.*_variables/__init__\.py$

‎CHANGELOG.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 1.10.10
9+
10+
### Added
11+
12+
- EEG eligibility responses from REDCap consent project to REDCap operations project.
13+
14+
## 1.10.9
15+
16+
### Fixed
17+
18+
- Harmonized conflicting datetime formats.
19+
- Removed reduplicitave field names in REDCap invitation instruments.
20+
21+
## 1.10.8
22+
23+
### Changed
24+
25+
- Set `permission_audiovideo_participant` to "Not Applicable" when participant's age is < 11 or ≥ 18 years.
26+
27+
## 1.10.7
28+
29+
### Fixed
30+
31+
- Cache delay of 1 cycle for new subjects from Ripple.
32+
833
## 1.10.6
934

1035
### Added

‎VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.10.6
1+
1.10.10

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hbnmigration",
3-
"version": "1.10.6",
3+
"version": "1.10.10",
44
"private": true,
55
"description": "HBN data migration monitoring infrastructure with Python and Node.js services",
66
"workspaces": [

‎python_jobs/VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.10.6
1+
1.10.10

‎python_jobs/pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ target-version = "py314"
6565

6666
[tool.ruff.lint]
6767
extend-select = ["A", "B904", "C4", "D", "E", "EM", "F541", "G", "I", "ICN", "LOG007", "N", "NPY", "PL", "RET", "RSE", "RUF", "Q", "T20", "TRY002", "TRY201", "TRY400", "TRY401", "UP032", "W"]
68-
ignore = ["D203", "D212", "RUF002"]
68+
ignore = ["D203", "D212", "RUF002", "RUF003"]
6969

7070
[tool.ruff.lint.isort]
7171
combine-as-imports = true

‎python_jobs/src/hbnmigration/from_curious/config.py‎

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Nonsesitive for Curious API calls."""
22

3-
from typing import Literal
3+
from typing import ClassVar, Literal
44

55
from .._config_variables import curious_variables
66
from ..utility_functions import FieldDescriptor, ValueClass
@@ -28,6 +28,36 @@ def curious_authenticate(applet_name: str) -> curious_variables.Tokens:
2828
return tokens
2929

3030

31+
class Fields:
32+
"""REDCap field names for Curious invitation data."""
33+
34+
common: ClassVar[list[str]] = [
35+
"record_id",
36+
"redcap_event_name",
37+
]
38+
"""Fields that are always included regardless of account context."""
39+
40+
responder: ClassVar[list[str]] = [
41+
"curious_account_created_source_secret_id",
42+
"curious_account_created_invite_status",
43+
"curious_account_created_account_created_response",
44+
"curious_account_created_responder_complete",
45+
]
46+
"""Fields specific to responder accounts."""
47+
48+
child: ClassVar[list[str]] = [
49+
"curious_account_created_source_secret_id_c",
50+
"curious_account_created_invite_status_c",
51+
"curious_account_created_child_complete",
52+
]
53+
"""Fields specific to child accounts."""
54+
55+
@classmethod
56+
def for_context(cls, ctx: Literal["responder", "child"]) -> list[str]:
57+
"""Return all REDCap fields for the given account context."""
58+
return [*cls.common, *(cls.responder if ctx == "responder" else cls.child)]
59+
60+
3161
class Values:
3262
"""Values for Curious fields."""
3363

0 commit comments

Comments
 (0)