forked from uptake/uptasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (43 loc) · 1.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.PHONY: docs_r r-pkg
#####
# R #
#####
build_r:
cp test-data/* r-pkg/inst/testdata/
cp NEWS.md r-pkg/
cp README.md r-pkg/
R CMD BUILD r-pkg/
coverage_r: build_r
echo "Calculating test coverage..."
Rscript -e "Sys.setenv(NOT_CRAN = 'true'); coverage <- covr::package_coverage('r-pkg/'); print(coverage); covr::report(coverage, './coverage.html')"
echo "Done calculating coverage"
open coverage.html
docs_r: build_r
Rscript -e "devtools::document('r-pkg/')"
Rscript -e "pkgdown::build_site('r-pkg/')"
install_r: build_r
R CMD INSTALL r-pkg/
test_r: build_r
R CMD CHECK --as-cran uptasticsearch_*.tar.gz
##########
# Python #
##########
build_py:
cp LICENSE py-pkg/
cp NEWS.md py-pkg/
cp README.md py-pkg/
docs_py:
# Create sphinx rst files for every package and subpackage
cd py-pkg && \
sphinx-apidoc -f -F -e -o docs uptasticsearch && \
cd docs && \
make html
install_py:
pip install py-pkg/
test_py:
pytest py-pkg/
###########
# General #
###########
gh_pages: docs_r
cp -R r-pkg/docs/* docs/