flywheel-sdk 20.1.0rc0__py2.py3-none-any.whl → 20.2.0rc0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. flywheel/__init__.py +3 -6
  2. flywheel/api/__init__.py +1 -0
  3. flywheel/api/analyses_api.py +1446 -346
  4. flywheel/api/container_type_api.py +135 -0
  5. flywheel/api/dataexplorer_api.py +90 -0
  6. flywheel/api/files_api.py +437 -0
  7. flywheel/api/reports_api.py +102 -0
  8. flywheel/api_client.py +1 -1
  9. flywheel/configuration.py +2 -2
  10. flywheel/finder.py +5 -2
  11. flywheel/flywheel.py +335 -7
  12. flywheel/models/__init__.py +3 -7
  13. flywheel/models/action.py +0 -3
  14. flywheel/models/container_type.py +0 -1
  15. flywheel/models/current_user_output.py +4 -32
  16. flywheel/models/features.py +16 -16
  17. flywheel/models/{azure_ml_resource_init_status.py → file_container_type.py} +8 -6
  18. flywheel/models/file_list_output.py +54 -1
  19. flywheel/models/file_node.py +54 -1
  20. flywheel/models/file_output.py +57 -4
  21. flywheel/models/file_upsert_output.py +54 -1
  22. flywheel/models/fixed_input.py +28 -1
  23. flywheel/models/info_container_type.py +34 -0
  24. flywheel/models/mixins.py +14 -2
  25. flywheel/models/modify_user_input.py +4 -32
  26. flywheel/models/origin_type.py +1 -0
  27. flywheel/models/project_copy_input.py +28 -1
  28. flywheel/models/project_settings_workspaces.py +4 -31
  29. flywheel/models/project_settings_workspaces_input.py +4 -32
  30. {flywheel_sdk-20.1.0rc0.dist-info → flywheel_sdk-20.2.0rc0.dist-info}/METADATA +1 -2
  31. {flywheel_sdk-20.1.0rc0.dist-info → flywheel_sdk-20.2.0rc0.dist-info}/RECORD +34 -37
  32. {flywheel_sdk-20.1.0rc0.dist-info → flywheel_sdk-20.2.0rc0.dist-info}/WHEEL +1 -1
  33. flywheel/models/azure_ml_account.py +0 -188
  34. flywheel/models/azure_ml_initialization.py +0 -244
  35. flywheel/models/azure_ml_integration.py +0 -218
  36. flywheel/models/azure_ml_workspace.py +0 -347
  37. flywheel/models/azure_ml_workspace_input.py +0 -189
  38. {flywheel_sdk-20.1.0rc0.dist-info → flywheel_sdk-20.2.0rc0.dist-info}/LICENSE.txt +0 -0
  39. {flywheel_sdk-20.1.0rc0.dist-info → flywheel_sdk-20.2.0rc0.dist-info}/top_level.txt +0 -0
@@ -27,6 +27,7 @@ class FixedInput(object):
27
27
  'id': 'str',
28
28
  'name': 'str',
29
29
  'version': 'int',
30
+ 'group': 'FileGroup',
30
31
  'input': 'str'
31
32
  }
32
33
 
@@ -35,6 +36,7 @@ class FixedInput(object):
35
36
  'id': 'id',
36
37
  'name': 'name',
37
38
  'version': 'version',
39
+ 'group': 'group',
38
40
  'input': 'input'
39
41
  }
40
42
 
@@ -43,10 +45,11 @@ class FixedInput(object):
43
45
  'id': 'id',
44
46
  'name': 'name',
45
47
  'version': 'version',
48
+ 'group': 'group',
46
49
  'input': 'input'
47
50
  }
48
51
 
49
- def __init__(self, type=None, id=None, name=None, version=None, input=None): # noqa: E501
52
+ def __init__(self, type=None, id=None, name=None, version=None, group=None, input=None): # noqa: E501
50
53
  """FixedInput - a model defined in Swagger"""
51
54
  super(FixedInput, self).__init__()
52
55
 
@@ -54,6 +57,7 @@ class FixedInput(object):
54
57
  self._id = None
55
58
  self._name = None
56
59
  self._version = None
60
+ self._group = None
57
61
  self._input = None
58
62
  self.discriminator = None
59
63
  self.alt_discriminator = None
@@ -63,6 +67,8 @@ class FixedInput(object):
63
67
  self.name = name
64
68
  if version is not None:
65
69
  self.version = version
70
+ if group is not None:
71
+ self.group = group
66
72
  self.input = input
67
73
 
68
74
  @property
@@ -149,6 +155,27 @@ class FixedInput(object):
149
155
 
150
156
  self._version = version
151
157
 
158
+ @property
159
+ def group(self):
160
+ """Gets the group of this FixedInput.
161
+
162
+
163
+ :return: The group of this FixedInput.
164
+ :rtype: FileGroup
165
+ """
166
+ return self._group
167
+
168
+ @group.setter
169
+ def group(self, group):
170
+ """Sets the group of this FixedInput.
171
+
172
+
173
+ :param group: The group of this FixedInput. # noqa: E501
174
+ :type: FileGroup
175
+ """
176
+
177
+ self._group = group
178
+
152
179
  @property
153
180
  def input(self):
154
181
  """Gets the input of this FixedInput.
@@ -0,0 +1,34 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Flywheel
5
+
6
+ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7
+
8
+ OpenAPI spec version: 0.0.1
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ """
12
+
13
+
14
+ ## NOTE: This file is auto generated by the swagger code generator program.
15
+ ## Do not edit the file manually.
16
+
17
+ import pprint
18
+ import re # noqa: F401
19
+ import six
20
+
21
+ import enum
22
+
23
+ class InfoContainerType(str, enum.Enum):
24
+ ACQUISITIONS = "acquisitions"
25
+ ANALYSES = "analyses"
26
+ COLLECTIONS = "collections"
27
+ CONTAINERS = "containers"
28
+ PROJECTS = "projects"
29
+ SESSIONS = "sessions"
30
+ SUBJECTS = "subjects"
31
+ FILES = "files"
32
+
33
+ def __str__(self):
34
+ return self.value
flywheel/models/mixins.py CHANGED
@@ -45,7 +45,7 @@ class ContainerBase(object):
45
45
  if self.__context:
46
46
  fname = fmt.format(self.container_type)
47
47
  file_group = getattr(self, "_file_group", None)
48
- if file_group is not None:
48
+ if file_group is not None and not hasattr(self.__context, fname):
49
49
  fname = fname.replace("file", file_group)
50
50
  fn = getattr(self.__context, fname, None)
51
51
  if fn:
@@ -53,6 +53,10 @@ class ContainerBase(object):
53
53
  if "/" in args[1]:
54
54
  warnings.warn(f"Filename {args[1]} contains disallowed character '/', methods on this object will fail. Rename file with fw.move_file")
55
55
  return fn(*args, **kwargs)
56
+ else:
57
+ raise ValueError(
58
+ f"Context {self.__context} doesn't have a function {fname}"
59
+ )
56
60
  return None
57
61
 
58
62
  def _add_child(self, child_type, args, kwargs):
@@ -323,7 +327,15 @@ class FileMethods(object):
323
327
 
324
328
  def delete_file(self, file_name, **kwargs):
325
329
  """Delete file from the container"""
326
- return self._invoke_file_api("delete_{}_file", self.id, file_name, **kwargs)
330
+ result = self._invoke_file_api("delete_{}_file", self.id, file_name, **kwargs)
331
+ # Delete from cache
332
+ files = getattr(self, "_files", None)
333
+ if files is not None:
334
+ for i, entry in enumerate(files):
335
+ if entry.name == file_name:
336
+ del files[i]
337
+ break
338
+ return result
327
339
 
328
340
  def replace_file_info(self, file_name, info, **kwargs):
329
341
  """Fully replace this file's info with the provided value"""
@@ -19,7 +19,6 @@ import re # noqa: F401
19
19
  import six
20
20
 
21
21
  from flywheel.models.avatars import Avatars # noqa: F401,E501
22
- from flywheel.models.azure_ml_account import AzureMLAccount # noqa: F401,E501
23
22
  from flywheel.models.role_type import RoleType # noqa: F401,E501
24
23
  from flywheel.models.user_preferences import UserPreferences # noqa: F401,E501
25
24
 
@@ -36,8 +35,7 @@ class ModifyUserInput(object):
36
35
  'preferences': 'UserPreferences',
37
36
  'root': 'bool',
38
37
  'password': 'str',
39
- 'central_revision': 'int',
40
- 'azureml_account': 'AzureMLAccount'
38
+ 'central_revision': 'int'
41
39
  }
42
40
 
43
41
  attribute_map = {
@@ -51,8 +49,7 @@ class ModifyUserInput(object):
51
49
  'preferences': 'preferences',
52
50
  'root': 'root',
53
51
  'password': 'password',
54
- 'central_revision': 'central_revision',
55
- 'azureml_account': 'azureml_account'
52
+ 'central_revision': 'central_revision'
56
53
  }
57
54
 
58
55
  rattribute_map = {
@@ -66,11 +63,10 @@ class ModifyUserInput(object):
66
63
  'preferences': 'preferences',
67
64
  'root': 'root',
68
65
  'password': 'password',
69
- 'central_revision': 'central_revision',
70
- 'azureml_account': 'azureml_account'
66
+ 'central_revision': 'central_revision'
71
67
  }
72
68
 
73
- def __init__(self, firstname=None, lastname=None, email=None, avatars=None, avatar=None, roles=None, disabled=None, preferences=None, root=None, password=None, central_revision=None, azureml_account=None): # noqa: E501
69
+ def __init__(self, firstname=None, lastname=None, email=None, avatars=None, avatar=None, roles=None, disabled=None, preferences=None, root=None, password=None, central_revision=None): # noqa: E501
74
70
  """ModifyUserInput - a model defined in Swagger"""
75
71
  super(ModifyUserInput, self).__init__()
76
72
 
@@ -85,7 +81,6 @@ class ModifyUserInput(object):
85
81
  self._root = None
86
82
  self._password = None
87
83
  self._central_revision = None
88
- self._azureml_account = None
89
84
  self.discriminator = None
90
85
  self.alt_discriminator = None
91
86
 
@@ -111,8 +106,6 @@ class ModifyUserInput(object):
111
106
  self.password = password
112
107
  if central_revision is not None:
113
108
  self.central_revision = central_revision
114
- if azureml_account is not None:
115
- self.azureml_account = azureml_account
116
109
 
117
110
  @property
118
111
  def firstname(self):
@@ -345,27 +338,6 @@ class ModifyUserInput(object):
345
338
 
346
339
  self._central_revision = central_revision
347
340
 
348
- @property
349
- def azureml_account(self):
350
- """Gets the azureml_account of this ModifyUserInput.
351
-
352
-
353
- :return: The azureml_account of this ModifyUserInput.
354
- :rtype: AzureMLAccount
355
- """
356
- return self._azureml_account
357
-
358
- @azureml_account.setter
359
- def azureml_account(self, azureml_account):
360
- """Sets the azureml_account of this ModifyUserInput.
361
-
362
-
363
- :param azureml_account: The azureml_account of this ModifyUserInput. # noqa: E501
364
- :type: AzureMLAccount
365
- """
366
-
367
- self._azureml_account = azureml_account
368
-
369
341
 
370
342
  @staticmethod
371
343
  def positional_to_model(value):
@@ -28,6 +28,7 @@ class OriginType(str, enum.Enum):
28
28
  SYSTEM = "system"
29
29
  UNKNOWN = "unknown"
30
30
  GEAR_RULE = "gear_rule"
31
+ TASK = "task"
31
32
 
32
33
  def __str__(self):
33
34
  return self.value
@@ -25,33 +25,39 @@ class ProjectCopyInput(object):
25
25
  swagger_types = {
26
26
  'group_id': 'str',
27
27
  'project_label': 'str',
28
+ 'snapshot_id': 'str',
28
29
  'filter': 'ProjectCopyFilter'
29
30
  }
30
31
 
31
32
  attribute_map = {
32
33
  'group_id': 'group_id',
33
34
  'project_label': 'project_label',
35
+ 'snapshot_id': 'snapshot_id',
34
36
  'filter': 'filter'
35
37
  }
36
38
 
37
39
  rattribute_map = {
38
40
  'group_id': 'group_id',
39
41
  'project_label': 'project_label',
42
+ 'snapshot_id': 'snapshot_id',
40
43
  'filter': 'filter'
41
44
  }
42
45
 
43
- def __init__(self, group_id=None, project_label=None, filter=None): # noqa: E501
46
+ def __init__(self, group_id=None, project_label=None, snapshot_id=None, filter=None): # noqa: E501
44
47
  """ProjectCopyInput - a model defined in Swagger"""
45
48
  super(ProjectCopyInput, self).__init__()
46
49
 
47
50
  self._group_id = None
48
51
  self._project_label = None
52
+ self._snapshot_id = None
49
53
  self._filter = None
50
54
  self.discriminator = None
51
55
  self.alt_discriminator = None
52
56
 
53
57
  self.group_id = group_id
54
58
  self.project_label = project_label
59
+ if snapshot_id is not None:
60
+ self.snapshot_id = snapshot_id
55
61
  self.filter = filter
56
62
 
57
63
  @property
@@ -96,6 +102,27 @@ class ProjectCopyInput(object):
96
102
 
97
103
  self._project_label = project_label
98
104
 
105
+ @property
106
+ def snapshot_id(self):
107
+ """Gets the snapshot_id of this ProjectCopyInput.
108
+
109
+
110
+ :return: The snapshot_id of this ProjectCopyInput.
111
+ :rtype: str
112
+ """
113
+ return self._snapshot_id
114
+
115
+ @snapshot_id.setter
116
+ def snapshot_id(self, snapshot_id):
117
+ """Sets the snapshot_id of this ProjectCopyInput.
118
+
119
+
120
+ :param snapshot_id: The snapshot_id of this ProjectCopyInput. # noqa: E501
121
+ :type: str
122
+ """
123
+
124
+ self._snapshot_id = snapshot_id
125
+
99
126
  @property
100
127
  def filter(self):
101
128
  """Gets the filter of this ProjectCopyInput.
@@ -21,33 +21,27 @@ import six
21
21
  class ProjectSettingsWorkspaces(object):
22
22
 
23
23
  swagger_types = {
24
- 'jupyterhub': 'JupyterhubWorkspace',
25
- 'azureml': 'AzureMLIntegration'
24
+ 'jupyterhub': 'JupyterhubWorkspace'
26
25
  }
27
26
 
28
27
  attribute_map = {
29
- 'jupyterhub': 'jupyterhub',
30
- 'azureml': 'azureml'
28
+ 'jupyterhub': 'jupyterhub'
31
29
  }
32
30
 
33
31
  rattribute_map = {
34
- 'jupyterhub': 'jupyterhub',
35
- 'azureml': 'azureml'
32
+ 'jupyterhub': 'jupyterhub'
36
33
  }
37
34
 
38
- def __init__(self, jupyterhub=None, azureml=None): # noqa: E501
35
+ def __init__(self, jupyterhub=None): # noqa: E501
39
36
  """ProjectSettingsWorkspaces - a model defined in Swagger"""
40
37
  super(ProjectSettingsWorkspaces, self).__init__()
41
38
 
42
39
  self._jupyterhub = None
43
- self._azureml = None
44
40
  self.discriminator = None
45
41
  self.alt_discriminator = None
46
42
 
47
43
  if jupyterhub is not None:
48
44
  self.jupyterhub = jupyterhub
49
- if azureml is not None:
50
- self.azureml = azureml
51
45
 
52
46
  @property
53
47
  def jupyterhub(self):
@@ -70,27 +64,6 @@ class ProjectSettingsWorkspaces(object):
70
64
 
71
65
  self._jupyterhub = jupyterhub
72
66
 
73
- @property
74
- def azureml(self):
75
- """Gets the azureml of this ProjectSettingsWorkspaces.
76
-
77
-
78
- :return: The azureml of this ProjectSettingsWorkspaces.
79
- :rtype: AzureMLIntegration
80
- """
81
- return self._azureml
82
-
83
- @azureml.setter
84
- def azureml(self, azureml):
85
- """Sets the azureml of this ProjectSettingsWorkspaces.
86
-
87
-
88
- :param azureml: The azureml of this ProjectSettingsWorkspaces. # noqa: E501
89
- :type: AzureMLIntegration
90
- """
91
-
92
- self._azureml = azureml
93
-
94
67
 
95
68
  @staticmethod
96
69
  def positional_to_model(value):
@@ -18,39 +18,32 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import six
20
20
 
21
- from flywheel.models.azure_ml_integration import AzureMLIntegration # noqa: F401,E501
22
21
  from flywheel.models.jupyterhub_workspace import JupyterhubWorkspace # noqa: F401,E501
23
22
 
24
23
  class ProjectSettingsWorkspacesInput(object):
25
24
 
26
25
  swagger_types = {
27
- 'jupyterhub': 'JupyterhubWorkspace',
28
- 'azureml': 'AzureMLIntegration'
26
+ 'jupyterhub': 'JupyterhubWorkspace'
29
27
  }
30
28
 
31
29
  attribute_map = {
32
- 'jupyterhub': 'jupyterhub',
33
- 'azureml': 'azureml'
30
+ 'jupyterhub': 'jupyterhub'
34
31
  }
35
32
 
36
33
  rattribute_map = {
37
- 'jupyterhub': 'jupyterhub',
38
- 'azureml': 'azureml'
34
+ 'jupyterhub': 'jupyterhub'
39
35
  }
40
36
 
41
- def __init__(self, jupyterhub=None, azureml=None): # noqa: E501
37
+ def __init__(self, jupyterhub=None): # noqa: E501
42
38
  """ProjectSettingsWorkspacesInput - a model defined in Swagger"""
43
39
  super(ProjectSettingsWorkspacesInput, self).__init__()
44
40
 
45
41
  self._jupyterhub = None
46
- self._azureml = None
47
42
  self.discriminator = None
48
43
  self.alt_discriminator = None
49
44
 
50
45
  if jupyterhub is not None:
51
46
  self.jupyterhub = jupyterhub
52
- if azureml is not None:
53
- self.azureml = azureml
54
47
 
55
48
  @property
56
49
  def jupyterhub(self):
@@ -73,27 +66,6 @@ class ProjectSettingsWorkspacesInput(object):
73
66
 
74
67
  self._jupyterhub = jupyterhub
75
68
 
76
- @property
77
- def azureml(self):
78
- """Gets the azureml of this ProjectSettingsWorkspacesInput.
79
-
80
-
81
- :return: The azureml of this ProjectSettingsWorkspacesInput.
82
- :rtype: AzureMLIntegration
83
- """
84
- return self._azureml
85
-
86
- @azureml.setter
87
- def azureml(self, azureml):
88
- """Sets the azureml of this ProjectSettingsWorkspacesInput.
89
-
90
-
91
- :param azureml: The azureml of this ProjectSettingsWorkspacesInput. # noqa: E501
92
- :type: AzureMLIntegration
93
- """
94
-
95
- self._azureml = azureml
96
-
97
69
 
98
70
  @staticmethod
99
71
  def positional_to_model(value):
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: flywheel-sdk
3
- Version: 20.1.0rc0
3
+ Version: 20.2.0rc0
4
4
  Summary: Flywheel SDK
5
5
  Home-page:
6
6
  Author-email: support@flywheel.io
7
7
  License: Other/Proprietary
8
8
  Project-URL: Documentation, https://flywheel-io.gitlab.io/product/backend/sdk/branches/master/python
9
- Project-URL: Source, https://gitlab.com/flywheel-io/product/backend/core
10
9
  Keywords: Swagger,Flywheel API,flywheel
11
10
  License-File: LICENSE.txt
12
11
  Requires-Dist: urllib3>=2.2.1