Skip to content
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

BREAKING CHANGE: Update data paths #476

Merged
merged 17 commits into from
May 16, 2024
Merged

BREAKING CHANGE: Update data paths #476

merged 17 commits into from
May 16, 2024

Conversation

RobertGemmaJr
Copy link
Member

@RobertGemmaJr RobertGemmaJr commented May 15, 2024

  • This changes the directory to which data is saved - any matlab scripts that labs may be using to parse the data will need to be updated

Folder Structure

The big change here is how we're nesting the folders. The file follows the following structure:

/data/mode/studyID/participantID/start_date.json

  • mode: development or production
  • studyID: The ID of the study the participant logged in as
  • participantID: The ID of the participant on the studyID the participant logged in as

That structure is nested inside userData while the participant is running through the experiment and then is copied into an output folder (Desktop/getName) when the participant finishes the experiment.

  1. data is used to separate the output data from the experiment from any other data that may be included. I don't really have anything in mind but have noticed Honeycomb users tend to have other information (matlab scripts, papers, etc) in the folder. I like data as a better delineator here rather than jumping straight into studyID
  2. mode is used to further delineate production data from data that was created during development. Most users have a separate lab computer for the production data so it's not much of a change but is definitely helpful for me. Plus we basically get it for free now that we're using Vite!

User data

I was looking to move the "running" file save to the temp folder but everything I've been reading online points to saving the data in userData like it was. This way the data will stay there permanently.

Note that the really important quirk of userData is the fact that is saves partial run-throughs of the experiment. If a participant begins the experiment but quits the app before completing it (including app errors/crashes) the data will still be saved in userdata it just won't be copied over to the desktop. I think it's best to leave it as userData so that those partial run-throughs will be saved permanently, just hidden away.

Output

Maintains that the data file(s) are created on the desktop at the end of the file. The file is copied from userData. Eventually I'd like for this path to be customizable but that's not a super pressing feature, the lab can change it with a single line of code if the really need

Copy link

github-actions bot commented May 15, 2024

Visit the preview URL for this PR (updated for commit 5caa0b7):

https://ccv-honeycomb--pr476-ref-paths-2eyroq5u.web.app

(expires Thu, 23 May 2024 19:22:15 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4ace1dcea913a952d2a1af84b94a4421bf36e610

src/Electron/main.js Outdated Show resolved Hide resolved
src/Electron/main.js Outdated Show resolved Hide resolved
src/Electron/main.js Outdated Show resolved Hide resolved
@RobertGemmaJr RobertGemmaJr merged commit 48a7c04 into type-module May 16, 2024
8 checks passed
@RobertGemmaJr RobertGemmaJr deleted the ref-paths branch May 16, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants