-
Notifications
You must be signed in to change notification settings - Fork 4
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
Removing/data path #208
Removing/data path #208
Conversation
deleted instance of config["data_path"]
deleted instance of config["data_path"]
deleted instance of config["data_path"]
|
Added a raise ValueError clause to catch configs that still have a data_path element
Added a raise ValueError clause to catch configs that still have a data_path element.
deleted data_path: data from config header
Deleted data_path: data from config header
Deleted data_path: data from config header.
Deleted data_path: data from config header.
Deleted data_path: data from config header.
Deleted data_path: data from config header.
Deleted data_path: data from config header.
Deleted data_path: data from config header.
Deleted data_path: data from config header.
Deleted data_path: data from config header.
Deleted data_path: data from config header.
Deleted data_path: data from config header.
Deleted data_path: data from config header.
Deleted data_path: data from config header.
Deleted data_path: data from config header.
Deleted data_path: data from config header (though, it was only commented out).
Deleted data_path: data from config header.
Deleted data_path: data from config header.
Prepended the mobility object with the correct path (mobility.csv -> data/mobility.csv).
Prepended the mobility object with the correct path (mobility.csv -> data/mobility.csv).
Prepended the mobility object with the correct path (mobility.csv -> data/mobility.csv).
Prepended the mobility object with the correct path (mobility.csv -> data/mobility.csv).
Prepended the mobility object with the correct path (mobility.csv -> data/mobility.csv).
Prepended the mobility object with the correct path (mobility.csv -> data/mobility.csv).
Prepended the mobility object with the correct path (mobility.csv -> data/mobility.csv).
Prepended the mobility object with the correct path (mobility.csv -> data/mobility.csv).
Added a raise ValueError clause to catch if the config being used still has a data_path section. Commented out line 579 because that portion contains config["data_path"], but the spatial_base_path variable it is read into is not referenced anywhere else in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good, I need to think if we need to update the R code as well before merging
First attempt at removing instances of `config$data_path` from R files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Re: @jcblemai 's comment on fixing the output directory: if we want to fix the directories just note that any covid or flu data should be in the data
folder as we have defined them - and geodata and mobility in the model_input
folders.
I'm not sure we need to define the outdir
in any case as it should save to the full relative path anyway.
I think we do so we can create the directory if it does not exist. outdire should just be fixed. @emprzy If sara's agree some changes are:
The rest is all good to me :) |
Ah yes I see the create directory part. Propose the following change:
Either method work though, and everything else is also good to me. |
Added a clause to create the appropriate directory (geodata, mobility, or gt_data) in datasetup R files.
… into removing/data-path
datasetup/build_US_setup.R
Outdated
|
||
|
||
|
||
|
||
# MOBILITY DATA (COMMUTER DATA) ------------------------------------------------------------ | ||
|
||
|
||
if(state_level & !file.exists(paste0(config$data_path, "/", config$subpop_setup$mobility))){ | ||
if(state_level & !file.exists(paste0("/", config$subpop_setup$mobility))){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also should be changed in line 172
You'll have to remove the paste0('/'
as well as this will look for the file in a different place.
ie
file.exists(config$subpop_setup$mobility)
Removed references to config$data_path and "/" in paste0 functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me now
Removed all relevant instances of config['data_path'] in .py and .ipynb files.