-
Notifications
You must be signed in to change notification settings - Fork 23
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
vignette for simple use cases? #26
Comments
There is a section "testthat files" in the existing vignette, is anything missing from there? Maybe it should be more visible, or the vignette needs a better structure? Either way, happy to review your PR! |
I don't think anything is missing at all! I opened the issue because the power and flexibility of I can add my thoughts to the vignette. Should I PR to master, develop, or some other branch? |
Thanks, master is fine (I just removed the develop branch). |
If you're tinkering in the vignette ... if there are lots of reference files, it can be nice to create a folder for them and a helper function in |
Fixes #1 Thanks to Jennny Bryan's suggestion to use a helper.R script, as discussed in r-lib/rprojroot#26
@jennybc: Would a test_sheet <- rprojroot::is_testthat$make_fix_file(subdir = "sheets")
test_sheet
## function (...) {
## file.path("/.../rprojroot/tests/testthat", "sheets", ...)
## } |
- Add more examples to vignette (#26, @BarkleyBG).
- New `thisfile()` moved from kimisc (#8). - Add more examples to vignette (#26, @BarkleyBG).
- Adapt to testthat 2.0.0. - New `thisfile()`, moved from kimisc (#8). - Add more examples to vignette (#26, @BarkleyBG). - Detect `.git` directories created with `git clone --separate-git-dir=...` (#24, @karldw).
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary. |
I thought the vignette was helpful. Perhaps some very short examples could also be helpful?
Here's a very short, concrete example that for the user would be:
- useful and important
- easy to implement
so I think it would be a great way to show off the utility/power/ease of
rprojroot
I was able to get this working for my use case in one-line of code. I have a package and I have some baseline data for unit tests that I was storing in an .Rds file:
Previously, I had some if-then syntax for whether I was running interactively or via
devtools::test()
. Basically, I'd try to determine what the working directory was, and then specify the relative path from that; i think rprojroot does ~ exactly this, but with one line.So I replaced the above with the below:
I can write up a short vignette & start a PR if you'd like. Thanks for making my life better!
The text was updated successfully, but these errors were encountered: