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.
 
 
 
 

83 lines
2.4 KiB

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