-
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
Make adding new coop data and parsers less brittle #231
Comments
I think there are a few brittle spots here, but one simpler one is the parser file list target in 7a_temp_coop_munge.yml: 7a_temp_coop_munge/tmp/parser_files.yml:
command: list_coop_files(target_name,
dirpath = I('7a_temp_coop_munge/src/data_parsers'), dummy = I('2021-09-13')) Someone doing the work and adding a parser or modifying a parser needs to know to change the dummy input here to reset the local yaml list of the parser files (like this). I think in this case we'd want something like this: target_default: all
sources:
- example_utils.R
targets:
all:
depends:
- 7a_temp_coop_munge/tmp/parser_files.yml
- 7a_temp_coop_munge/out/all_coop_dat_linked.feather.ind
7a_temp_coop_munge/tmp/parser_files.yml:
command: list_coop_files(target_name,
dirpath = I('7a_temp_coop_munge/src/data_parsers'),
trigger_file = '7a_temp_coop_munge/tmp/always_stale_time.txt')
coop_parsers:
command: find_parser(coop_wants, '7a_temp_coop_munge/tmp/parser_files.yml',
trigger_file = '7a_temp_coop_munge/tmp/always_stale_time.txt') with something like the above called on the trigger_file each time it is used make_stale <- function(file){
cat(file = file, paste0(format(Sys.time(), '%m/%d/%y %H:%M:%S '), sample(10000, 1)))
} |
need to update dummy arg when you add parsersfixed by Create an "always stale" target that generates the hash table of parser functions #242download-and-push files are going into what we thought was a manual file transferfixed in Brittle coop #249in
folder (e.g., here) and no check for duplicatesdummy arg update needed to check file list on gdrivefixed in Brittle coop #249buildingfixed in Brittle coop #2497a_temp_coop_munge/log/7a_temp_coop_munge_tasks.ind
doesn't trigger an update to the downloads of6_temp_coop_fetch/log/6_temp_coop_fetch_tasks.ind
automatically (it isn't wired in as depends/input)Issue to capture discussion on this topic.
There are a lot of small steps you need to remember to get through builds. Some targets need force builds (e.g.., parser inventory and gdrive file inventory)
Taking this example from an old
scipiper
discussion on how to make a target "always stale" in case it would help:example_utils.R
The text was updated successfully, but these errors were encountered: