forked from jpmorganchase/jupyter-fs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
102 lines (77 loc) · 2.86 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
PIP := pip
PYTHON := python
YARN := jlpm
testjs: ## Make js tests
cd js; ${YARN} test
testpy: ## Make py tests
${PYTHON} -m pytest -v jupyterfs/tests --cov=jupyterfs --cov-branch --junitxml=python_junit.xml --cov-report=xml
testbrowser:
cd js; ${YARN} test:browser
test: ## run all tests
make testjs
make testpy
make testbrowser
lintjs: ## run linter
cd js; ${YARN} lint
lintpy: ## run linter
${PYTHON} -m black jupyterfs setup.py docs/conf.py --check
${PYTHON} -m flake8 jupyterfs setup.py docs/conf.py
lint: ## run linter
make lintjs
make lintpy
fixjs: ## run tslint fix
cd js; ${YARN} fix
fixpy: ## run black
${PYTHON} -m black jupyterfs/ setup.py docs/conf.py
fix: ## run black/tslint fix
make fixjs
make fixpy
clean: ## clean the repository
## python tmp state
find . -name "__pycache__" | xargs rm -rf
find . -name "*.pyc" | xargs rm -rf
find . -name ".ipynb_checkpoints" | xargs rm -rf
## binder/repo2docker mess
rm -rf binder/.[!.]* binder/*.ipynb
## build state
cd js; ${YARN} clean:slate
rm -rf *.egg-info *junit.xml .*-log.txt .jupyter/ .local/ .pytest_cache/ build/ coverage* dist/ MANIFEST node_modules/ pip-wheel-metadata jupyterfs/labextension
# make -C ./docs clean
## package lock files
# rm -rf package-lock.json yarn-lock.json js/package-lock.json js/yarn-lock.json
dev_install: dev_serverextension dev_labextension ## set up the repo for active development
# verify
${PYTHON} -m jupyter serverextension list
${PYTHON} -m jupyter server extension list
${PYTHON} -m jupyter labextension list
dev_labextension: ## build and install labextension for active development
${PYTHON} -m jupyter labextension develop --overwrite .
dev_serverextension: ## install and enable serverextension for active development
${PIP} install -e .[dev]
${PYTHON} -m jupyter server extension enable --py jupyterfs.extension
docs: ## make documentation
make -C ./docs html
open ./docs/_build/html/index.html
install: ## do standard install of both server/labextension to site-packages
${PIP} install .
js: ## build javascript
cd js; ${YARN} integrity
cd js; ${YARN} build
dist: clean ## create dists
${PYTHON} setup.py sdist bdist_wheel
publish: dist ## dist to pypi and npm
twine check dist/* && twine upload dist/*
cd js; npm publish
publishdry: dist ## dry-run dist to pypi and npm
twine check dist/*
cd js; npm publish --dry-run
publishtest: dist ## release to test pypi, dry-run npm publish
twine check dist/* && twine upload --repository-url https://test.pypi.org/legacy/ dist/*
cd js; npm publish --dry-run
# Thanks to Francoise at marmelab.com for this
.DEFAULT_GOAL := help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
print-%:
@echo '$*=$($*)'
.PHONY: clean dev_install dev_labextension dev_serverextension dist docs help install js test tests