1
1
MODULE := psi4_step
2
2
.PHONY : help clean clean-build clean-docs clean-pyc clean-test lint format typing test
3
3
.PHONY : dependencies test-all coverage html docs servedocs release check-release
4
- .PHONY : dist install uninstall
4
+ .PHONY : dist install uninstall image uninstall-image
5
5
.DEFAULT_GOAL := help
6
+
6
7
define BROWSER_PYSCRIPT
7
8
import os, webbrowser, sys
8
9
try:
@@ -12,6 +13,7 @@ except:
12
13
13
14
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
14
15
endef
16
+
15
17
export BROWSER_PYSCRIPT
16
18
17
19
define PRINT_HELP_PYSCRIPT
@@ -23,7 +25,9 @@ for line in sys.stdin:
23
25
target, help = match.groups()
24
26
print("%-20s %s" % (target, help))
25
27
endef
28
+
26
29
export PRINT_HELP_PYSCRIPT
30
+
27
31
BROWSER := python -c "$$BROWSER_PYSCRIPT"
28
32
29
33
help :
@@ -59,20 +63,16 @@ format: ## reformat with with yapf and isort
59
63
black --extend-exclude ' _version.py' $(MODULE ) tests
60
64
61
65
test : # # run tests quickly with the default Python
62
- pytest tests/
66
+ pytest --doctest-modules tests $( MODULE )
63
67
64
- coverage : # # check code coverage quickly with the default Python
65
- pytest -v --cov=$(MODULE ) --cov-report term --color=yes tests/
68
+ dependencies :
69
+ pur -r requirements_dev.txt
70
+ pip install -r requirements_dev.txt
66
71
67
- coverage-html : # # check code coverage quickly with the default Python, showing as html
68
- pytest -v --cov=$(MODULE ) --cov-report=html:htmlcov --cov-report term --color=yes tests/
72
+ coverage : clean-test # # check code coverage quickly with the default Python
73
+ pytest -v --doctest-modules -- cov=$(MODULE ) --cov-report=html tests/ $( MODULE )
69
74
$(BROWSER ) htmlcov/index.html
70
75
71
- clean-docs : # # remove files associated with building the docs
72
- rm -f docs/api/$(MODULE ) .rst
73
- rm -f docs/api/modules.rst
74
- $(MAKE ) -C docs clean
75
-
76
76
html : clean-docs # # generate Sphinx HTML documentation, including API docs
77
77
sphinx-apidoc -o docs/api $(MODULE )
78
78
$(MAKE ) -C docs html
@@ -100,3 +100,9 @@ install: uninstall ## install the package to the active Python's site-packages
100
100
101
101
uninstall : clean # # uninstall the package
102
102
pip uninstall --yes $(MODULE )
103
+
104
+ image : uninstall-image # # Make the Docker image
105
+ docker image build --progress plain --file devtools/docker/Dockerfile --tag ghcr.io/molssi-seamm/seamm-psi4:latest .
106
+
107
+ uninstall-image : # # Remove the docker image
108
+ docker image rm --force ghcr.io/molssi-seamm/seamm-psi4:latest
0 commit comments