File: Makefile

package info (click to toggle)
python-weblogo 3.8.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,700 kB
  • sloc: xml: 14,455; python: 10,384; sh: 140; makefile: 58
file content (58 lines) | stat: -rw-r--r-- 1,631 bytes parent folder | download | duplicates (2)
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
# top-level pyquil Makefile

NAME = weblogo
FILES = $(NAME) tests docs/conf.py setup.py

USER = -i ~/.ssh/aws_kaiju.pem ec2-user
HOST = weblogo.threeplusone.com
DIR = /home/ec2-user/weblogo


# Kudos: Adapted from Auto-documenting default target 
# https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
help:
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-12s\033[0m %s\n", $$1, $$2}'

test:  ## Run unittests with current enviroment
	@python -m pytest

cov:  ## Report test coverage
	@python -m pytest --cov=weblogo --cov-report term-missing

lint:  ## Lint check python source
	@isort --check $(FILES)  ||  echo "isort:   FAILED!"
	@black --check --quiet $(FILES)    || echo "black:   FAILED!"
	@flake8 $(FILES)

delint:   ## Run isort and black to delint project
	@echo
	isort $(FILES)
	@echo
	black $(FILES)
	@echo

types:  ## Report type errors and untyped functions
	@mypy weblogo tests --ignore-missing-imports --follow-imports=skip --disallow-untyped-defs

docs:  ## Build documentation
	$(MAKE) -C docs html && open docs/_build/html/index.html

examples:  ## Build examples
	cd weblogo/htdocs/examples && ./build_examples.sh

login:  ## ssh into remote server
	ssh  ${USER}@${HOST}

sync:  ## Sync remote server
	ssh ${USER}@${HOST} 'cd weblogo && git pull'

reinstall:	## Reinstall weblogo on remote server
	# pip install needed to update versions with latest git tag
	ssh ${USER}@${HOST} 'cd weblogo && sudo pip3 install -e .'

restart:  	## Restart remote server
	ssh ${USER}@${HOST} 'sudo systemctl restart httpd.service'


.PHONY: help
.PHONY: docs