Skip to content

Commit f0fde64

Browse files
committed
Merge branch 'master' into feature/dss41-venv
2 parents 012292f + bf07561 commit f0fde64

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

dataikuapi/dss/project.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,3 +516,22 @@ def list_running_notebooks(self, as_objects=True):
516516
else:
517517
return list
518518

519+
########################################################
520+
# Tags
521+
########################################################
522+
523+
def get_tags(self):
524+
"""
525+
List the tags of this project.
526+
527+
Returns:
528+
a dictionary containing the tags with a color
529+
"""
530+
return self.client._perform_json("GET", "/projects/%s/tags" % self.project_key)
531+
532+
def set_tags(self, tags={}):
533+
"""
534+
Set the tags of this project.
535+
@param obj: must be a modified version of the object returned by list_tags
536+
"""
537+
return self.client._perform_empty("PUT", "/projects/%s/tags" % self.project_key, body = tags)

dataikuapi/dss/recipe.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,17 @@ def __init__(self, name, project):
258258
class CodeRecipeCreator(DSSRecipeCreator):
259259
def __init__(self, name, type, project):
260260
DSSRecipeCreator.__init__(self, type, name, project)
261+
self.script = None
262+
263+
def with_script(self, script):
264+
self.script = script
265+
return self
261266

262267
def _finish_creation_settings(self):
263-
pass
268+
super(CodeRecipeCreator, self)._finish_creation_settings()
269+
# DSSRecipeCreator._finish_creation_settings(self)
270+
self.creation_settings['script'] = self.script
271+
264272

265273
class SQLQueryRecipeCreator(SingleOutputRecipeCreator):
266274
def __init__(self, name, project):

0 commit comments

Comments
 (0)