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.
 
 
 
 

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