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.
 
 
 
 

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