zou 0.20.82__py3-none-any.whl → 0.20.84__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 (114) hide show
  1. zou/__init__.py +1 -1
  2. zou/app/blueprints/assets/resources.py +1060 -153
  3. zou/app/blueprints/auth/resources.py +368 -238
  4. zou/app/blueprints/breakdown/resources.py +584 -94
  5. zou/app/blueprints/chats/resources.py +176 -37
  6. zou/app/blueprints/comments/resources.py +409 -150
  7. zou/app/blueprints/concepts/resources.py +443 -63
  8. zou/app/blueprints/crud/asset_instance.py +272 -0
  9. zou/app/blueprints/crud/attachment_file.py +263 -0
  10. zou/app/blueprints/crud/base.py +176 -69
  11. zou/app/blueprints/crud/budget.py +278 -0
  12. zou/app/blueprints/crud/budget_entry.py +269 -0
  13. zou/app/blueprints/crud/chat.py +282 -0
  14. zou/app/blueprints/crud/chat_message.py +286 -0
  15. zou/app/blueprints/crud/comments.py +312 -1
  16. zou/app/blueprints/crud/custom_action.py +268 -0
  17. zou/app/blueprints/crud/day_off.py +298 -0
  18. zou/app/blueprints/crud/department.py +268 -0
  19. zou/app/blueprints/crud/entity.py +297 -3
  20. zou/app/blueprints/crud/entity_link.py +303 -0
  21. zou/app/blueprints/crud/entity_type.py +269 -0
  22. zou/app/blueprints/crud/event.py +197 -0
  23. zou/app/blueprints/crud/file_status.py +268 -0
  24. zou/app/blueprints/crud/hardware_item.py +268 -0
  25. zou/app/blueprints/crud/metadata_descriptor.py +312 -0
  26. zou/app/blueprints/crud/milestone.py +302 -1
  27. zou/app/blueprints/crud/news.py +285 -0
  28. zou/app/blueprints/crud/notification.py +287 -0
  29. zou/app/blueprints/crud/organisation.py +269 -0
  30. zou/app/blueprints/crud/output_file.py +34 -10
  31. zou/app/blueprints/crud/output_type.py +30 -10
  32. zou/app/blueprints/crud/person.py +407 -2
  33. zou/app/blueprints/crud/playlist.py +322 -4
  34. zou/app/blueprints/crud/plugin.py +269 -0
  35. zou/app/blueprints/crud/preview_background_file.py +272 -0
  36. zou/app/blueprints/crud/preview_file.py +280 -9
  37. zou/app/blueprints/crud/production_schedule_version.py +569 -0
  38. zou/app/blueprints/crud/project.py +440 -0
  39. zou/app/blueprints/crud/project_status.py +268 -0
  40. zou/app/blueprints/crud/salary_scale.py +185 -5
  41. zou/app/blueprints/crud/schedule_item.py +305 -0
  42. zou/app/blueprints/crud/search_filter.py +302 -0
  43. zou/app/blueprints/crud/search_filter_group.py +270 -0
  44. zou/app/blueprints/crud/software.py +30 -10
  45. zou/app/blueprints/crud/status_automation.py +296 -2
  46. zou/app/blueprints/crud/studio.py +268 -0
  47. zou/app/blueprints/crud/subscription.py +279 -0
  48. zou/app/blueprints/crud/task.py +325 -5
  49. zou/app/blueprints/crud/task_status.py +301 -0
  50. zou/app/blueprints/crud/task_type.py +283 -0
  51. zou/app/blueprints/crud/time_spent.py +327 -0
  52. zou/app/blueprints/crud/working_file.py +273 -10
  53. zou/app/blueprints/departments/resources.py +302 -68
  54. zou/app/blueprints/edits/resources.py +651 -81
  55. zou/app/blueprints/entities/resources.py +104 -39
  56. zou/app/blueprints/events/resources.py +96 -8
  57. zou/app/blueprints/export/csv/assets.py +15 -5
  58. zou/app/blueprints/export/csv/base.py +12 -3
  59. zou/app/blueprints/export/csv/casting.py +32 -5
  60. zou/app/blueprints/export/csv/edits.py +15 -5
  61. zou/app/blueprints/export/csv/persons.py +24 -0
  62. zou/app/blueprints/export/csv/playlists.py +16 -5
  63. zou/app/blueprints/export/csv/projects.py +23 -0
  64. zou/app/blueprints/export/csv/shots.py +15 -5
  65. zou/app/blueprints/export/csv/task_types.py +23 -0
  66. zou/app/blueprints/export/csv/tasks.py +24 -0
  67. zou/app/blueprints/export/csv/time_spents.py +24 -0
  68. zou/app/blueprints/files/resources.py +928 -377
  69. zou/app/blueprints/index/resources.py +49 -42
  70. zou/app/blueprints/news/resources.py +47 -27
  71. zou/app/blueprints/persons/resources.py +644 -271
  72. zou/app/blueprints/playlists/resources.py +154 -72
  73. zou/app/blueprints/previews/resources.py +473 -228
  74. zou/app/blueprints/projects/__init__.py +5 -0
  75. zou/app/blueprints/projects/resources.py +987 -420
  76. zou/app/blueprints/search/resources.py +44 -32
  77. zou/app/blueprints/shots/resources.py +1338 -88
  78. zou/app/blueprints/source/csv/assets.py +44 -6
  79. zou/app/blueprints/source/csv/casting.py +43 -6
  80. zou/app/blueprints/source/csv/edits.py +47 -9
  81. zou/app/blueprints/source/csv/persons.py +43 -4
  82. zou/app/blueprints/source/csv/shots.py +47 -6
  83. zou/app/blueprints/source/csv/task_type_estimations.py +95 -35
  84. zou/app/blueprints/source/kitsu.py +433 -11
  85. zou/app/blueprints/source/otio.py +215 -20
  86. zou/app/blueprints/source/shotgun/assets.py +146 -0
  87. zou/app/blueprints/source/shotgun/base.py +85 -14
  88. zou/app/blueprints/source/shotgun/episode.py +124 -0
  89. zou/app/blueprints/source/shotgun/import_errors.py +105 -14
  90. zou/app/blueprints/source/shotgun/notes.py +132 -0
  91. zou/app/blueprints/source/shotgun/person.py +163 -0
  92. zou/app/blueprints/source/shotgun/project.py +120 -0
  93. zou/app/blueprints/source/shotgun/scene.py +120 -0
  94. zou/app/blueprints/source/shotgun/sequence.py +134 -0
  95. zou/app/blueprints/source/shotgun/shot.py +166 -0
  96. zou/app/blueprints/source/shotgun/status.py +129 -0
  97. zou/app/blueprints/source/shotgun/steps.py +138 -0
  98. zou/app/blueprints/source/shotgun/tasks.py +199 -0
  99. zou/app/blueprints/source/shotgun/team.py +132 -0
  100. zou/app/blueprints/source/shotgun/versions.py +155 -0
  101. zou/app/blueprints/tasks/resources.py +1197 -308
  102. zou/app/blueprints/user/resources.py +1808 -215
  103. zou/app/models/metadata_descriptor.py +1 -0
  104. zou/app/services/persons_service.py +1 -1
  105. zou/app/services/projects_service.py +45 -1
  106. zou/app/services/time_spents_service.py +1 -1
  107. zou/app/swagger.py +100 -27
  108. zou/migrations/versions/a1b2c3d4e5f6_add_position_to_metadata_descriptor.py +32 -0
  109. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/METADATA +18 -18
  110. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/RECORD +114 -113
  111. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/WHEEL +0 -0
  112. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/entry_points.txt +0 -0
  113. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/licenses/LICENSE +0 -0
  114. {zou-0.20.82.dist-info → zou-0.20.84.dist-info}/top_level.txt +0 -0
@@ -22,28 +22,66 @@ from zou.app.utils import events, cache, string
22
22
  class AssetsCsvImportResource(BaseCsvProjectImportResource):
23
23
  def post(self, project_id):
24
24
  """
25
- Import project assets via a .csv file.
25
+ Import assets csv
26
26
  ---
27
27
  tags:
28
28
  - Import
29
+ description: Import project assets from a CSV file. Creates or updates
30
+ assets based on CSV rows. Supports metadata descriptors and task
31
+ status updates.
29
32
  consumes:
30
33
  - multipart/form-data
31
34
  parameters:
32
35
  - in: path
33
36
  name: project_id
34
- required: True
35
- type: string
36
- format: uuid
37
+ required: true
38
+ schema:
39
+ type: string
40
+ format: uuid
37
41
  example: a24a6ea4-ce75-4665-a070-57453082c25
42
+ - in: query
43
+ name: update
44
+ required: false
45
+ schema:
46
+ type: boolean
47
+ default: false
48
+ example: false
49
+ description: Whether to update existing assets
38
50
  - in: formData
39
51
  name: file
40
52
  type: file
41
53
  required: true
54
+ description: CSV file with asset data
42
55
  responses:
43
56
  201:
44
- description: The lists of imported assets.
57
+ description: Assets imported successfully
58
+ content:
59
+ application/json:
60
+ schema:
61
+ type: array
62
+ items:
63
+ type: object
64
+ properties:
65
+ id:
66
+ type: string
67
+ format: uuid
68
+ example: a24a6ea4-ce75-4665-a070-57453082c25
69
+ name:
70
+ type: string
71
+ example: Character A
72
+ project_id:
73
+ type: string
74
+ format: uuid
75
+ example: b24a6ea4-ce75-4665-a070-57453082c25
76
+ entity_type_id:
77
+ type: string
78
+ format: uuid
79
+ example: c24a6ea4-ce75-4665-a070-57453082c25
80
+ description:
81
+ type: string
82
+ example: Main character asset
45
83
  400:
46
- description: The .csv file is not properly formatted.
84
+ description: Invalid CSV format or missing required columns
47
85
  """
48
86
  return super().post(project_id)
49
87
 
@@ -15,28 +15,65 @@ from zou.app.utils import events
15
15
  class CastingCsvImportResource(BaseCsvProjectImportResource):
16
16
  def post(self, project_id):
17
17
  """
18
- Import project casting links via a .csv file.
18
+ Import casting csv
19
19
  ---
20
20
  tags:
21
21
  - Import
22
+ description: Import project casting links from a CSV file. Links assets
23
+ to shots, sequences, or episodes based on CSV rows.
22
24
  consumes:
23
25
  - multipart/form-data
24
26
  parameters:
25
27
  - in: path
26
28
  name: project_id
27
- required: True
28
- type: string
29
- format: uuid
29
+ required: true
30
+ schema:
31
+ type: string
32
+ format: uuid
30
33
  example: a24a6ea4-ce75-4665-a070-57453082c25
34
+ - in: query
35
+ name: update
36
+ required: false
37
+ schema:
38
+ type: boolean
39
+ default: false
40
+ example: false
41
+ description: Whether to update existing casting links
31
42
  - in: formData
32
43
  name: file
33
44
  type: file
34
45
  required: true
46
+ description: CSV file with casting link data
35
47
  responses:
36
48
  201:
37
- description: The lists of imported casting links.
49
+ description: Casting links imported successfully
50
+ content:
51
+ application/json:
52
+ schema:
53
+ type: array
54
+ items:
55
+ type: object
56
+ properties:
57
+ id:
58
+ type: string
59
+ format: uuid
60
+ example: a24a6ea4-ce75-4665-a070-57453082c25
61
+ entity_in_id:
62
+ type: string
63
+ format: uuid
64
+ example: b24a6ea4-ce75-4665-a070-57453082c25
65
+ entity_out_id:
66
+ type: string
67
+ format: uuid
68
+ example: c24a6ea4-ce75-4665-a070-57453082c25
69
+ nb_occurences:
70
+ type: integer
71
+ example: 1
72
+ label:
73
+ type: string
74
+ example: fixed
38
75
  400:
39
- description: The .csv file is not properly formatted.
76
+ description: Invalid CSV format or missing required columns
40
77
  """
41
78
  return super().post(project_id)
42
79
 
@@ -27,28 +27,66 @@ from zou.app.utils import events, string
27
27
  class EditsCsvImportResource(BaseCsvProjectImportResource):
28
28
  def post(self, project_id):
29
29
  """
30
- Import project edits.
30
+ Import edits csv
31
31
  ---
32
32
  tags:
33
33
  - Import
34
+ description: Import project edits from a CSV file. Creates or updates
35
+ edits based on CSV rows. Supports metadata descriptors and task
36
+ status updates.
34
37
  consumes:
35
38
  - multipart/form-data
36
39
  parameters:
40
+ - in: path
41
+ name: project_id
42
+ required: true
43
+ schema:
44
+ type: string
45
+ format: uuid
46
+ example: a24a6ea4-ce75-4665-a070-57453082c25
47
+ - in: query
48
+ name: update
49
+ required: false
50
+ schema:
51
+ type: boolean
52
+ default: false
53
+ example: false
54
+ description: Whether to update existing edits
37
55
  - in: formData
38
56
  name: file
39
57
  type: file
40
58
  required: true
41
- - in: path
42
- name: project_id
43
- required: True
44
- type: string
45
- format: uuid
46
- example: a24a6ea4-ce75-4665-a070-57453082c25
59
+ description: CSV file with edit data
47
60
  responses:
48
61
  201:
49
- description: Edits imported
62
+ description: Edits imported successfully
63
+ content:
64
+ application/json:
65
+ schema:
66
+ type: array
67
+ items:
68
+ type: object
69
+ properties:
70
+ id:
71
+ type: string
72
+ format: uuid
73
+ example: a24a6ea4-ce75-4665-a070-57453082c25
74
+ name:
75
+ type: string
76
+ example: Edit_001
77
+ project_id:
78
+ type: string
79
+ format: uuid
80
+ example: b24a6ea4-ce75-4665-a070-57453082c25
81
+ parent_id:
82
+ type: string
83
+ format: uuid
84
+ example: c24a6ea4-ce75-4665-a070-57453082c25
85
+ description:
86
+ type: string
87
+ example: Edit description
50
88
  400:
51
- description: Format error
89
+ description: Invalid CSV format or missing required columns
52
90
  """
53
91
  return super().post(project_id)
54
92
 
@@ -10,22 +10,61 @@ from zou.app.utils.string import strtobool
10
10
  class PersonsCsvImportResource(BaseCsvImportResource):
11
11
  def post(self):
12
12
  """
13
- Import persons via a .csv file.
13
+ Import persons csv
14
14
  ---
15
15
  tags:
16
- - Import
16
+ - Import
17
+ description: Import persons from a CSV file. Creates or updates
18
+ persons based on CSV rows. Supports role, contract type, and
19
+ active status updates.
17
20
  consumes:
18
21
  - multipart/form-data
19
22
  parameters:
23
+ - in: query
24
+ name: update
25
+ required: false
26
+ schema:
27
+ type: boolean
28
+ default: false
29
+ example: false
30
+ description: Whether to update existing persons
20
31
  - in: formData
21
32
  name: file
22
33
  type: file
23
34
  required: true
35
+ description: CSV file with person data
24
36
  responses:
25
37
  201:
26
- description: The lists of imported persons.
38
+ description: Persons imported successfully
39
+ content:
40
+ application/json:
41
+ schema:
42
+ type: array
43
+ items:
44
+ type: object
45
+ properties:
46
+ id:
47
+ type: string
48
+ format: uuid
49
+ example: a24a6ea4-ce75-4665-a070-57453082c25
50
+ first_name:
51
+ type: string
52
+ example: John
53
+ last_name:
54
+ type: string
55
+ example: Doe
56
+ email:
57
+ type: string
58
+ format: email
59
+ example: john.doe@example.com
60
+ phone:
61
+ type: string
62
+ example: +1234567890
63
+ active:
64
+ type: boolean
65
+ example: true
27
66
  400:
28
- description: The .csv file is not properly formatted.
67
+ description: Invalid CSV format or missing required columns
29
68
  """
30
69
  return super().post()
31
70
 
@@ -27,28 +27,69 @@ from zou.app.utils import events, string
27
27
  class ShotsCsvImportResource(BaseCsvProjectImportResource):
28
28
  def post(self, project_id):
29
29
  """
30
- Import project shots via a .csv file.
30
+ Import shots csv
31
31
  ---
32
32
  tags:
33
33
  - Import
34
+ description: Import project shots from a CSV file. Creates or updates
35
+ shots based on CSV rows. Supports sequences, episodes, and task
36
+ status updates.
34
37
  consumes:
35
38
  - multipart/form-data
36
39
  parameters:
37
40
  - in: path
38
41
  name: project_id
39
- required: True
40
- type: string
41
- format: uuid
42
+ required: true
43
+ schema:
44
+ type: string
45
+ format: uuid
42
46
  example: a24a6ea4-ce75-4665-a070-57453082c25
47
+ - in: query
48
+ name: update
49
+ required: false
50
+ schema:
51
+ type: boolean
52
+ default: false
53
+ example: false
54
+ description: Whether to update existing shots
43
55
  - in: formData
44
56
  name: file
45
57
  type: file
46
58
  required: true
59
+ description: CSV file with shot data
47
60
  responses:
48
61
  201:
49
- description: The lists of imported assets.
62
+ description: Shots imported successfully
63
+ content:
64
+ application/json:
65
+ schema:
66
+ type: array
67
+ items:
68
+ type: object
69
+ properties:
70
+ id:
71
+ type: string
72
+ format: uuid
73
+ example: a24a6ea4-ce75-4665-a070-57453082c25
74
+ name:
75
+ type: string
76
+ example: SH010
77
+ project_id:
78
+ type: string
79
+ format: uuid
80
+ example: b24a6ea4-ce75-4665-a070-57453082c25
81
+ parent_id:
82
+ type: string
83
+ format: uuid
84
+ example: c24a6ea4-ce75-4665-a070-57453082c25
85
+ nb_frames:
86
+ type: integer
87
+ example: 120
88
+ description:
89
+ type: string
90
+ example: Shot description
50
91
  400:
51
- description: The .csv file is not properly formatted.
92
+ description: Invalid CSV format or missing required columns
52
93
  """
53
94
  return super().post(project_id)
54
95
 
@@ -16,9 +16,6 @@ from zou.app.utils import date_helpers
16
16
 
17
17
 
18
18
  class TaskTypeEstimationsCsvImportResource(BaseCsvProjectImportResource):
19
- """
20
- Import the estimations of task-types for given project.
21
- """
22
19
 
23
20
  def check_permissions(self, project_id, task_type, episode_id=None):
24
21
  return user_service.check_supervisor_project_task_type_access(
@@ -27,34 +24,65 @@ class TaskTypeEstimationsCsvImportResource(BaseCsvProjectImportResource):
27
24
 
28
25
  def post(self, project_id, task_type_id, episode_id=None):
29
26
  """
30
- Import the estimations of task-types for given project.
27
+ Import task type estimations csv
31
28
  ---
32
29
  tags:
33
30
  - Import
31
+ description: Import task type estimations from a CSV file. Updates
32
+ estimations, dates, and other task properties for assets or shots
33
+ based on CSV rows.
34
34
  consumes:
35
35
  - multipart/form-data
36
36
  parameters:
37
- - in: formData
38
- name: file
39
- type: file
40
- required: true
41
37
  - in: path
42
38
  name: project_id
43
- required: True
44
- type: string
45
- format: uuid
39
+ required: true
40
+ schema:
41
+ type: string
42
+ format: uuid
46
43
  example: a24a6ea4-ce75-4665-a070-57453082c25
47
44
  - in: path
48
45
  name: task_type_id
49
- required: True
50
- type: string
51
- format: uuid
52
- example: a24a6ea4-ce75-4665-a070-57453082c25
46
+ required: true
47
+ schema:
48
+ type: string
49
+ format: uuid
50
+ example: b24a6ea4-ce75-4665-a070-57453082c25
51
+ - in: formData
52
+ name: file
53
+ type: file
54
+ required: true
55
+ description: CSV file with task estimation data
53
56
  responses:
54
57
  201:
55
- description: Estimations imported
58
+ description: Task estimations imported successfully
59
+ content:
60
+ application/json:
61
+ schema:
62
+ type: array
63
+ items:
64
+ type: object
65
+ properties:
66
+ id:
67
+ type: string
68
+ format: uuid
69
+ example: a24a6ea4-ce75-4665-a070-57453082c25
70
+ name:
71
+ type: string
72
+ example: Asset Modeling
73
+ estimation:
74
+ type: integer
75
+ example: 480
76
+ start_date:
77
+ type: string
78
+ format: date
79
+ example: "2024-01-15"
80
+ due_date:
81
+ type: string
82
+ format: date
83
+ example: "2024-01-25"
56
84
  400:
57
- description: Format error
85
+ description: Invalid CSV format or entity not found
58
86
  """
59
87
  task_type = tasks_service.get_task_type(task_type_id)
60
88
  return super().post(project_id, task_type, episode_id)
@@ -151,39 +179,71 @@ class TaskTypeEstimationsEpisodeCsvImportResource(
151
179
  ):
152
180
  def post(self, project_id, task_type_id, episode_id):
153
181
  """
154
- Import the estimations of task-types for given episode of given project.
182
+ Import episode task type estimations csv
155
183
  ---
156
184
  tags:
157
185
  - Import
186
+ description: Import task type estimations from a CSV file for a
187
+ specific episode. Updates estimations, dates, and other task
188
+ properties for assets or shots based on CSV rows.
158
189
  consumes:
159
190
  - multipart/form-data
160
191
  parameters:
161
- - in: formData
162
- name: file
163
- type: file
164
- required: true
165
192
  - in: path
166
193
  name: project_id
167
- required: True
168
- type: string
169
- format: uuid
194
+ required: true
195
+ schema:
196
+ type: string
197
+ format: uuid
170
198
  example: a24a6ea4-ce75-4665-a070-57453082c25
171
199
  - in: path
172
200
  name: task_type_id
173
- required: True
174
- type: string
175
- format: uuid
176
- example: a24a6ea4-ce75-4665-a070-57453082c25
201
+ required: true
202
+ schema:
203
+ type: string
204
+ format: uuid
205
+ example: b24a6ea4-ce75-4665-a070-57453082c25
177
206
  - in: path
178
207
  name: episode_id
179
- required: True
180
- type: string
181
- format: uuid
182
- example: a24a6ea4-ce75-4665-a070-57453082c25
208
+ required: true
209
+ schema:
210
+ type: string
211
+ format: uuid
212
+ example: c24a6ea4-ce75-4665-a070-57453082c25
213
+ - in: formData
214
+ name: file
215
+ type: file
216
+ required: true
217
+ description: CSV file with task estimation data
183
218
  responses:
184
219
  201:
185
- description: Estimations imported
220
+ description: Task estimations imported successfully
221
+ content:
222
+ application/json:
223
+ schema:
224
+ type: array
225
+ items:
226
+ type: object
227
+ properties:
228
+ id:
229
+ type: string
230
+ format: uuid
231
+ example: a24a6ea4-ce75-4665-a070-57453082c25
232
+ name:
233
+ type: string
234
+ example: Asset Modeling
235
+ estimation:
236
+ type: integer
237
+ example: 480
238
+ start_date:
239
+ type: string
240
+ format: date
241
+ example: "2024-01-15"
242
+ due_date:
243
+ type: string
244
+ format: date
245
+ example: "2024-01-25"
186
246
  400:
187
- description: Format error
247
+ description: Invalid CSV format or entity not found
188
248
  """
189
249
  return super().post(project_id, task_type_id, episode_id)