You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 3.1 KiB

11 years ago
11 years ago
11 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #URL="http://bucket.mit.edu:8080/nilmdb"
  2. URL="http://localhost/nilmdb"
  3. all: test
  4. test:
  5. ifeq ($(INSIDE_EMACS), t)
  6. @make test_sinefit
  7. else
  8. @echo 'No test suite for nilmtools. Try "make install"'
  9. endif
  10. test_pipewatch:
  11. nilmtools/pipewatch.py -t 3 "seq 10 20" "seq 20 30"
  12. test_trainola:
  13. -nilmtool -u http://bucket/nilmdb remove -s min -e max \
  14. /sharon/prep-a-matches
  15. nilmtools/trainola.py "$$(cat extras/trainola-test-param.js)"
  16. test_trainola2:
  17. -nilmtool -u http://bucket/nilmdb remove -s min -e max \
  18. /sharon/prep-a-matches
  19. nilmtools/trainola.py "$$(cat extras/trainola-test-param-2.js)"
  20. test_trainola3:
  21. -nilmtool -u "http://bucket/nilmdb" destroy -R /test/jim
  22. nilmtool -u "http://bucket/nilmdb" create /test/jim uint8_3
  23. nilmtools/trainola.py "$$(cat extras/trainola-test-param-3.js)"
  24. nilmtool -u "http://bucket/nilmdb" extract /test/jim -s min -e max
  25. test_cleanup:
  26. nilmtools/cleanup.py -e extras/cleanup.cfg
  27. nilmtools/cleanup.py extras/cleanup.cfg
  28. test_insert:
  29. nilmtools/insert.py --skip --file --dry-run /foo/bar ~/data/20130311T2100.prep1.gz ~/data/20130311T2100.prep1.gz ~/data/20130311T2200.prep1.gz
  30. test_copy:
  31. nilmtools/copy_wildcard.py -U "http://nilmdb.com/bucket/" -D /lees*
  32. /tmp/raw.dat:
  33. octave --eval 'fs = 8000;' \
  34. --eval 't = (0:fs*10)*2*pi*60/fs;' \
  35. --eval 'raw = transpose([sin(t); 0.3*sin(3*t)+sin(t)]);' \
  36. --eval 'save("-ascii","/tmp/raw.dat","raw");'
  37. test_prep: /tmp/raw.dat
  38. -nilmtool destroy -R /test/raw
  39. -nilmtool destroy -R /test/sinefit
  40. -nilmtool destroy -R /test/prep
  41. nilmtool create /test/raw float32_2
  42. nilmtool create /test/sinefit float32_3
  43. nilmtool create /test/prep float32_8
  44. nilmtool insert -s '@0' -t -r 8000 /test/raw /tmp/raw.dat
  45. nilmtools/sinefit.py -a 0.5 -c 1 -s '@0' -e '@5000000' /test/raw /test/sinefit
  46. nilmtools/prep.py -c 2 /test/raw /test/sinefit /test/prep
  47. nilmtools/prep.py -c 2 /test/raw /test/sinefit /test/prep
  48. nilmtool extract -s min -e max /test/prep | head -20
  49. test_sinefit:
  50. make install >/dev/null 2>&1
  51. -nilmtool destroy -R /test/sinefit
  52. nilmtool create /test/sinefit float32_3
  53. nilmtools/sinefit.py -c 5 -s '2013/03/25 09:11:00' \
  54. -e '2013/03/25 10:11:00' /sharon/raw /test/sinefit
  55. nilmtool extract -s min -e max /test/sinefit | head -20
  56. test_decimate:
  57. -@nilmtool destroy /lees-compressor/no-leak/raw/4 || true
  58. -@nilmtool destroy /lees-compressor/no-leak/raw/16 || true
  59. -@nilmtool create /lees-compressor/no-leak/raw/4 float32_18 || true
  60. -@nilmtool create /lees-compressor/no-leak/raw/16 float32_18 || true
  61. 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
  62. 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
  63. version:
  64. python setup.py version
  65. dist: sdist
  66. sdist:
  67. python setup.py sdist
  68. install:
  69. python setup.py install
  70. develop:
  71. python setup.py develop
  72. clean::
  73. find . -name '*pyc' | xargs rm -f
  74. rm -rf nilmtools.egg-info/ build/ MANIFEST.in
  75. gitclean::
  76. git clean -dXf
  77. .PHONY: all version dist sdist install clean gitclean test