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

Updated workflow #36

Merged
merged 11 commits into from
Jan 29, 2025
Merged

Updated workflow #36

merged 11 commits into from
Jan 29, 2025

Conversation

sofiasiamp
Copy link
Member

  • Included the structure of the root directory in the folders for /Tracy, /Ines, and /Franzi, and move the KARMEN files accordingly
  • Created a personalised script template (/workflow/script_template.R) and function to update it (workflow/update_script.R)
  • Renamed individual_dataschema.R to individual_docs.R, now including the creation of DD and scripts
  • Updated mock_data_function.R to a. include a "folder_name" argument (default is blank) for generating mock data for personal testing and b. to cover use case where categories sheet is empty
  • Added scripts for KARMEN and scripts and files for DEGS1

Potential error: Rmonize will throw an error if the categories sheet in the Dataschema is empty (Ines has no categorical variables, making individual testing challenging)

@sofiasiamp sofiasiamp added the enhancement New feature or request label Jan 28, 2025
Copy link
Collaborator

@FlorianSchw FlorianSchw left a comment

Choose a reason for hiding this comment

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

From reading and testing, all R files / functions should be behaving as expected. Some minor comments:

  1. In the create_mock_data function, you added a check for folder_name being NULL that would lead to an error. Is this necessary? Per default, the argument is just an empty character (and not NULL). Plus, in the individual_docs script you call the update_script function with the folder_names of Tracy, Ines and Franzi. So, from here there would be no problem.
  2. Should we have another R Script that just sources the individual_docs R file with different studyname? Not sure if the special spaces are the problem for that. In any case, such a very small script (similar to mock_data_initiation) should have a safe fail of asking if the user really wishes to proceed. That is because accidentally overwriting those files could be a bit nasty - we would have to revert a lot of files.
  3. Our Readme file is now quite outdated, we need to update that as well after we defined all the steps as we might want to state what should not be touched. And also for us, it would be good to have it explained how the workflow works - what script functions are called in succession from individual_docs so that it is easier to understand.

As there is nothing wrong with the PR itself (the points above are things to keep in mind), the PR should go ahead.

@FlorianSchw
Copy link
Collaborator

One more thing that I have noticed lately and that we may want to change sooner rather than later: folder structure. With the increase in folders, the project has become quite messy and it is not easy any more to find the relevant ones quickly.

Besides the four folders that are necessary for the studies, we could have 1 folder "Analyst" or "Analyst_Space" (sth like that) that will include the Tracy, Ines and Franzi folders.

And another dedicated folder that incorporates all the utility that we build and typically only we are using (perhaps "utils" or "utility"): create_mock_data, tests, workflow.

I know we need to re-check pathing again for the changes just made, but I think it will be worth it.

In that sense, I would then create a "compare" (working title) folder under utility which stores the csv files (with according sub-folder structure) for comparing git diffs and the function to create them. And under "Analysts" we can have the simple R Script calling that function.

What do you think?

@sofiasiamp
Copy link
Member Author

  1. done
  2. good idea, but first let's update the folder structure as you suggested.
  3. agreed
  4. agreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants