gazu 0.10.5__tar.gz → 0.10.6__tar.gz
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.
- {gazu-0.10.5 → gazu-0.10.6}/PKG-INFO +2 -2
- gazu-0.10.6/gazu/__version__.py +1 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/sync.py +25 -10
- {gazu-0.10.5 → gazu-0.10.6}/gazu/task.py +2 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu.egg-info/PKG-INFO +2 -2
- {gazu-0.10.5 → gazu-0.10.6}/gazu.egg-info/requires.txt +1 -1
- {gazu-0.10.5 → gazu-0.10.6}/setup.cfg +1 -1
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_sync.py +27 -7
- gazu-0.10.5/gazu/__version__.py +0 -1
- {gazu-0.10.5 → gazu-0.10.6}/LICENSE +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/README.rst +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/__init__.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/asset.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/cache.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/casting.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/client.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/concept.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/context.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/edit.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/encoder.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/entity.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/events.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/exception.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/files.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/helpers.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/person.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/playlist.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/project.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/scene.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/shot.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/sorting.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu/user.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu.egg-info/SOURCES.txt +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu.egg-info/dependency_links.txt +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu.egg-info/not-zip-safe +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/gazu.egg-info/top_level.txt +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/pyproject.toml +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/setup.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_asset.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_cache.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_casting.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_client.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_concept.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_context.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_edit.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_entity.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_files.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_helpers.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_person.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_playlist.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_project.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_scene.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_shot.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_task.py +0 -0
- {gazu-0.10.5 → gazu-0.10.6}/tests/test_user.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gazu
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.6
|
|
4
4
|
Summary: Gazu is a client for Zou, the API to store the data of your CG production.
|
|
5
5
|
Home-page: https://gazu.cg-wire.com/
|
|
6
6
|
Author: CG Wire
|
|
@@ -35,7 +35,7 @@ Requires-Dist: pytest; extra == "test"
|
|
|
35
35
|
Requires-Dist: pytest-cov; extra == "test"
|
|
36
36
|
Requires-Dist: requests_mock; extra == "test"
|
|
37
37
|
Provides-Extra: lint
|
|
38
|
-
Requires-Dist: black==24.4.
|
|
38
|
+
Requires-Dist: black==24.4.2; python_version >= "3.8" and extra == "lint"
|
|
39
39
|
Requires-Dist: pre-commit==3.7.0; python_version >= "3.9" and extra == "lint"
|
|
40
40
|
|
|
41
41
|
.. figure:: https://zou.cg-wire.com/kitsu.png
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.10.6"
|
|
@@ -22,6 +22,7 @@ def get_last_events(
|
|
|
22
22
|
after=None,
|
|
23
23
|
before=None,
|
|
24
24
|
only_files=False,
|
|
25
|
+
name=None,
|
|
25
26
|
client=default,
|
|
26
27
|
):
|
|
27
28
|
"""
|
|
@@ -46,6 +47,8 @@ def get_last_events(
|
|
|
46
47
|
params["after"] = validate_date_format(after)
|
|
47
48
|
if before is not None:
|
|
48
49
|
params["before"] = validate_date_format(before)
|
|
50
|
+
if name is not None:
|
|
51
|
+
params["name"] = name
|
|
49
52
|
return raw.get(path, params=params, client=client)
|
|
50
53
|
|
|
51
54
|
|
|
@@ -88,7 +91,7 @@ def import_entity_links(links, client=default):
|
|
|
88
91
|
return raw.post("import/kitsu/entity-links", links, client=client)
|
|
89
92
|
|
|
90
93
|
|
|
91
|
-
def get_model_list_diff(source_list, target_list):
|
|
94
|
+
def get_model_list_diff(source_list, target_list, id_field="id"):
|
|
92
95
|
"""
|
|
93
96
|
Args:
|
|
94
97
|
source_list (list): List of models to compare.
|
|
@@ -99,13 +102,17 @@ def get_model_list_diff(source_list, target_list):
|
|
|
99
102
|
and one containing the models that should not be in the target list.
|
|
100
103
|
"""
|
|
101
104
|
missing = []
|
|
102
|
-
source_ids = {m[
|
|
103
|
-
target_ids = {m[
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
source_ids = {m[id_field]: True for m in source_list}
|
|
106
|
+
target_ids = {m[id_field]: True for m in target_list}
|
|
107
|
+
missing = [
|
|
108
|
+
model
|
|
109
|
+
for model in source_list
|
|
110
|
+
if not target_ids.get(model[id_field], False)
|
|
111
|
+
]
|
|
107
112
|
unexpected = [
|
|
108
|
-
model
|
|
113
|
+
model
|
|
114
|
+
for model in target_list
|
|
115
|
+
if not source_ids.get(model[id_field], False)
|
|
109
116
|
]
|
|
110
117
|
return (missing, unexpected)
|
|
111
118
|
|
|
@@ -450,7 +457,6 @@ def push_tasks(
|
|
|
450
457
|
|
|
451
458
|
default_status_id = normalize_model_parameter(default_status)["id"]
|
|
452
459
|
task_type_map = get_sync_task_type_id_map(client_source, client_target)
|
|
453
|
-
task_status_map = get_sync_task_status_id_map(client_source, client_target)
|
|
454
460
|
person_map = get_sync_person_id_map(client_source, client_target)
|
|
455
461
|
|
|
456
462
|
tasks = task_module.all_tasks_for_project(
|
|
@@ -528,7 +534,13 @@ def push_task_comments(
|
|
|
528
534
|
|
|
529
535
|
|
|
530
536
|
def push_task_comment(
|
|
531
|
-
task_status_map,
|
|
537
|
+
task_status_map,
|
|
538
|
+
person_map,
|
|
539
|
+
task,
|
|
540
|
+
comment,
|
|
541
|
+
client_source,
|
|
542
|
+
client_target,
|
|
543
|
+
author_id=None,
|
|
532
544
|
):
|
|
533
545
|
"""
|
|
534
546
|
Create a new comment into target api for each comment in source task
|
|
@@ -586,7 +598,10 @@ def push_task_comment(
|
|
|
586
598
|
)
|
|
587
599
|
|
|
588
600
|
task_status = {"id": task_status_map[comment["task_status_id"]]}
|
|
589
|
-
author_id
|
|
601
|
+
if author_id is not None:
|
|
602
|
+
author_id = author_id
|
|
603
|
+
else:
|
|
604
|
+
author_id = person_map[comment["person_id"]]
|
|
590
605
|
person = {"id": author_id}
|
|
591
606
|
|
|
592
607
|
comment_target = task_module.add_comment(
|
|
@@ -789,6 +789,7 @@ def add_comment(
|
|
|
789
789
|
checklist=[],
|
|
790
790
|
attachments=[],
|
|
791
791
|
created_at=None,
|
|
792
|
+
links=[],
|
|
792
793
|
client=default,
|
|
793
794
|
):
|
|
794
795
|
"""
|
|
@@ -804,6 +805,7 @@ def add_comment(
|
|
|
804
805
|
checklist (list): Comment checklist
|
|
805
806
|
attachments (list[file_path]): Attachments file paths
|
|
806
807
|
created_at (str): Comment date
|
|
808
|
+
links (list): List of links to add to the comment
|
|
807
809
|
|
|
808
810
|
Returns:
|
|
809
811
|
dict: Created comment.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gazu
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.6
|
|
4
4
|
Summary: Gazu is a client for Zou, the API to store the data of your CG production.
|
|
5
5
|
Home-page: https://gazu.cg-wire.com/
|
|
6
6
|
Author: CG Wire
|
|
@@ -35,7 +35,7 @@ Requires-Dist: pytest; extra == "test"
|
|
|
35
35
|
Requires-Dist: pytest-cov; extra == "test"
|
|
36
36
|
Requires-Dist: requests_mock; extra == "test"
|
|
37
37
|
Provides-Extra: lint
|
|
38
|
-
Requires-Dist: black==24.4.
|
|
38
|
+
Requires-Dist: black==24.4.2; python_version >= "3.8" and extra == "lint"
|
|
39
39
|
Requires-Dist: pre-commit==3.7.0; python_version >= "3.9" and extra == "lint"
|
|
40
40
|
|
|
41
41
|
.. figure:: https://zou.cg-wire.com/kitsu.png
|
|
@@ -38,16 +38,36 @@ class SyncestCase(unittest.TestCase):
|
|
|
38
38
|
|
|
39
39
|
def test_get_model_list_diff(self):
|
|
40
40
|
source_list = [
|
|
41
|
-
{"id": "asset-1"},
|
|
42
|
-
{"id": "asset-2"},
|
|
43
|
-
{"id": "asset-3"},
|
|
41
|
+
{"id": "asset-1", "name": "Asset 1"},
|
|
42
|
+
{"id": "asset-2", "name": "Asset 2"},
|
|
43
|
+
{"id": "asset-3", "name": "Asset 3"},
|
|
44
44
|
]
|
|
45
|
-
target_list = [
|
|
46
|
-
|
|
45
|
+
target_list = [
|
|
46
|
+
{"id": "asset-2", "name": "Asset 2"},
|
|
47
|
+
{"id": "asset-4", "name": "Asset 4"},
|
|
48
|
+
]
|
|
49
|
+
missing, unexpected = gazu.sync.get_model_list_diff(
|
|
47
50
|
source_list, target_list
|
|
48
51
|
)
|
|
49
|
-
self.assertEqual(
|
|
50
|
-
|
|
52
|
+
self.assertEqual(
|
|
53
|
+
missing,
|
|
54
|
+
[
|
|
55
|
+
{"id": "asset-1", "name": "Asset 1"},
|
|
56
|
+
{"id": "asset-3", "name": "Asset 3"},
|
|
57
|
+
],
|
|
58
|
+
)
|
|
59
|
+
self.assertEqual(unexpected, [{"id": "asset-4", "name": "Asset 4"}])
|
|
60
|
+
missing, unexpected = gazu.sync.get_model_list_diff(
|
|
61
|
+
source_list, target_list, id_field="name"
|
|
62
|
+
)
|
|
63
|
+
self.assertEqual(
|
|
64
|
+
missing,
|
|
65
|
+
[
|
|
66
|
+
{"id": "asset-1", "name": "Asset 1"},
|
|
67
|
+
{"id": "asset-3", "name": "Asset 3"},
|
|
68
|
+
],
|
|
69
|
+
)
|
|
70
|
+
self.assertEqual(unexpected, [{"id": "asset-4", "name": "Asset 4"}])
|
|
51
71
|
source_list = []
|
|
52
72
|
target_list = []
|
|
53
73
|
(missing, unexpected) = gazu.sync.get_model_list_diff(
|
gazu-0.10.5/gazu/__version__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.10.5"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|