|
@@ -26,11 +26,15 @@ class ProjectManager(ObservableDict):
|
|
# load project.json
|
|
# load project.json
|
|
with open(path.join(folder, 'project.json'), 'r') as file:
|
|
with open(path.join(folder, 'project.json'), 'r') as file:
|
|
project = Project(load(file), self)
|
|
project = Project(load(file), self)
|
|
|
|
+ project['jobs'] = {}
|
|
self[project['id']] = project
|
|
self[project['id']] = project
|
|
|
|
|
|
def __write_project(self, uuid):
|
|
def __write_project(self, uuid):
|
|
with open(path.join('projects', uuid, 'project.json'), 'w') as file:
|
|
with open(path.join('projects', uuid, 'project.json'), 'w') as file:
|
|
- dump(self[uuid], file, indent=4)
|
|
|
|
|
|
+ copy = self[uuid].copy()
|
|
|
|
+ del copy['jobs']
|
|
|
|
+
|
|
|
|
+ dump(copy, file, indent=4)
|
|
|
|
|
|
def create_project(self, name, description, model):
|
|
def create_project(self, name, description, model):
|
|
# create dict representation
|
|
# create dict representation
|
|
@@ -43,7 +47,8 @@ class ProjectManager(ObservableDict):
|
|
'pipeline': {
|
|
'pipeline': {
|
|
'model-distribution': model
|
|
'model-distribution': model
|
|
},
|
|
},
|
|
- 'data': {}
|
|
|
|
|
|
+ 'data': {},
|
|
|
|
+ 'jobs': {}
|
|
}, self)
|
|
}, self)
|
|
|
|
|
|
# create project directory
|
|
# create project directory
|