Compare commits
4 Commits
nilmtools-
...
nilmtools-
Author | SHA1 | Date | |
---|---|---|---|
3e7527ab57 | |||
31b6d82dfc | |||
077010ba3a | |||
77751a8529 |
14
Makefile
14
Makefile
@@ -1,14 +1,14 @@
|
||||
#URL="http://bucket.mit.edu:8080/nilmdb"
|
||||
URL="http://localhost/nilmdb"
|
||||
|
||||
all:
|
||||
ifeq ($(INSIDE_EMACS), t)
|
||||
@make test
|
||||
else
|
||||
@echo "Try 'make install'"
|
||||
endif
|
||||
all: test
|
||||
|
||||
test: test_trainola3
|
||||
test:
|
||||
ifeq ($(INSIDE_EMACS), t)
|
||||
@make test_trainola3
|
||||
else
|
||||
@echo 'No test suite for nilmtools. Try "make install"'
|
||||
endif
|
||||
|
||||
test_pipewatch:
|
||||
nilmtools/pipewatch.py -t 3 "seq 10 20" "seq 20 30"
|
||||
|
@@ -53,7 +53,7 @@ def parse_args(argv = None):
|
||||
is stepped forward to match 'clock'.
|
||||
|
||||
- If 'data' is running ahead, there is overlap in the data, and an
|
||||
error is raised. If '--ignore' is specified, the current file
|
||||
error is raised. If '--skip' is specified, the current file
|
||||
is skipped instead of raising an error.
|
||||
"""))
|
||||
parser.add_argument("-u", "--url", action="store",
|
||||
|
@@ -81,7 +81,8 @@ def main(argv = None):
|
||||
f.check_dest_metadata({ "prep_raw_source": f.src.path,
|
||||
"prep_sinefit_source": sinefit.path,
|
||||
"prep_column": args.column,
|
||||
"prep_rotation": repr(rotation) })
|
||||
"prep_rotation": repr(rotation),
|
||||
"prep_nshift": args.nshift })
|
||||
|
||||
# Find the intersection of the usual set of intervals we'd filter,
|
||||
# and the intervals actually present in sinefit data. This is
|
||||
|
@@ -287,8 +287,21 @@ def main(argv = None):
|
||||
|
||||
if argv is None:
|
||||
argv = sys.argv[1:]
|
||||
if len(argv) != 1:
|
||||
raise DataError("need one argument, either a dictionary or JSON string")
|
||||
if len(argv) != 1 or argv[0] == '-h' or argv[0] == '--help':
|
||||
printf("usage: %s [-h] [-v] <json-config-dictionary>\n\n", sys.argv[0])
|
||||
printf(" Where <json-config-dictionary> is a JSON-encoded " +
|
||||
"dictionary string\n")
|
||||
printf(" with exemplar and stream data.\n\n")
|
||||
printf(" See extras/trainola-test-param*.js in the nilmtools " +
|
||||
"repository\n")
|
||||
printf(" for examples.\n")
|
||||
if len(argv) != 1:
|
||||
raise SystemExit(1)
|
||||
raise SystemExit(0)
|
||||
|
||||
if argv[0] == '-v' or argv[0] == '--version':
|
||||
printf("%s\n", nilmtools.__version__)
|
||||
raise SystemExit(0)
|
||||
|
||||
try:
|
||||
# Passed in a JSON string (e.g. on the command line)
|
||||
|
Reference in New Issue
Block a user