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.
 
 
 
 

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