zou 0.20.11__py3-none-any.whl → 0.20.12__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.
zou/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.20.11"
1
+ __version__ = "0.20.12"
@@ -11,6 +11,7 @@ from zou.app.services import (
11
11
  )
12
12
  from zou.app.utils import permissions
13
13
  from zou.app.services.exception import WrongParameterException
14
+ from zou.app.models.metadata_descriptor import METADATA_DESCRIPTOR_TYPES
14
15
 
15
16
 
16
17
  class OpenProjectsResource(Resource, ArgsMixin):
@@ -715,6 +716,10 @@ class ProductionMetadataDescriptorsResource(Resource, ArgsMixin):
715
716
  if len(args["name"]) == 0:
716
717
  raise WrongParameterException("Name cannot be empty.")
717
718
 
719
+ types = [type_name for type_name, _ in METADATA_DESCRIPTOR_TYPES]
720
+ if args["data_type"] not in types:
721
+ raise WrongParameterException("Invalid data_type")
722
+
718
723
  return (
719
724
  projects_service.add_metadata_descriptor(
720
725
  project_id,
@@ -828,6 +833,10 @@ class ProductionMetadataDescriptorResource(Resource, ArgsMixin):
828
833
  if len(args["name"]) == 0:
829
834
  raise WrongParameterException("Name cannot be empty.")
830
835
 
836
+ types = [type_name for type_name, _ in METADATA_DESCRIPTOR_TYPES]
837
+ if args["data_type"] not in types:
838
+ raise WrongParameterException("Invalid data_type")
839
+
831
840
  args["for_client"] = args["for_client"] == "True"
832
841
 
833
842
  return projects_service.update_metadata_descriptor(descriptor_id, args)
zou/app/models/person.py CHANGED
@@ -49,11 +49,21 @@ class DepartmentLink(db.Model):
49
49
  UUIDType(binary=False),
50
50
  db.ForeignKey("person.id"),
51
51
  primary_key=True,
52
+ index=True,
52
53
  )
53
54
  department_id = db.Column(
54
55
  UUIDType(binary=False),
55
56
  db.ForeignKey("department.id"),
56
57
  primary_key=True,
58
+ index=True,
59
+ )
60
+
61
+ __table_args__ = (
62
+ db.UniqueConstraint(
63
+ "person_id",
64
+ "department_id",
65
+ name="department_link_uc",
66
+ ),
57
67
  )
58
68
 
59
69
 
@@ -1424,7 +1424,7 @@ def get_last_notifications(
1424
1424
  )
1425
1425
  reply_mentions = reply.get("mentions", []) or []
1426
1426
  reply_department_mentions = (
1427
- reply.get("departement_mentions", []) or []
1427
+ reply.get("department_mentions", []) or []
1428
1428
  )
1429
1429
  if reply is not None:
1430
1430
  reply_text = reply["text"]
@@ -0,0 +1,50 @@
1
+ """For DepartmentLink index person_id / department_id
2
+
3
+ Revision ID: 539a3a00c417
4
+ Revises: 9d3bb33c6fc6
5
+ Create Date: 2025-01-14 12:19:52.699322
6
+
7
+ """
8
+
9
+ from alembic import op
10
+
11
+
12
+ # revision identifiers, used by Alembic.
13
+ revision = "539a3a00c417"
14
+ down_revision = "9d3bb33c6fc6"
15
+ branch_labels = None
16
+ depends_on = None
17
+
18
+
19
+ def upgrade():
20
+ # ### commands auto generated by Alembic - please adjust! ###
21
+ with op.batch_alter_table("department_link", schema=None) as batch_op:
22
+ batch_op.create_unique_constraint(
23
+ "department_link_uc", ["person_id", "department_id"]
24
+ )
25
+ batch_op.create_index(
26
+ batch_op.f("ix_department_link_department_id"),
27
+ ["department_id"],
28
+ unique=False,
29
+ )
30
+ batch_op.create_index(
31
+ batch_op.f("ix_department_link_person_id"),
32
+ ["person_id"],
33
+ unique=False,
34
+ )
35
+ batch_op.create_primary_key(
36
+ "department_link_pkey", ["person_id", "department_id"]
37
+ )
38
+
39
+ # ### end Alembic commands ###
40
+
41
+
42
+ def downgrade():
43
+ # ### commands auto generated by Alembic - please adjust! ###
44
+ with op.batch_alter_table("department_link", schema=None) as batch_op:
45
+ batch_op.drop_index(batch_op.f("ix_department_link_person_id"))
46
+ batch_op.drop_index(batch_op.f("ix_department_link_department_id"))
47
+ batch_op.drop_constraint("department_link_uc", type_="unique")
48
+ batch_op.drop_constraint("department_link_pkey", type_="primary")
49
+
50
+ # ### end Alembic commands ###
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: zou
3
- Version: 0.20.11
3
+ Version: 0.20.12
4
4
  Summary: API to store and manage the data of your animation production
5
5
  Home-page: https://zou.cg-wire.com
6
6
  Author: CG Wire
@@ -41,7 +41,7 @@ Requires-Dist: flask-jwt-extended==4.7.1
41
41
  Requires-Dist: flask-migrate==4.1.0
42
42
  Requires-Dist: flask-socketio==5.5.1
43
43
  Requires-Dist: flask==3.1.0
44
- Requires-Dist: gazu==0.10.22
44
+ Requires-Dist: gazu==0.10.23
45
45
  Requires-Dist: gevent-websocket==0.10.1
46
46
  Requires-Dist: gevent==24.11.1
47
47
  Requires-Dist: gunicorn==23.0.0
@@ -52,14 +52,14 @@ Requires-Dist: ldap3==2.9.1
52
52
  Requires-Dist: matterhook==0.2
53
53
  Requires-Dist: meilisearch==0.33.1
54
54
  Requires-Dist: numpy==2.0.1; python_version == "3.9"
55
- Requires-Dist: numpy==2.2.1; python_version >= "3.10"
56
- Requires-Dist: opencv-python==4.10.0.84
55
+ Requires-Dist: numpy==2.2.2; python_version >= "3.10"
56
+ Requires-Dist: opencv-python==4.11.0.86
57
57
  Requires-Dist: OpenTimelineIO==0.17.0
58
58
  Requires-Dist: OpenTimelineIO-Plugins==0.17.0
59
- Requires-Dist: orjson==3.10.14
59
+ Requires-Dist: orjson==3.10.15
60
60
  Requires-Dist: pillow==11.1.0
61
61
  Requires-Dist: psutil==6.1.1
62
- Requires-Dist: psycopg[binary]==3.2.3
62
+ Requires-Dist: psycopg[binary]==3.2.4
63
63
  Requires-Dist: pyotp==2.9.0
64
64
  Requires-Dist: pysaml2==7.5.0
65
65
  Requires-Dist: python-nomad==2.0.1
@@ -87,7 +87,7 @@ Requires-Dist: pytest==8.3.4; extra == "test"
87
87
  Provides-Extra: monitoring
88
88
  Requires-Dist: prometheus-flask-exporter==0.23.1; extra == "monitoring"
89
89
  Requires-Dist: pygelf==0.4.2; extra == "monitoring"
90
- Requires-Dist: sentry-sdk==2.19.2; extra == "monitoring"
90
+ Requires-Dist: sentry-sdk==2.20.0; extra == "monitoring"
91
91
  Provides-Extra: lint
92
92
  Requires-Dist: autoflake==2.3.1; extra == "lint"
93
93
  Requires-Dist: black==24.10.0; extra == "lint"
@@ -1,4 +1,4 @@
1
- zou/__init__.py,sha256=somEGXFvHhuE-Am1IwxLrXctMcGtTMhLq2X5WnKGyQ4,24
1
+ zou/__init__.py,sha256=8CzByu23_8LJYiPVV52x1uqeLZvtCuW9qB1Gqau4d7I,24
2
2
  zou/cli.py,sha256=H18Wg-wqQOsv4F5_bZRDlxskjO-TRwaV1NmQMTH9mdg,18869
3
3
  zou/debug.py,sha256=1fawPbkD4wn0Y9Gk0BiBFSa-CQe5agFi8R9uJYl2Uyk,520
4
4
  zou/event_stream.py,sha256=EpohqFJwWL0zs-Ic_W5dX5_XSDeCrqHQPL5Re39OnQ0,6382
@@ -93,7 +93,7 @@ zou/app/blueprints/playlists/resources.py,sha256=alRlMHypUFErXLsEYxpFK84cdjFJ3YW
93
93
  zou/app/blueprints/previews/__init__.py,sha256=ihC6OQ9AUjnZ2JeMnjRh_tKGO0UmAjOwhZnOivc3BnQ,4460
94
94
  zou/app/blueprints/previews/resources.py,sha256=22-ISgZba0SpQ2sS0l5WjVtLTaiLKoal4aLcqxLQX9s,53176
95
95
  zou/app/blueprints/projects/__init__.py,sha256=Pn3fA5bpNFEPBzxTKJ2foV6osZFflXXSM2l2uZh3ktM,3927
96
- zou/app/blueprints/projects/resources.py,sha256=E91Vj9EzId2pxiL50JRfrThiyif1PmzWS1oPeMThzQI,31544
96
+ zou/app/blueprints/projects/resources.py,sha256=1WBS2FyaY1RSA_T-BdPnc8X9myjTJ127bMDigyoAklk,31979
97
97
  zou/app/blueprints/search/__init__.py,sha256=QCjQIY_85l_orhdEiqav_GifjReuwsjZggN3V0GeUVY,356
98
98
  zou/app/blueprints/search/resources.py,sha256=_QgRlUuxCPgY-ip5r2lGFtXNcGSE579JsCSrVf8ajVU,3093
99
99
  zou/app/blueprints/shots/__init__.py,sha256=HfgLneZBYUMa2OGwIgEZTz8zrIEYFRiYmRbreBPYeYw,4076
@@ -159,7 +159,7 @@ zou/app/models/notification.py,sha256=1ODOymGPeB4oxgX_3WhOgIL_Lsz-JR7miDkBS6W8t_
159
159
  zou/app/models/organisation.py,sha256=R69AR1JDZSs6YeXDalmz3ewmrSMDv9Mr8AZAHn09Iu0,1365
160
160
  zou/app/models/output_file.py,sha256=hyLGrpsgrk0aisDXppRQrB7ItCwyuyw-X0ZwVAHabsA,2569
161
161
  zou/app/models/output_type.py,sha256=us_lCUCEvuP4vi_XmmOcEl1J2MtZhMX5ZheBqEFCgWA,381
162
- zou/app/models/person.py,sha256=E6aTbN6HigVTh9_myMfYK6iqrdUfMRB6XBtowdA-qYQ,7511
162
+ zou/app/models/person.py,sha256=txHmSzokaS-tET_MIjGHxhNNS8CPt-GzUPIhp5baDmU,7714
163
163
  zou/app/models/playlist.py,sha256=YGgAk84u0_fdIEY02Dal4kfk8APVZvWFwWYV74qvrio,1503
164
164
  zou/app/models/preview_background_file.py,sha256=j8LgRmY7INnlB07hFwwB-8ssQrRC8vsb8VcpsTbt6tA,559
165
165
  zou/app/models/preview_file.py,sha256=Ur45Wau2X3qyKULh04EUcMbnBmaQc8y4IMs5NgELiAQ,3134
@@ -213,7 +213,7 @@ zou/app/services/sync_service.py,sha256=kJ1LGMNfPh9_BDwGTfoYWHrLZ8OlT0hWk-R8wNt0
213
213
  zou/app/services/tasks_service.py,sha256=Cv1iEdXwZommRkKh8wv7_hf6yaEDIL9SYWRNuoAmdhg,68683
214
214
  zou/app/services/telemetry_services.py,sha256=xQm1h1t_JxSFW59zQGf4NuNdUi1UfMa_6pQ-ytRbmGA,1029
215
215
  zou/app/services/time_spents_service.py,sha256=H9X-60s6oqtY9rtU-K2jKwUSljfkdGlf_9wMr3iVfIA,15158
216
- zou/app/services/user_service.py,sha256=8L6XcSECPtVTAawMi7dox57Su6VF6KY1kFDSVItt_p0,50292
216
+ zou/app/services/user_service.py,sha256=QlyckTfiCx-bzRewqVwHMJQXerg6BWXYWfURhvp65G4,50291
217
217
  zou/app/stores/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
218
218
  zou/app/stores/auth_tokens_store.py,sha256=-qOJPybLHvnMOq3PWk073OW9HJwOHGhFLZeOIlX1UVw,1290
219
219
  zou/app/stores/file_store.py,sha256=yLQDM6mNbj9oe0vsWdBqun7D8Dw-eSjD1yHCCftX0OI,4045
@@ -300,6 +300,7 @@ zou/migrations/versions/4715c2586036_add_last_preview_file_fields.py,sha256=ez0H
300
300
  zou/migrations/versions/4e3738cdc34c_.py,sha256=0THgcNbLygTZb462fHZ9SK2EBq_j6_htcPXz4CZbVkg,2636
301
301
  zou/migrations/versions/4f2398ebcd49_.py,sha256=7ZYIHv3bjppg3dqvBHe_sBatzz7etQBpuRKY-DSvR_Q,683
302
302
  zou/migrations/versions/523ee9647bee_.py,sha256=2PbD0cNflQtHd7TLxyfSQDJ8gHybUYCKcPQw_XUivfU,1262
303
+ zou/migrations/versions/539a3a00c417_for_departmentlink_index_person_id_.py,sha256=6_nJuUQsSXvUbhUrzfyr7ACDZehxkfkm0tz_cxV773Y,1534
303
304
  zou/migrations/versions/54ee0d1d60ba_add_build_job_model.py,sha256=xePUVxovJ_EOVCdNPz9qoXR_mf89YOhl2IIwYaTQhzI,1889
304
305
  zou/migrations/versions/556526e47daa_.py,sha256=XvDBc0o4l76Rf1FBXb5sopNHiGEe-R8tbZ5C5LmLAOA,2052
305
306
  zou/migrations/versions/57222395f2be_add_statusautomation_import_last_revision.py,sha256=rPRvyxfrtEtFywGuBkfB8VLEs3EUytgUyA8xB8vtH4A,1039
@@ -414,9 +415,9 @@ zou/remote/normalize_movie.py,sha256=zNfEY3N1UbAHZfddGONTg2Sff3ieLVWd4dfZa1dpnes
414
415
  zou/remote/playlist.py,sha256=AsDo0bgYhDcd6DfNRV6r6Jj3URWwavE2ZN3VkKRPbLU,3293
415
416
  zou/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
416
417
  zou/utils/movie.py,sha256=d67fIL9dVBKt-E_qCGXRbNNdbJaJR5sHvZeX3hf8ldE,16559
417
- zou-0.20.11.dist-info/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
418
- zou-0.20.11.dist-info/METADATA,sha256=qKU00E_qUjcw3SvgfyRtfBL3BJdvK2OKmQFRTMi2x9k,6734
419
- zou-0.20.11.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
420
- zou-0.20.11.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
421
- zou-0.20.11.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
422
- zou-0.20.11.dist-info/RECORD,,
418
+ zou-0.20.12.dist-info/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
419
+ zou-0.20.12.dist-info/METADATA,sha256=vhg2GEG6aD2iaBExk_Lx0R3yWOxtLpkYF_UgKg-UmWQ,6734
420
+ zou-0.20.12.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
421
+ zou-0.20.12.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
422
+ zou-0.20.12.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
423
+ zou-0.20.12.dist-info/RECORD,,
File without changes
File without changes