-
Notifications
You must be signed in to change notification settings - Fork 133
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
Dev #1077
Closed
Closed
Dev #1077
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
This can be used to check before running a module/project template close issue #836
- fix 1004 adding bare skeleton function body - function name taken from 'name' arg to add_fct
Add -it flag when run docker so ^C still works
- check if README.Rmd exists; throw error if arg overwrite = FALSE, but overwrite if TRUE - uses a template from a function that returns an appropriate character - sets devtools::check chunk with option error=TRUE at the moment to ease testing this feature Possible To-Dos: - use smarter template e.g. from specific template-file.Rmd a-la usethis+whisker - add use_readme_md() that adds the correspodining .md file
- add more precise description for each argument in fill_desc() - change some capital letters to lower case in fill_desc() comments
- fix missing tests for make_action_button - possible bugfix for make_action_button - check with grepl instead of grep to avoid numeric(0) in if-statement which would make the corresponding test fail for button_6: class attribute present but not equal to "action-button" gives an error
* Fix 887 and improve code coverage of `R/config.R` from 28.21% to 100% (#1043) * fix: add user supplied path to config for guess_where_config() - add helper try_user_config_location() - search for new config location to be set inside R/app_config.R - update guess_where_config() with a final guess using this helper - run styler::style_file("R/config.R", transformers = grkstyle::grk_style_transformers()) * fix: logical scalar operation should use && instead of & * test: guess_where_config() works with path changes - path changes mean new dir and new filename so: - create a new dir for config - move config to that dir and rename => test correctly identifies changes (changing dir AND changing filename) in the yaml-config. attribute to @ALanguillaume with some minor tweaks Co-authored-by: ALanguillaume <[email protected]> * refactor: improve readability and logical of `try_user_config_location()` - encapsulate finding the relevant lines in the config file into "guess_lines_to_config_file()" - function allows for multi-line/grk-style app_sys()-calls (if file path to long and must be put into next line) - has clearer and commented logic to find the lines - document proper logic of function with comments - style with `grkstyle::grk_style_transformer` - update `tests/testthat/test-config.R` to incorporate above changes and move code coverage of that file to 63.16% * style: try_user_config_location() returns fs-paths for consistency - allows valid comparison with fs_path()'s inside guess_where_config() and output values from try_user_config_location() - fix a typo in a comment * refactor: improve readability and logic inside guess_where_config Why: - clearly outline the different cases: since now the user can add a golem-config, there can be conflicting cases between the default golem config and the user golem config (if e.g. the user forgets to delete the default) - update the tests to check these different cases - remark: test inside testthat should work without golem:: prefixes * test: add test for exotic corner cases of guess_where_config() - test that config file can be found if - we end up inside "inst/" (a corner case not tested before) - guess_where_config() is fed with argument values for 'path' and 'file' that do not work -> improves code coverage to 70.75% * feature: guess_where_config() fails a bit faster - remove last if-statement (which is almost a duplicate of the one before) -> this makes the guess_where_config() fail easier (i.e. return NULL) as other exotic corner cases should be handled more explicitly - remark: golem::pkg_path() will (almost) never produce an error but this may change so the try-construct within attempt() is kept - improve comments for corner case IV.B as internal developer note * refactor: encapsulate yesno() for clarity and easier testing * test: move coverage of R/config.R to 100% - notably: add package mockery to Suggests (no dependencies except for testthat and used for tests only) - add tests for non-interactive usage of guess_where_config(): check that error is thrown correctly - add tests for interactive usage of guess_where_config(): - user says yes: test that necessary files are created - user says no: test that we return NULL - add tests for encapsulated ask_golem_creation_upon_config() - shallow test as non-interactive menu() calls (inside the yesno()) are forbidden - but this makes code coverage 100% :) * docs: update docs for get_current_config() - only exported function from R/config.R needs proper docs - besides more details on older usage and behavior: - add docs on how to set user supplied golem config - add code snippets --------- Co-authored-by: ALanguillaume <[email protected]> * chore update news and Rd files --------- Co-authored-by: Ilya Zarubin <[email protected]> Co-authored-by: ALanguillaume <[email protected]>
* Fix 1074 to improve code coverage of `R/utils.R` to 100% (#1075) * feature: improve is_exisiting_module() - make it self-check if is called inside an R package (by checking for existence of an R-directory) - improve docs: add information that it checks for the existence of a module /!\ file /!\ name which is not the same as a module - improve tests: - proper cleanup of a golem - check failure/error if not inside a R-package (in the above sense) * tests: test create_if_need() function non-interactively - must produce error when called non-interactively for argyment type="file" * refactor: add clearer logic for create_if_needed() and test interactively 'no' - allow mocking of user interaction with "no"-response for testing purposes - requires encapsulation of yesno() to a separate function - restyle the file with grkstyler - add a test that mimicks user interation with "no" response of the yesno()-function => improve test coverage to 60.09 % * tests: add test for user interactive behavior "yes" whereby improving coverage to 62.62 % * refactor: - shallow-test encapsulated function ask_golem_creation_file() - remove redundant check_file_exist() which is never used inside `{golem}`! - improve formatting of some comments inside create_if_needed() => improve test coverage to 67.79% * tests: increaset R/utils.R coverage to 88.98% - snapshot tests save the output of cli-messages and check options - if cli:: package changes we see a different output and the snapshots will inform about this - additionally check do_if_unquiet() feature of these message functions * chore set att_amend_desc default parameters --------- Co-authored-by: Ilya Zarubin <[email protected]>
…1080) * tests: add tests to increase test coverage - change filename: testthat style suggets naming "tests/test-with_opt.R" to test functions in a file named "R/with_opt.R" - improve tests for maintenance mode to see whether it works with setting options in a fresh golem - add tests for "SHINY_PORT" Refs: #1065 * tests: add tests to further increase coverage Add a test for get_golem_options() function which was untested before. * tests: test with_golem_options() with print=TRUE - formatting with grk - update comments to explain the test - update the SHINY_PORT test to actually test the behaviour properly - add a new test to check whether print=TRUE works inside with_golem_options() Co-authored-by: Ilya Zarubin <[email protected]>
* Fix 1026 (#1064) * docs: link to golemverse for external resources The "Example Apps" section on the golemverse page is missing, so I kept it there for as a level two header (in case one wants to copy it to the golemvsere page). * docs: move sections with relevant content for the user to the top I. user preferences in terms of priority (more or less ...) probably 1. Installation 2. New project creation 3. Every day workflow 4. Additional resources 5. Meta info such as about (golem version/code coverage), CoC, how to contribute etc. II. developer preference in terms of priority (more or less ...) probably 1. Meta info in the "About" section golem version/code coverage 2. the rest from above Though I'd prefer the current ordering myself it might be a wise choice to change it towards the user, but that's a matter of taste. Fix some typos and markdown styling. --------- Co-authored-by: vincent guyader <[email protected]> * chore update README fix #1026 --------- Co-authored-by: Ilya Zarubin <[email protected]>
* Fix 1058, 1060, 1062 and improve code coverage in `use_files.R` from 0 to 100% (#1059) * tests: add dummy files for use_{external,internal}_XXX_files() testing - add some dummy files to the inst/utils/ directory - for later: add tests that download exactly from that directory Refs: #1058 * tests: add testing for external-funcs standard cases * tests: add testing for internal-funcs standard cases - fix typo in testfile_template_html - use styler::style_file(..., style = grkstyle::grk_style_transformer) * fix: set default value for argument name before using it - the order needs a change at some places: first set a default value when name argument is missing - only then call check_name_length() to avoid errors of the type: "argument "name" is missing, with no default" - also, to avoid RStudio and other IDEs linting a missing argument, provide a default value "NULL" for argument 'name' Refs: #1060 * feat: improve error handling and allow codecovr. to be 100% - instead of throwing an error, return 'FALSE' is passed and cat_dir_necessary() prints an informative message to the user (with the same effect i.e. not creating a directory) - this behavior is a bit more userfriendly and also allows for a code coverage of 100%; the latter is not possible to implement since tests are run non-interactively * tests: add corner cases for tests to make covr. 100% * chore bump coverage --------- Co-authored-by: Ilya Zarubin <[email protected]>
* add user supplied `file` for `run_dev()` & make covr. 100% for `run_dev.R` (#1050) * fix: user supplied 'file'-argument works correctly - use path constructed from 'file' argument instead of hard code "dev/run_dev.R" - improve error message on failure Refs: #886 * tests: improve test-covr. of run_dev.R form 0% to 100% - add test for default 'file' argument - add test for user supplied 'file' argument where - run_dev.R renamed to run_dev2.R - path to run_dev changed to top-level golem path - add test for error if run_dev cannot find the 'file' * docs: update docs for run_dev - give a bit more context on usage - fix some typos - use markdown highlighting consistently - add invisible return as this is a pure side-effect function * core update README --------- Co-authored-by: Ilya Zarubin <[email protected]>
- pre-pend "/private" in a path construction on MAC-OS to fix test failures in `tests/testthat/test-config.R` - encapsulate path construction to separate function for readability -> `tests/testthat/helper-config.R` and update `test-config.R`
avoid title warning in roxygen checks
* 942 install sass if missing (#1028) * refactor: install_dev_deps can now install specific packages * fix: fix the bug at "sass::" line of dev/run_dev.R * refactor : `run_dev` use `attachment::att_from_script` to detect dev/run_dev.R dependencies * fix add httpuv in dev_deps --------- Co-authored-by: Ilya Zarubin <[email protected]>
also remove two redundant white-space characters
add_empty_file creates an empty file in the www directory in the spirit of the add_* functions issue #837
- add chunk inside R/03_deploy.R that has the relevant call to rsconnect::writeManifest - while already here: update file with RStudio -> Posit - some styling (--- for code folding and re-group function calls a bit)
- consistent code formatting with `` - some typos - remove some redundant whitespace - Remove double "####" headers in a row - update with rsconnect::writeManifest() information
- everything that is called by the user during setup (i.e. the 01_start-file) gets into the initial commit, and one can move on with a clean state (to 02_dev e.g.)
- fix some typos and markdown - add previous feature to NEWS.md
-> stops committing more than necessary i.e. another `man/run_app.Rd` file
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.
No description provided.