2013-04-03 21:02:42 -04:00
|
|
|
#URL="http://bucket.mit.edu:8080/nilmdb"
|
|
|
|
URL="http://localhost/nilmdb"
|
2013-03-30 17:30:10 -04:00
|
|
|
|
2013-08-07 20:19:39 -04:00
|
|
|
all: test
|
|
|
|
|
|
|
|
test:
|
2013-03-19 17:54:59 -04:00
|
|
|
ifeq ($(INSIDE_EMACS), t)
|
2013-08-16 15:36:11 -04:00
|
|
|
@make test_sinefit
|
2013-03-19 17:54:59 -04:00
|
|
|
else
|
2013-08-07 20:19:39 -04:00
|
|
|
@echo 'No test suite for nilmtools. Try "make install"'
|
2013-03-19 17:54:59 -04:00
|
|
|
endif
|
2013-03-19 15:41:20 -04:00
|
|
|
|
2013-07-29 14:58:15 -04:00
|
|
|
test_pipewatch:
|
|
|
|
nilmtools/pipewatch.py -t 3 "seq 10 20" "seq 20 30"
|
2013-07-09 16:53:47 -04:00
|
|
|
|
|
|
|
test_trainola:
|
2013-07-18 22:51:27 -04:00
|
|
|
-nilmtool -u http://bucket/nilmdb remove -s min -e max \
|
|
|
|
/sharon/prep-a-matches
|
2013-07-30 20:35:54 -04:00
|
|
|
nilmtools/trainola.py "$$(cat extras/trainola-test-param.js)"
|
|
|
|
|
|
|
|
test_trainola2:
|
2013-07-10 12:59:39 -04:00
|
|
|
-nilmtool -u http://bucket/nilmdb remove -s min -e max \
|
|
|
|
/sharon/prep-a-matches
|
2013-07-30 20:35:54 -04:00
|
|
|
nilmtools/trainola.py "$$(cat extras/trainola-test-param-2.js)"
|
2013-04-09 19:43:41 -04:00
|
|
|
|
2013-07-30 20:35:54 -04:00
|
|
|
test_trainola3:
|
|
|
|
-nilmtool -u "http://bucket/nilmdb" destroy -R /test/jim
|
|
|
|
nilmtool -u "http://bucket/nilmdb" create /test/jim uint8_3
|
|
|
|
nilmtools/trainola.py "$$(cat extras/trainola-test-param-3.js)"
|
|
|
|
nilmtool -u "http://bucket/nilmdb" extract /test/jim -s min -e max
|
2013-07-18 22:51:27 -04:00
|
|
|
|
2013-04-09 19:43:41 -04:00
|
|
|
test_cleanup:
|
2013-07-08 11:54:13 -04:00
|
|
|
nilmtools/cleanup.py -e extras/cleanup.cfg
|
|
|
|
nilmtools/cleanup.py extras/cleanup.cfg
|
2013-04-06 15:56:36 -04:00
|
|
|
|
|
|
|
test_insert:
|
2013-07-30 18:25:47 -04:00
|
|
|
nilmtools/insert.py --skip --file --dry-run /foo/bar ~/data/20130311T2100.prep1.gz ~/data/20130311T2100.prep1.gz ~/data/20130311T2200.prep1.gz
|
2013-04-05 16:13:41 -04:00
|
|
|
|
|
|
|
test_copy:
|
2013-07-08 11:54:13 -04:00
|
|
|
nilmtools/copy_wildcard.py -U "http://nilmdb.com/bucket/" -D /lees*
|
2013-04-04 14:52:54 -04:00
|
|
|
|
2013-07-03 12:06:46 -04:00
|
|
|
/tmp/raw.dat:
|
|
|
|
octave --eval 'fs = 8000;' \
|
|
|
|
--eval 't = (0:fs*10)*2*pi*60/fs;' \
|
|
|
|
--eval 'raw = transpose([sin(t); 0.3*sin(3*t)+sin(t)]);' \
|
|
|
|
--eval 'save("-ascii","/tmp/raw.dat","raw");'
|
|
|
|
|
|
|
|
test_prep: /tmp/raw.dat
|
2013-04-09 18:53:06 -04:00
|
|
|
-nilmtool destroy -R /test/raw
|
|
|
|
-nilmtool destroy -R /test/sinefit
|
|
|
|
-nilmtool destroy -R /test/prep
|
|
|
|
nilmtool create /test/raw float32_2
|
|
|
|
nilmtool create /test/sinefit float32_3
|
|
|
|
nilmtool create /test/prep float32_8
|
|
|
|
nilmtool insert -s '@0' -t -r 8000 /test/raw /tmp/raw.dat
|
2013-07-30 14:54:11 -04:00
|
|
|
nilmtools/sinefit.py -a 0.5 -c 1 -s '@0' -e '@5000000' /test/raw /test/sinefit
|
|
|
|
nilmtools/prep.py -c 2 /test/raw /test/sinefit /test/prep
|
2013-07-08 11:54:13 -04:00
|
|
|
nilmtools/prep.py -c 2 /test/raw /test/sinefit /test/prep
|
2013-04-09 18:53:06 -04:00
|
|
|
nilmtool extract -s min -e max /test/prep | head -20
|
2013-03-19 17:54:59 -04:00
|
|
|
|
2013-08-16 15:36:11 -04:00
|
|
|
test_sinefit:
|
|
|
|
make install >/dev/null 2>&1
|
|
|
|
-nilmtool destroy -R /test/sinefit
|
|
|
|
nilmtool create /test/sinefit float32_3
|
|
|
|
nilmtools/sinefit.py -c 5 -s '2013/03/25 09:11:00' \
|
|
|
|
-e '2013/03/25 10:11:00' /sharon/raw /test/sinefit
|
|
|
|
nilmtool extract -s min -e max /test/sinefit | head -20
|
|
|
|
|
2013-04-04 14:52:54 -04:00
|
|
|
test_decimate:
|
2013-03-16 14:46:49 -04:00
|
|
|
-@nilmtool destroy /lees-compressor/no-leak/raw/4 || true
|
|
|
|
-@nilmtool destroy /lees-compressor/no-leak/raw/16 || true
|
|
|
|
-@nilmtool create /lees-compressor/no-leak/raw/4 float32_18 || true
|
|
|
|
-@nilmtool create /lees-compressor/no-leak/raw/16 float32_18 || true
|
2013-07-08 11:54:13 -04:00
|
|
|
time python nilmtools/decimate.py -s '2013-02-04 18:10:00' -e '2013-02-04 18:11:00' /lees-compressor/no-leak/raw/1 /lees-compressor/no-leak/raw/4
|
|
|
|
python nilmtools/decimate.py -s '2013-02-04 18:10:00' -e '2013-02-04 18:11:00' /lees-compressor/no-leak/raw/4 /lees-compressor/no-leak/raw/16
|
2013-03-11 18:06:55 -04:00
|
|
|
|
|
|
|
version:
|
|
|
|
python setup.py version
|
|
|
|
|
|
|
|
dist: sdist
|
|
|
|
sdist:
|
|
|
|
python setup.py sdist
|
|
|
|
|
|
|
|
install:
|
|
|
|
python setup.py install
|
|
|
|
|
|
|
|
develop:
|
|
|
|
python setup.py develop
|
|
|
|
|
|
|
|
clean::
|
|
|
|
find . -name '*pyc' | xargs rm -f
|
|
|
|
rm -rf nilmtools.egg-info/ build/ MANIFEST.in
|
|
|
|
|
|
|
|
gitclean::
|
|
|
|
git clean -dXf
|
|
|
|
|
2013-07-09 16:53:47 -04:00
|
|
|
.PHONY: all version dist sdist install clean gitclean test
|