You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.
To align with slim-data-release-template and recent data releases, I've renamed this repo's sb_replace_files_log() --> sb_replace_files() (commit edd6df0 PR #9), and this repo's sb_replace_files() --> sb_replace_files_old().
sb_replace_files() vs. _old:
[1]
sb_replace_files <- function(filename, sb_id, ..., file_hash, sources = c()){
files <- c(...)
if (!missing(file_hash)){
files <- c(files, names(yaml.load_file(file_hash))) %>% sort()
}
# Throw error if there are no files given to push
stopifnot(length(files) > 0)
do_item_replace_tasks(sb_id, files, sources) %>%
write_csv(filename)
}
The old version includes several additional lines of codes, and conditional statements such as checking the dssecrets authentication:
[2]
@limnoliver, if you know, can you share why this function was updated to the one above [1] ? Are there any elements of this old function [2] that are worth keeping (e.g. should we be checking the sb authentication status in sb_replace_files()) ? Can I delete this function code entirely?
Surprisingly, this function sb_replace_files_old() works for making changes on a sciencebase locally, but does not work when using it in an interactive R console in Caldera. Might you know why this is?
sb_replace_files() works with Caldera (and locally), but I must run authenticate_sb() in the console in order for it to work.
How can we make sure dssecrets is up to date in the appropriate repos in the iidd/data_releases/ in caldera?
The text was updated successfully, but these errors were encountered:
Sorry for the delay in replying to this - it escaped my notice somehow!
I think that the issue you're running into is probably related to the sciencebase credentials having changed. These will need to be updated in your dssecrets installation on tallgrass. Note that in order to update your dsssecrets you'll need to follow the instructions here to make sure your library paths are set up correctly. Once you have successfully done this and verified it works, it would be good to add a section to your data releases docs in the DSP manual, so that people don't have to refer to that old page. I've created an issue for that and assigned it to you.
Please let me know if you have any questions or run into any problems!
There is some confusion around the existence and versioning of
sb_replace_files_log()
andsb_replace_files()
in thesrc/sb_utiles.R
of this template repo.Couples thoughts and discussion questions:
-
sb_replace_files_log()
in this hierarchical data release repo is identical to thesb_replace_files()
function that is in the slim-data-release src/sb_utils.R and this function was used in recently published data release repos (drb-temp-v2, @padilla410's lake-temp data release repo).To align with slim-data-release-template and recent data releases, I've renamed this repo's
sb_replace_files_log()
-->sb_replace_files()
(commit edd6df0 PR #9), and this repo'ssb_replace_files()
-->sb_replace_files_old()
.sb_replace_files()
vs._old
:[1]
[2]
@limnoliver, if you know, can you share why this function was updated to the one above [1] ? Are there any elements of this old function [2] that are worth keeping (e.g. should we be checking the sb authentication status in
sb_replace_files()
) ? Can I delete this function code entirely?@jesse-ross,:
sb_replace_files_old()
works for making changes on a sciencebase locally, but does not work when using it in an interactive R console in Caldera. Might you know why this is?sb_replace_files()
works with Caldera (and locally), but I must runauthenticate_sb()
in the console in order for it to work.iidd/data_releases/
in caldera?The text was updated successfully, but these errors were encountered: