-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/0.1' into production
- Loading branch information
Showing
36 changed files
with
616 additions
and
83 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ | |
^wercker\.yml$ | ||
^readme$ | ||
^appveyor\.yml$ | ||
^makeR$ |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
Package: rprojroot | ||
Title: Finding Files in Project Subdirectories | ||
Version: 0.0-8 | ||
Version: 0.1 | ||
Authors@R: as.person("Kirill Müller <krlmlr+r@mailbox.org> [aut, cre]") | ||
Description: Robust, reliable and flexible paths to files below a project root. | ||
The 'root' of a project is defined as a directory that matches a certain | ||
criterion, e.g., it contains a certain regular file. | ||
Depends: | ||
R (>= 3.0.0) | ||
Suggests: | ||
testthat, | ||
knitr, | ||
rmarkdown | ||
Description: Robust, reliable and flexible paths to files below a | ||
project root. The 'root' of a project is defined as a directory | ||
that matches a certain criterion, e.g., it contains a certain | ||
regular file. | ||
Depends: R (>= 3.0.0) | ||
Suggests: testthat, knitr, rmarkdown | ||
VignetteBuilder: knitr | ||
License: GPL-3 | ||
LazyData: true | ||
Encoding: UTF-8 | ||
GitHub: https://github.com/krlmlr/rprojroot | ||
URL: https://krlmlr.github.io/rprojroot | ||
BugReports: https://github.com/krlmlr/rprojroot/issues | ||
RoxygenNote: 5.0.1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
-include makeR/Makefile | ||
-include Makefile.in | ||
|
||
init: | ||
git submodule update --init |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,24 @@ | ||
Version 0.0-8 (2015-06-03) | ||
=== | ||
|
||
- use `dirname` instead of `normalizePath("..")` | ||
|
||
Version 0.0-7 (2015-05-31) | ||
=== | ||
|
||
- Use `winslash = "/"` for consistent tests and behavior | ||
- Replace potentially endless loop with a limited loop | ||
- Test on Windows with appveyor | ||
|
||
Version 0.0-6 (2015-05-29) | ||
=== | ||
|
||
- Full test coverage | ||
|
||
Version 0.0-5 (2015-05-29) | ||
=== | ||
|
||
- New function `as.root_criterion` (called by `find_root()`), a character argument is converted to a `has_file()` criterion. Now the call `find_root("filename")` is identical to `find_root(has_file("filename"))`. | ||
- Use `"."` instead of `"getwd()"` as default for `path` argument | ||
- Improved documentation | ||
|
||
Version 0.0-4 (2015-05-20) | ||
=== | ||
|
||
- New variables `criteria`, `is_rstudio_project`, `is_r_package` | ||
- New function `has_file_pattern` (was previously `has_file`); the `has_file` function now checks the entire file name without pattern matching | ||
|
||
Version 0.0-3 (2015-05-20) | ||
=== | ||
|
||
- Criterion concept: constructors `root_criterion` and `has_file` | ||
- All functions that used to accept `filename` + `contents` + `n` now accept only a criterion | ||
|
||
Version 0.0-2 (2015-05-19) | ||
=== | ||
|
||
- Factory `make_fix_root_file` that fixes the working directory | ||
|
||
Version 0.0-1 (2015-05-19) | ||
=== | ||
|
||
- Initial version | ||
- Main workhorse function `find_root` | ||
- Wrapper `find_root_file` | ||
- Factory `make_find_root_file` and helpers `find_rstudio_root_file` and `find_package_root_file` | ||
- Vignette | ||
Version 0.1 (2016-02-03) | ||
=== | ||
|
||
Initial GitHub release. | ||
|
||
- Getting started: | ||
- `find_package_root_file()` | ||
- `find_rstudio_root_file()` | ||
|
||
- S3 class `root_criterion`: | ||
- `root_criterion()` | ||
- `as.root_criterion()` | ||
- `is.root_criterion()` | ||
- `has_file()` | ||
- `has_file_pattern()` | ||
- `criteria` | ||
- `is_r_package` | ||
- `is_rstudio_project` | ||
|
||
- Use a custom notion of a project root: | ||
- `find_root()` | ||
- `find_root_file()` | ||
- `make_find_root_file()` | ||
- `make_fix_root_file()` |
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
Submodule makeR
deleted from
4a79b0
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
R := R --no-save --no-restore | ||
RSCRIPT := Rscript | ||
DELETE := rm -fR | ||
PKGNAME := $(shell Rscript ./makeR/get-pkg-name) | ||
VERSION := $(shell Rscript ./makeR/get-pkg-version) | ||
TARGZ := $(PKGNAME)_$(VERSION).tar.gz | ||
|
||
.SILENT: | ||
|
||
.FORCE: | ||
|
||
usage: | ||
echo "Available targets:" | ||
echo "" | ||
echo " clean - Clean everything up" | ||
echo " bump-cran - Bump second digit of version (0.1 -> 0.2) and tag" | ||
echo " bump-gh - Bump third digit of version (0.1.2 -> 0.1.3) and tag" | ||
echo " bump - Bump fourth digit of version (0.1.2.3 -> 0.1.2.4) and tag" | ||
echo " rd - Create documentation via roxygen2" | ||
echo " install - Install dependencies" | ||
echo " dependencies " | ||
echo " dt_* - Run devtools verb" | ||
echo " test - Run tests" | ||
echo " covr - Check coverage" | ||
echo " lintr - Run lintr" | ||
echo " check-rev-dep - Run a reverse dependency check against packages on CRAN" | ||
echo " check-rd-files - Run Rd2pdf on each doc file to track hard-to-spot doc/latex errors" | ||
echo " winbuilder - Ask for email and build on winbuilder" | ||
echo " init-gh-pages - Initialize orphan gh-pages branch" | ||
echo " staticdocs - Build staticdocs in inst/web" | ||
echo " gh-pages-build - Populate gh-pages branch with staticdocs" | ||
echo " gh-pages-push - Push gh-pages branch to GitHub Pages" | ||
echo " view-docs - View staticdocs locally" | ||
echo " init-wercker - Install a default wercker.yml" | ||
echo " wercker-build - Run wercker build for local instance of docker" | ||
echo " wercker-deploy - Run wercker deploy for local instance of docker" | ||
echo " upgrade - upgrade installation of makeR" | ||
echo " uninstall - uninstall makeR" | ||
|
||
|
||
## Script targers | ||
|
||
git-is-clean branch-is-master init-gh-pages init-staticdocs gh-pages-build postinstall init-wercker: | ||
sh ./makeR/$@ | ||
|
||
|
||
|
||
## devtools targets: | ||
|
||
# ls("package:devtools") %>% setNames(nm=.) %>% lapply(get) %>% lapply(formals) %>% lapply(`[`, 1) %>% lapply(names) %>% equals("pkg") %>% Filter(isTRUE, .) %>% names %>% sprintf("dt_%s", .) %>% cat | ||
dt_add_rstudio_project dt_add_test_infrastructure dt_add_travis dt_bash dt_build dt_build_vignettes dt_build_win dt_check dt_check_doc dt_clean_dll dt_clean_vignettes dt_compile_dll dt_document dt_imports_env dt_install dt_install_deps dt_lint dt_load_all dt_load_code dt_load_data dt_load_dll dt_missing_s3 dt_ns_env dt_parse_ns_file dt_pkg_env dt_release dt_release_checks dt_reload dt_revdep dt_revdep_check dt_revdep_maintainers dt_run_examples dt_show_news dt_submit_cran dt_test dt_unload dt_use_appveyor dt_use_cran_comments dt_use_data_raw dt_use_package_doc dt_use_rcpp dt_use_readme_rmd dt_use_revdep dt_use_rstudio dt_use_testthat dt_use_travis dt_wd: | ||
|
||
dt_%: git-is-clean | ||
Rscript -e "devtools::$(subst dt_,,$@)()" | ||
git add . | ||
git commit -m "$(subst dt_,,$@)" | ||
|
||
|
||
|
||
## Helper targers | ||
|
||
git-is-clean: | ||
|
||
branch-is-master: git-is-clean | ||
|
||
tag: | ||
(echo Release v$$(sed -n -r '/^Version: / {s/.* ([0-9.-]+)$$/\1/;p}' DESCRIPTION); echo; sed -n '/^===/,/^===/{:a;N;/\n===/!ba;p;q}' NEWS.md | head -n -3 | tail -n +3) | git tag -a -F /dev/stdin v$$(sed -n -r '/^Version: / {s/.* ([0-9.-]+)$$/\1/;p}' DESCRIPTION) | ||
|
||
bump-cran-desc: git-is-clean rd | ||
crant -u 2 -C | ||
|
||
bump-gh-desc: git-is-clean rd | ||
crant -u 3 -C | ||
|
||
bump-desc: git-is-clean rd | ||
test "$$(git status --porcelain | wc -c)" = "0" | ||
sed -i -r '/^Version: / s/( [0-9.]+)$$/\1-0.0/' DESCRIPTION | ||
git add DESCRIPTION | ||
test "$$(git status --porcelain | wc -c)" = "0" || git commit -m "add suffix -0.0 to version" | ||
crant -u 4 -C | ||
|
||
inst/NEWS.Rd: git-is-clean NEWS.md | ||
Rscript -e "tools:::news2Rd('$(word 2,$^)', '$@')" | ||
sed -r -i 's/`([^`]+)`/\\code{\1}/g' $@ | ||
git add $@ | ||
test "$$(git status --porcelain | wc -c)" = "0" || git commit -m "update NEWS.Rd" | ||
|
||
inst/web: | ||
mkdir -p inst | ||
git branch gh-pages origin/gh-pages || true | ||
git clone --branch gh-pages . inst/web | ||
|
||
|
||
|
||
## Cleanup | ||
|
||
clean: | ||
echo "Cleaning up ..." | ||
${DELETE} src/*.o src/*.so *.tar.gz | ||
${DELETE} *.Rcheck | ||
${DELETE} .RData .Rhistory | ||
|
||
|
||
|
||
## Tagging | ||
|
||
bump-cran: bump-cran-desc inst/NEWS.Rd tag | ||
|
||
bump-gh: bump-gh-desc inst/NEWS.Rd tag | ||
|
||
bump: bump-desc inst/NEWS.Rd tag | ||
|
||
|
||
|
||
## Documentation | ||
|
||
rd: git-is-clean | ||
Rscript -e "library(methods); devtools::document()" | ||
git add man/ NAMESPACE | ||
test "$$(git status --porcelain | wc -c)" = "0" || git commit -m "document" | ||
|
||
|
||
|
||
## Testing | ||
|
||
dependencies-hook: | ||
|
||
install dependencies: dependencies-hook | ||
Rscript -e "sessionInfo()" | ||
Rscript -e "options(repos = c(CRAN = 'http://cran.rstudio.com')); devtools::install_deps(dependencies = TRUE, upgrade = FALSE)" | ||
|
||
test: | ||
Rscript -e "devtools::check(document = TRUE, check_dir = '.', cleanup = FALSE)" | ||
! egrep -A 5 "ERROR|WARNING|NOTE" *.Rcheck/00check.log | ||
|
||
covr: | ||
Rscript -e 'if (!requireNamespace("covr")) devtools::install_github("jimhester/covr"); covr::codecov()' | ||
|
||
lintr: | ||
Rscript -e 'Sys.setenv(LINTR_COMMENT_BOT="FALSE"); if (!requireNamespace("lintr")) devtools::install_github("jimhester/lintr"); lintr::lint_package()' | ||
|
||
check-rev-dep: | ||
echo "Running reverse dependency checks for CRAN ..." | ||
${RSCRIPT} ./makeR/check-rev-dep | ||
|
||
check-rd-files: rd | ||
echo "Checking RDs one by one ..." | ||
${RSCRIPT} ./makeR/check-rd-files | ||
|
||
winbuilder: rd | ||
echo "Building via winbuilder" | ||
${RSCRIPT} ./makeR/winbuilder | ||
|
||
|
||
|
||
# staticdocs | ||
|
||
gh-pages-init: | ||
|
||
init-staticdocs: | ||
|
||
staticdocs: inst/web | ||
Rscript -e 'if (!requireNamespace("staticdocs")) devtools::install_github("gaborcsardi/staticdocs"); staticdocs::build_site()' | ||
|
||
gh-pages-build: staticdocs | ||
|
||
gh-pages-push: | ||
git push origin gh-pages | ||
|
||
view-html-vignettes: | ||
chromium-browser inst/doc/*.html | ||
|
||
view-docs: | ||
chromium-browser inst/web/index.html | ||
|
||
|
||
|
||
## wercker | ||
|
||
init-wercker: git-is-clean | ||
|
||
wercker-build: | ||
wercker build --docker-host=unix://var/run/docker.sock --no-remove | ||
|
||
wercker-deploy: | ||
wercker deploy --docker-host=unix://var/run/docker.sock --no-remove | ||
|
||
|
||
|
||
## Maintenance | ||
|
||
postinstall: git-is-clean | ||
|
||
upgrade: git-is-clean | ||
echo "Upgrading makeR" | ||
sh ./makeR/upgrade | ||
|
||
uninstall: git-is-clean | ||
echo "Uninstalling makeR" | ||
sh ./makeR/uninstall | ||
|
||
|
||
## Obsolete | ||
|
||
init: | ||
true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-include makeR/Makefile | ||
-include Makefile.in |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
## makeR | ||
|
||
Makefile and tools for R packages | ||
|
||
This is a git submodule we include in our R packages to have a Makefile and some tools for package building, testing and documentation generation. Including this as a submodule in other projects enables us to hold the code for this in one central place (i.e., here) without copy-paste horror. | ||
|
||
The submodule is always included under the path 'makeR' in the respective package repositories, e.g., look here: | ||
https://github.com/berndbischl/BBmisc | ||
|
||
### Upgrading | ||
|
||
The installation method has switched from submodules to subtrees. To upgrade an existing submodule-based installation, please run `make uninistall` first; you may also want to remove the `.gitmodules` file if you do not use other submodules. After switching, you can run `make upgrade` as usual for further upgrades. | ||
|
||
|
||
### Installing the subtree | ||
|
||
Execute the following in a terminal: | ||
|
||
``` | ||
curl http://krlmlr.github.io/makeR/install2 | sh | ||
``` | ||
|
||
Take a look at [the installer script](https://github.com/krlmlr/makeR/blob/gh-pages/install2) if you're curious. | ||
|
||
|
||
### Updating makeR | ||
|
||
If you want to update the makeR tool chain, run: | ||
|
||
``` | ||
make upgrade | ||
``` | ||
|
||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
test $(git rev-parse --abbrev-ref HEAD) = "master" |
Oops, something went wrong.