Skip to content

chore: 🏗️ add REDCap data download step to pytask#171

Draft
martonvago wants to merge 3 commits into
mainfrom
chore/pytask-download-redcap-data
Draft

chore: 🏗️ add REDCap data download step to pytask#171
martonvago wants to merge 3 commits into
mainfrom
chore/pytask-download-redcap-data

Conversation

@martonvago

Copy link
Copy Markdown
Collaborator

Description

This PR adds the REDCap data download step to Pytask.

Closes #167

Needs a quick review.

Checklist

  • Ran just run-all


import feasibility_data.common.json as cj
import feasibility_data.common.redcap as cr
import feasibility_data.data.redcap.raw as dr

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These abbreviations are starting to get a bit confusing 😅

],
) -> None:
"""Download the latest data from all centers to `RAW_REDCAP/<timestamp>.csv.gz`."""
for center in [cr.Center.Copenhagen]:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nod towards being aware that we need to handle different centers without actually handling them.

def task_download_data(
raw_data_dir: Annotated[
Path,
DirectoryNode(root_dir=RAW_REDCAP, pattern="*.csv.gz"),

@martonvago martonvago Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tells Pytask that this task produces files in the specified directory that match the pattern. Later steps will be triggered by changes in this folder (i.e. file additions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Download data from REDCap

1 participant