aboutsummaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunk@stsci.edu>2013-01-15 17:54:05 -0500
committerJoseph Hunkeler <jhunk@stsci.edu>2013-01-15 17:54:05 -0500
commit12f929e504d2ebd844bdd2bd3210db4b61a4bdbb (patch)
treeb6ff715449b11b7a8e66c5a44cf044719d293774 /test.py
parent90049bc82d891f9a7b7da94931896eae03f8b241 (diff)
downloadscilo-12f929e504d2ebd844bdd2bd3210db4b61a4bdbb.tar.gz
Initial commit. Tests functionality.
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/test.py b/test.py
new file mode 100755
index 0000000..36506fa
--- /dev/null
+++ b/test.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+import argparse
+import scilo
+
+def main():
+ parser = argparse.ArgumentParser(description='Generate scientific workflow structure')
+ parser.add_argument('-c', '--copy-only', action='store_true', required=False,
+ help='Do not move original data')
+ parser.add_argument('-o', '--output-dir', type=str, required=True,
+ help='Where to store aggregated data, caches, results')
+ parser.add_argument('input_files', type=str, nargs='*',
+ help='Example: /path/to/data/*.extension')
+ arguments = parser.parse_args()
+
+ if not arguments.input_files:
+ print('Please specify files to aggregate')
+ exit(1)
+
+ dataset = scilo.scilo(arguments.output_dir)
+ for f in arguments.input_files:
+ dataset.aggregate(f, arguments.copy_only)
+
+if __name__ == "__main__":
+ main()
+