forked from ialbert/bio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (43 loc) · 1.23 KB
/
Copy pathMakefile
File metadata and controls
61 lines (43 loc) · 1.23 KB
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
.PHONY: dist build test docs
# Location of the documentation branch.
REMOTE=www@bioinfo.help:~/sites/bioinfo.help/
all: serve
# Run the tests.
test:
pytest
# Generate the test data for the tests.
build_data:
(cd test/data && bash ../bio-examples.sh)
# Generate test from the example script.
build_test:
(cd test && python generate.py)
pytest
# Generate the docs.
docs:
(cd docs && Rscript -e "bookdown::render_book(input='index.txt', output_dir='.book', output_format='bookdown::gitbook')")
# Push out the docs to remote docs.
sync:
rsync -avz docs/.book/* ${REMOTE}
# Serve the documentation as a webpage.
serve:
(cd docs && rm -rf .book)
Rscript -e "bookdown::serve_book(dir='docs', preview=TRUE, output_dir='.book', port=8000)"
# Clean the files.
clean:
rm -rf dist build bio.egg-info
# Quick push for small changes.
push:
git commit -am "docs updated by `whoami`"
git push
# Build Python package.
build:
python setup.py sdist bdist_wheel
# Upload new version to PyPI.
upload: test build
rm -rf dist
python setup.py sdist bdist_wheel
#python -m twine upload --repository testpypi dist/*
python -m twine upload --repository pypi dist/*
# Uploads prebuilt data to Google Cloud
upload_prebuilt:
bash docs/upload_prebuilt_data.sh