-
Notifications
You must be signed in to change notification settings - Fork 131
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
Fix change config yml loc #1042
Closed
ilyaZar
wants to merge
209
commits into
ThinkR-open:fix-change-config-yml-loc
from
ilyaZar:fix-change-config-yml-loc
Closed
Fix change config yml loc #1042
ilyaZar
wants to merge
209
commits into
ThinkR-open:fix-change-config-yml-loc
from
ilyaZar:fix-change-config-yml-loc
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All config manipulation now go through amend_golem_config. This allows to be sure that the !expr are not lost Close ThinkR-open#709
There is no need to set things that are already set in the yaml
The name is already set by the function that gsub in the files so there is no need to do it one extra time
…_wd() The attr is not set before being passed to set_golem_wd() in set_golem_options()
The yaml manimpulation functions are now separated in various files
The get_golem_* didn't rely on the GOLEM_CONFIG_ACTIVE env_var
+ get_golem_wd tries golem::pkg_path + get_golem_name tries pkg_name + get_golem_version tries pkg_version
Co-authored-by: Colin Fay <[email protected]>
) Co-authored-by: Colin Fay <[email protected]> Co-authored-by: vincent guyader <[email protected]>
Hotfix because of the dirty way we released version 0.3.3
path is now renamed pkg
1. add a double check to look for modules with names starting with "mod_mod_xxx" (see R/add_r_files.R) 2. add syntax check for module names to add_module(): explicitly ask the user if s/he wants to name her module "mod_xxx" or "mod_mod_xxx"
- save old golem name in tmp-variable and use helper-func inside set_golem_name() to overwrite tests/testthat.R - helper-func screens for old_name instances and replaces them with new_name Refs: ThinkR-open#805
- save <old_name> in tmp-variable and use helper-func inside set_golem_name() to change file name from "vignettes/<old_name>.R" to "vignettes/<new_name>.R" - helper-func screens for old_name instances inside <vignettes/<old_name>.R> and replaces them with new_name, then saves output to "vignettes/<new_name>.R" Refs: ThinkR-open#805
- adding a message to the user to check for other places for the name - passing the path to sub functions
- remove 'author_XXX' args and replace with 'authors' - make 'authors' arg default to class 'person' - use class check on 'authors', throw error if it fails - use desc$set_authors This mostly draws from the ideas of @jmeyer2482 and @ColinFay: Co-authored-by: Colin Fay <[email protected]> Co-authored-by: jmeyer2482 <[email protected]>
- update vignette/a_start.Rmd with new fill_desc() interface - delete some redundant whitespaces in same file
- changes since values of authors are of type person() which requires parsing the entries
- adjust interace of fill_desc() so build.R runs smoothly
This reverts commit ac237d5.
Merge branch 'fix-change-config-yml-loc' of https://github.com/ThinkR-open/golem into fix-change-config-yml-loc # Conflicts: # R/config.R # tests/testthat/test-config.R
- add helper try_user_config_location() that searchers for the new config location which is to be set inside R/app_config.R - update guess_where_config() with a final guess using this helper
hups that that was certainly not what I wanted to do... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #887
Problem:
Whenever
golem::document_and_reload()
callsget_golem_wd()
to retrieve values from a yml-config, and the user changed the destination of that yml before that call,golem::document_and_reload()
has no chance to know about that config change in the current setup.Fix:
This PR solves this by adding a helper to
guess_where_config()
which finds the user config-yaml , reads it and passes the wd (and possibly other configs) toget_golem_wd()
,golem::document_and_reload()
etc.