File: Makefile

package info (click to toggle)
pynpoint 0.11.0-7
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,412 kB
  • sloc: python: 13,645; makefile: 79
file content (76 lines) | stat: -rw-r--r-- 1,936 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.PHONY: help pypi pypi-test test coverage docs clean clean-build clean-python clean-test

help:
	@echo "pypi - submit to PyPI server"
	@echo "pypi-test - submit to TestPyPI server"
	@echo "docs - generate Sphinx documentation"
	@echo "test - run unit tests"
	@echo "coverage - check code coverage"
	@echo "clean - remove all artifacts"
	@echo "clean-build - remove build artifacts"
	@echo "clean-python - remove Python artifacts"
	@echo "clean-test - remove test artifacts"

pypi:
	python setup.py sdist bdist_wheel
	twine check dist/*
	twine upload dist/*

pypi-test:
	python setup.py sdist bdist_wheel
	twine upload --repository-url https://test.pypi.org/legacy/ dist/*

docs:
	rm -f docs/pynpoint.core.rst
	rm -f docs/pynpoint.readwrite.rst
	rm -f docs/pynpoint.processing.rst
	rm -f docs/pynpoint.util.rst
	sphinx-apidoc -o docs pynpoint
	cd docs/
	$(MAKE) -C docs clean
	$(MAKE) -C docs html

test:
	pytest --cov=pynpoint/ --cov-report=xml

coverage:
	coverage run --rcfile .coveragerc -m py.test
	coverage combine
	coverage report -m
	coverage html

clean: clean-build clean-python clean-test

clean-build:
	rm -rf dist/
	rm -rf build/
	rm -rf htmlcov/
	rm -rf .eggs/
	rm -rf docs/_build
	rm -rf docs/tutorials/PynPoint_config.ini
	rm -rf docs/tutorials/PynPoint_database.hdf5
	rm -rf docs/tutorials/betapic_naco_mp.hdf5
	rm -rf docs/tutorials/hd142527_zimpol_h-alpha.tgz
	rm -rf docs/tutorials/input
	rm -rf docs/tutorials/.ipynb_checkpoints
	rm -rf docs/tutorials/*.fits
	rm -rf docs/tutorials/*.dat
	rm -rf docs/tutorials/*.npy

clean-python:
	find . -name '*.pyc' -exec rm -f {} +
	find . -name '*.pyo' -exec rm -f {} +
	find . -name '*~' -exec rm -f {} +
	find . -name '__pycache__' -exec rm -rf {} +

clean-test:
	rm -f coverage.xml
	rm -f .coverage
	rm -f .coverage.*
	rm -rf .tox/
	rm -rf pynpoint.egg-info/
	rm -f junit-docs-ci.xml
	rm -f junit-py27.xml
	rm -f junit-py36.xml
	rm -f junit-py37.xml
	rm -rf .pytest_cache/