forked from pyjanitor-devs/pyjanitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (40 loc) · 1.26 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
SHELL=/bin/bash
ACTIVATE=source activate pyjanitor-dev
release:
rm -f dist/*
python setup.py sdist bdist_wheel
twine upload dist/*
# Note to self:
# makefile has not been fully tested.
# DO NOT COMMIT until testing is done.
#
# ALSO, remove this comment once it's tested!!!!!!!!!!!
.PHONY: format test lint docs isort check style notebooks install
format:
@echo "Applying Black Python code formatting..."
black -l 79 .
test:
@echo "Running test suite..."
pytest --cov-report html
lint:
@echo "Checking code formatting..."
flake8 . --exclude "./nbconvert_config.py, ./env, ./venv ./build"
docs:
@echo "Building documentation..."
cd docs && make html
isort:
@echo "Sorting imports..."
isort -rc . -y -up -tc
check: test docs notebooks isort format lint
@echo "checks complete"
style: isort format
@echo "styling complete"
install:
@echo "Creating Conda environment..."
conda env create -f environment-dev.yml
@echo "Installing PyJanitor in development mode..."
$(ACTIVATE) && python setup.py develop
@echo "Registering current virtual environment as a Jupyter Python kernel..."
$(ACTIVATE) && python -m ipykernel install --user --name pyjanitor-dev --display-name "PyJanitor development"
@echo "Installing pre-commit hooks"
$(ACTIVATE) && pre-commit install