-
Notifications
You must be signed in to change notification settings - Fork 13
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
Creating a File Directory with Functions in /config.R #321
Comments
Considering that there can be multiple project keys for both mailing_list and issue_tracker, I plan to have the functions require the user to specify 2 parameters, the config_file and project_key_index.
The parameters would be config_file = project_of_interest.yml, project_key_index = 1. |
I think what you want here is a function that reads the config file structure, making some assumptions of it, and create the entire folder structure and sub-folders, rather than a function to create one folder. |
Sorry, I meant to say that I would have 1 function that creates the entire issue_tracker directory, where it would perform the steps in the prior comment for each of the subfolders for github and something similar for bugzilla and jira. |
What I am saying is that this issue should have a single function that the user calls. User should not be calling multiple functions to create folders. The only input to said function is the path to the config file. It has to scan the config file to decide what additional functions to call (e.g. the issue tracker, the mailing list, etc). If the user has to "program folder creation" it will be faster for them to manually create it themselves. I suggest you update the issue specification accordingly with the function signatures, and some notion of what function calls what for discussion. |
- Added `create_file_directory` function - Added `create_file_path` helper function
- Added @export to functions - Added some more detail to function description - Added discussion filepath under github issue tracker
@carlosparadis I was able to create the function and have @beydlern test it on his end as well. The directories seem to be created without any problems.
The |
Thank you for the update! |
Purpose
In issue #230, the folder organization was reorganized to follow this diagram.
As /config.R is intended to be a central focal point for managing and using the notebooks and configuration files.
Therefore a feature that would greatly assist users would be functions within /config.R that create the recommended folder directory.
Process
Create a single function within /config.R that builds the recommended folder organization.
Since not all notebooks require every section of the recommended folder directory, the function will need to read through the config passed as a parameter, so that it only creates the required folders for the sections that are used.
Function Signature:
Description: The function takes
conf
, a parsed configuration file obtained from theparse_config
function.verbose
is a boolean (set TRUE by default) that prints operational messages when TRUE.When the function is called, it takes the parsed configuration file and creates all the required filepaths used within the config file.
The function calls a helper function
create_file_path
that checks if the directory already exists, or creates it if the directory does not exist.create_file_directory(conf, verbose= TRUE)
Task List
The text was updated successfully, but these errors were encountered: