forked from ReactionMechanismGenerator/RMG-Py
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
57 lines (46 loc) · 1.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
################################################################################
#
# Makefile for RMG Py
#
################################################################################
.PHONY : all minimal main measure solver cantherm clean decython
all: main measure solver
minimal:
python setup.py build_ext minimal --build-lib . --build-temp build --pyrex-c-in-temp
main:
python setup.py build_ext main --build-lib . --build-temp build --pyrex-c-in-temp
measure:
python setup.py build_ext measure --build-lib . --build-temp build --pyrex-c-in-temp
solver:
python setup.py build_ext solver --build-lib . --build-temp build --pyrex-c-in-temp
cantherm:
python setup.py build_ext cantherm --build-lib . --build-temp build --pyrex-c-in-temp
clean:
python setup.py clean --build-temp build
rm -rf build/
find . -name '*.so' -exec rm -f '{}' \;
find . -name '*.pyc' -exec rm -f '{}' \;
decython:
# de-cythonize all but the 'minimal'. Helpful for debugging in "pure python" mode.
find . -name *.so ! \( -name _statmech.so -o -name quantity.so -o -regex '.*rmgpy/measure/.*' -o -regex '.*rmgpy/solver/.*' \) -exec rm -f '{}' \;
find . -name *.pyc -exec rm -f '{}' \;
test:
nosetests --all-modules --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage rmgpy
eg1: all
mkdir -p testing/minimal
rm -rf testing/minimal/*
cp examples/rmg/minimal/input.py testing/minimal/input.py
coverage erase
echo "Running with coverage tracking AND profiling"
coverage run rmg.py -p testing/minimal/input.py
coverage report
coverage html
eg2: all
mkdir -p testing/hexadiene
rm -rf testing/hexadiene/*
cp examples/rmg/1,3-hexadiene/input.py testing/hexadiene/input.py
coverage erase
echo "Running with coverage tracking AND profiling"
coverage run rmg.py -p testing/hexadiene/input.py
coverage report
coverage html