|
12 | 12 |
|
13 | 13 | from cesium_app.json_util import to_json |
14 | 14 | from cesium_app.config import cfg |
15 | | -from cesium import featurize, data_management |
16 | | - |
17 | | -import shutil |
18 | | -from os.path import join as pjoin |
| 15 | +from cesium import featurize |
19 | 16 |
|
20 | 17 |
|
21 | 18 | db = pw.PostgresqlDatabase(autocommit=True, autorollback=True, |
@@ -52,17 +49,6 @@ def add_by(name, description, username): |
52 | 49 | with db.atomic(): |
53 | 50 | p = Project.create(name=name, description=description) |
54 | 51 | UserProject.create(username=username, project=p) |
55 | | - |
56 | | - # Add example dataset to project, similar to create_test_dataset |
57 | | - header = pjoin(os.path.dirname(__file__), |
58 | | - 'tests', 'data', 'asas_training_subset_classes.dat') |
59 | | - tarball = pjoin(os.path.dirname(__file__), |
60 | | - 'tests', 'data', 'asas_training_subset.tar.gz') |
61 | | - header = shutil.copy2(header, cfg['paths']['upload_folder']) |
62 | | - tarball = shutil.copy2(tarball, cfg['paths']['upload_folder']) |
63 | | - ts_paths = data_management.parse_and_store_ts_data( |
64 | | - tarball, cfg['paths']['ts_data_folder'], header) |
65 | | - Dataset.add(name='Example Dataset', project=p, file_uris=ts_paths).save() |
66 | 52 | return p |
67 | 53 |
|
68 | 54 | def is_owned_by(self, username): |
|
0 commit comments