Skip to content

Commit

Permalink
Revert "Add example dataset to new projects"
Browse files Browse the repository at this point in the history
This reverts commit f0dd5a1.
  • Loading branch information
MichaelTamaki committed Apr 12, 2017
1 parent ceea0b7 commit 7cc0cab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion cesium_app/handlers/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def post(self):
p = Project.add_by(data['projectName'],
data.get('projectDescription', ''),
self.get_username())
self.action('cesium/FETCH_DATASETS')

return self.success({"id": p.id}, 'cesium/FETCH_PROJECTS')

def put(self, project_id):
Expand Down
16 changes: 1 addition & 15 deletions cesium_app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@

from cesium_app.json_util import to_json
from cesium_app.config import cfg
from cesium import featurize, data_management

import shutil
from os.path import join as pjoin
from cesium import featurize


db = pw.PostgresqlDatabase(autocommit=True, autorollback=True,
Expand Down Expand Up @@ -52,17 +49,6 @@ def add_by(name, description, username):
with db.atomic():
p = Project.create(name=name, description=description)
UserProject.create(username=username, project=p)

# Add example dataset to project, similar to create_test_dataset
header = pjoin(os.path.dirname(__file__),
'tests', 'data', 'asas_training_subset_classes.dat')
tarball = pjoin(os.path.dirname(__file__),
'tests', 'data', 'asas_training_subset.tar.gz')
header = shutil.copy2(header, cfg['paths']['upload_folder'])
tarball = shutil.copy2(tarball, cfg['paths']['upload_folder'])
ts_paths = data_management.parse_and_store_ts_data(
tarball, cfg['paths']['ts_data_folder'], header)
Dataset.add(name='Example Dataset', project=p, file_uris=ts_paths).save()
return p

def is_owned_by(self, username):
Expand Down

0 comments on commit 7cc0cab

Please sign in to comment.