Project folder backend object (dev prj~1)#40
Merged
spicquenot merged 13 commits intorelease/5.2from May 24, 2019
Merged
Conversation
…in automation node
Now the path is now /f1/f2 instead of /f1/f2/
cstenac
previously requested changes
Apr 29, 2019
dataikuapi/dss/projectfolder.py
Outdated
| else: | ||
| return DSSProjectFolder(self.client, parent) | ||
|
|
||
| def get_children(self): |
Contributor
There was a problem hiding this comment.
For consistency, this method shoudl be called list_something rather than get_something.
To avoid doubts about whether this includes projects or not, I'd call it list_child_folders
dataikuapi/dss/projectfolder.py
Outdated
| :returns list: A list of :class:`dataikuapi.dss.projectfolders.DSSProjectFolder` to interact with its children | ||
| """ | ||
| children = self.client._perform_json("GET", "/project-folders/%s" % self.project_folder_id).get("children", []) | ||
| ret = [] |
Contributor
There was a problem hiding this comment.
This can be a bit more Pythonic with a list comprehension :)
dataikuapi/dss/projectfolder.py
Outdated
| :returns list: A list of :class:`dataikuapi.dss.project.DSSProject` to interact with its projects | ||
| """ | ||
| project_keys = self.client._perform_json("GET", "/project-folders/%s" % self.project_folder_id).get("projectKeys", []) | ||
| ret = [] |
| ######################################################## | ||
| def delete(self): | ||
| """ | ||
| Delete the project folder |
Contributor
There was a problem hiding this comment.
Nitpick: add what will happen of current children (projects and folders)
dataikuapi/dss/projectfolder.py
Outdated
| """ | ||
| return self.settings["permissions"] | ||
|
|
||
| def set_permissions(self, permissions): |
Contributor
There was a problem hiding this comment.
Since we return directly, do we really need a set_ call ? I don't think we do it for other similar cases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[branch ch35668]
https://app.clubhouse.io/dataiku/story/35668/make-project-folders-a-backend-object
https://analytics.dataiku.com/projects/RDWIKI/wiki/Dev%20Project%201:%20Make%20Project%20Folders%20a%20backend%20object