From fbb9d3e23279b6725a3d326ca1a93928c53cdedd Mon Sep 17 00:00:00 2001 From: "clement.hector" Date: Mon, 22 Nov 2021 13:58:51 +0100 Subject: [PATCH 01/74] Add parent asset in anatomy --- openpype/lib/avalon_context.py | 5 +++++ .../plugins/publish/collect_anatomy_context_data.py | 5 +++++ openpype/tools/workfiles/app.py | 11 ++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/openpype/lib/avalon_context.py b/openpype/lib/avalon_context.py index 372e116f43..581e4b9dbd 100644 --- a/openpype/lib/avalon_context.py +++ b/openpype/lib/avalon_context.py @@ -486,6 +486,10 @@ def get_workdir_data(project_doc, asset_doc, task_name, host_name): project_task_types = project_doc["config"]["tasks"] task_code = project_task_types.get(task_type, {}).get("short_name") + parent = project_doc["name"] + if len(asset_doc["data"]["parents"]) != 0: + parent = asset_doc["data"]["parents"][-1] + data = { "project": { "name": project_doc["name"], @@ -497,6 +501,7 @@ def get_workdir_data(project_doc, asset_doc, task_name, host_name): "short": task_code, }, "asset": asset_doc["name"], + "parent": parent, "app": host_name, "user": getpass.getuser(), "hierarchy": hierarchy, diff --git a/openpype/plugins/publish/collect_anatomy_context_data.py b/openpype/plugins/publish/collect_anatomy_context_data.py index 6b95979b76..b0c9eea576 100644 --- a/openpype/plugins/publish/collect_anatomy_context_data.py +++ b/openpype/plugins/publish/collect_anatomy_context_data.py @@ -60,12 +60,17 @@ class CollectAnatomyContextData(pyblish.api.ContextPlugin): project_task_types = project_entity["config"]["tasks"] task_code = project_task_types.get(task_type, {}).get("short_name") + parent = project_entity["name"] + if len(asset_entity["data"]["parents"]) != 0: + parent = asset_entity["data"]["parents"][-1] + context_data = { "project": { "name": project_entity["name"], "code": project_entity["data"].get("code") }, "asset": asset_entity["name"], + "parent": parent, "hierarchy": hierarchy.replace("\\", "/"), "task": { "name": task_name, diff --git a/openpype/tools/workfiles/app.py b/openpype/tools/workfiles/app.py index a4b1717a1c..4253f7450a 100644 --- a/openpype/tools/workfiles/app.py +++ b/openpype/tools/workfiles/app.py @@ -68,12 +68,16 @@ class NameWindow(QtWidgets.QDialog): "config.tasks": True, } ) + asset_doc = io.find_one( { "type": "asset", "name": asset_name }, - {"data.tasks": True} + { + "data.tasks": True, + "data.parents": True + } ) task_type = asset_doc["data"]["tasks"].get(task_name, {}).get("type") @@ -81,6 +85,10 @@ class NameWindow(QtWidgets.QDialog): project_task_types = project_doc["config"]["tasks"] task_short = project_task_types.get(task_type, {}).get("short_name") + parent = project_doc["name"] + if len(asset_doc["data"]["parents"]) != 0: + parent = asset_doc["data"]["parents"][-1] + self.data = { "project": { "name": project_doc["name"], @@ -92,6 +100,7 @@ class NameWindow(QtWidgets.QDialog): "type": task_type, "short": task_short, }, + "parent": parent, "version": 1, "user": getpass.getuser(), "comment": "", From 41a02fddc4b6241602f01620b3756d2887be9e54 Mon Sep 17 00:00:00 2001 From: "clement.hector" Date: Fri, 29 Oct 2021 11:34:26 +0200 Subject: [PATCH 02/74] add parent asset to doc --- website/docs/admin_settings_project_anatomy.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/website/docs/admin_settings_project_anatomy.md b/website/docs/admin_settings_project_anatomy.md index 30784686e2..e897b0ffab 100644 --- a/website/docs/admin_settings_project_anatomy.md +++ b/website/docs/admin_settings_project_anatomy.md @@ -57,9 +57,14 @@ We have a few required anatomy templates for OpenPype to work properly, however | `project[code]` | Project's code | | `hierarchy` | All hierarchical parents as subfolders | | `asset` | Name of asset or shot | +<<<<<<< HEAD | `task[name]` | Name of task | | `task[type]` | Type of task | | `task[short]` | Shortname of task | +======= +| `parent` | Name of parent folder | +| `task` | Name of task | +>>>>>>> add7db0c0... add parent asset to doc | `version` | Version number | | `subset` | Subset name | | `family` | Main family name | From 41c1f6a2d150ccdfa882b4e6a7e8003c694e1d3d Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 29 Nov 2021 13:09:00 +0100 Subject: [PATCH 03/74] reuse already available variables --- openpype/lib/avalon_context.py | 13 +++++++------ .../publish/collect_anatomy_context_data.py | 16 +++++++--------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/openpype/lib/avalon_context.py b/openpype/lib/avalon_context.py index 581e4b9dbd..8fb2543412 100644 --- a/openpype/lib/avalon_context.py +++ b/openpype/lib/avalon_context.py @@ -479,16 +479,17 @@ def get_workdir_data(project_doc, asset_doc, task_name, host_name): Returns: dict: Data prepared for filling workdir template. """ - hierarchy = "/".join(asset_doc["data"]["parents"]) - task_type = asset_doc['data']['tasks'].get(task_name, {}).get('type') project_task_types = project_doc["config"]["tasks"] task_code = project_task_types.get(task_type, {}).get("short_name") - parent = project_doc["name"] - if len(asset_doc["data"]["parents"]) != 0: - parent = asset_doc["data"]["parents"][-1] + asset_parents = asset_doc["data"]["parents"] + hierarchy = "/".join(asset_parents) + + parent_name = project_doc["name"] + if asset_parents: + parent_name = asset_parents[-1] data = { "project": { @@ -501,7 +502,7 @@ def get_workdir_data(project_doc, asset_doc, task_name, host_name): "short": task_code, }, "asset": asset_doc["name"], - "parent": parent, + "parent": parent_name, "app": host_name, "user": getpass.getuser(), "hierarchy": hierarchy, diff --git a/openpype/plugins/publish/collect_anatomy_context_data.py b/openpype/plugins/publish/collect_anatomy_context_data.py index b0c9eea576..ae8a879fba 100644 --- a/openpype/plugins/publish/collect_anatomy_context_data.py +++ b/openpype/plugins/publish/collect_anatomy_context_data.py @@ -49,20 +49,18 @@ class CollectAnatomyContextData(pyblish.api.ContextPlugin): project_entity = context.data["projectEntity"] asset_entity = context.data["assetEntity"] - hierarchy_items = asset_entity["data"]["parents"] - hierarchy = "" - if hierarchy_items: - hierarchy = os.path.join(*hierarchy_items) - asset_tasks = asset_entity["data"]["tasks"] task_type = asset_tasks.get(task_name, {}).get("type") project_task_types = project_entity["config"]["tasks"] task_code = project_task_types.get(task_type, {}).get("short_name") - parent = project_entity["name"] - if len(asset_entity["data"]["parents"]) != 0: - parent = asset_entity["data"]["parents"][-1] + asset_parents = asset_entity["data"]["parents"] + hierarchy = "/".join(asset_parents) + + parent_name = project_entity["name"] + if asset_parents: + parent_name = asset_parents[-1] context_data = { "project": { @@ -70,7 +68,7 @@ class CollectAnatomyContextData(pyblish.api.ContextPlugin): "code": project_entity["data"].get("code") }, "asset": asset_entity["name"], - "parent": parent, + "parent": parent_name, "hierarchy": hierarchy.replace("\\", "/"), "task": { "name": task_name, From 5c9a83b55dd79e9ddac6d678d4ad10cffed41bd8 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 29 Nov 2021 13:09:12 +0100 Subject: [PATCH 04/74] added missing update of parent --- openpype/plugins/publish/collect_anatomy_instance_data.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openpype/plugins/publish/collect_anatomy_instance_data.py b/openpype/plugins/publish/collect_anatomy_instance_data.py index da6a2195ee..74b556e28a 100644 --- a/openpype/plugins/publish/collect_anatomy_instance_data.py +++ b/openpype/plugins/publish/collect_anatomy_instance_data.py @@ -242,7 +242,11 @@ class CollectAnatomyInstanceData(pyblish.api.ContextPlugin): asset_doc = instance.data.get("assetEntity") if asset_doc and asset_doc["_id"] != context_asset_doc["_id"]: parents = asset_doc["data"].get("parents") or list() + parent_name = project_doc["name"] + if parents: + parent_name = parents[-1] anatomy_updates["hierarchy"] = "/".join(parents) + anatomy_updates["parent"] = parent_name # Task task_name = instance.data.get("task") From 853ba0efb37a464b7ee2db0781a43ffee9a132d1 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 29 Nov 2021 13:10:06 +0100 Subject: [PATCH 05/74] removed conflict marks from docstring --- website/docs/admin_settings_project_anatomy.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/website/docs/admin_settings_project_anatomy.md b/website/docs/admin_settings_project_anatomy.md index e897b0ffab..5cb396264e 100644 --- a/website/docs/admin_settings_project_anatomy.md +++ b/website/docs/admin_settings_project_anatomy.md @@ -57,14 +57,11 @@ We have a few required anatomy templates for OpenPype to work properly, however | `project[code]` | Project's code | | `hierarchy` | All hierarchical parents as subfolders | | `asset` | Name of asset or shot | -<<<<<<< HEAD | `task[name]` | Name of task | | `task[type]` | Type of task | | `task[short]` | Shortname of task | -======= | `parent` | Name of parent folder | | `task` | Name of task | ->>>>>>> add7db0c0... add parent asset to doc | `version` | Version number | | `subset` | Subset name | | `family` | Main family name | From c6916ef96cd7470a4e24668c0d6b5951363c7149 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 29 Nov 2021 13:11:17 +0100 Subject: [PATCH 06/74] modified description of parent --- website/docs/admin_settings_project_anatomy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/admin_settings_project_anatomy.md b/website/docs/admin_settings_project_anatomy.md index 5cb396264e..a8be77d25b 100644 --- a/website/docs/admin_settings_project_anatomy.md +++ b/website/docs/admin_settings_project_anatomy.md @@ -60,7 +60,7 @@ We have a few required anatomy templates for OpenPype to work properly, however | `task[name]` | Name of task | | `task[type]` | Type of task | | `task[short]` | Shortname of task | -| `parent` | Name of parent folder | +| `parent` | Name of hierarchical parent | | `task` | Name of task | | `version` | Version number | | `subset` | Subset name | From 741f326935f73a45f6b15da8185ee3d2c3c7ba70 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 29 Nov 2021 13:13:01 +0100 Subject: [PATCH 07/74] removed not needed replacement --- openpype/plugins/publish/collect_anatomy_context_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/plugins/publish/collect_anatomy_context_data.py b/openpype/plugins/publish/collect_anatomy_context_data.py index ae8a879fba..07de1b4420 100644 --- a/openpype/plugins/publish/collect_anatomy_context_data.py +++ b/openpype/plugins/publish/collect_anatomy_context_data.py @@ -69,7 +69,7 @@ class CollectAnatomyContextData(pyblish.api.ContextPlugin): }, "asset": asset_entity["name"], "parent": parent_name, - "hierarchy": hierarchy.replace("\\", "/"), + "hierarchy": hierarchy, "task": { "name": task_name, "type": task_type, From 77cdd406108f7fa0b4506153d196f8f237a96946 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 29 Nov 2021 13:16:24 +0100 Subject: [PATCH 08/74] changed variable name in workfiles tool --- openpype/tools/workfiles/app.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openpype/tools/workfiles/app.py b/openpype/tools/workfiles/app.py index 4253f7450a..987b886864 100644 --- a/openpype/tools/workfiles/app.py +++ b/openpype/tools/workfiles/app.py @@ -85,9 +85,10 @@ class NameWindow(QtWidgets.QDialog): project_task_types = project_doc["config"]["tasks"] task_short = project_task_types.get(task_type, {}).get("short_name") - parent = project_doc["name"] - if len(asset_doc["data"]["parents"]) != 0: - parent = asset_doc["data"]["parents"][-1] + asset_parents = asset_doc["data"]["parents"] + parent_name = project_doc["name"] + if asset_parents: + parent_name = asset_parents[-1] self.data = { "project": { @@ -100,7 +101,7 @@ class NameWindow(QtWidgets.QDialog): "type": task_type, "short": task_short, }, - "parent": parent, + "parent": parent_name, "version": 1, "user": getpass.getuser(), "comment": "", From 5795636af55067be12e3992408d40c23c339c1a4 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 30 Nov 2021 14:39:43 +0100 Subject: [PATCH 09/74] OP-2042 - updates to db dumps and loads --- tests/lib/db_handler.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/lib/db_handler.py b/tests/lib/db_handler.py index 9be70895da..4dde5ba46e 100644 --- a/tests/lib/db_handler.py +++ b/tests/lib/db_handler.py @@ -136,7 +136,8 @@ class DBHandler: print("Dropping {} database".format(db_name)) self.client.drop_database(db_name) - def backup_to_dump(self, db_name, dump_dir, overwrite=False): + def backup_to_dump(self, db_name, dump_dir, overwrite=False, + collection=None): """ Helper method for running mongodump for specific 'db_name' """ @@ -148,7 +149,8 @@ class DBHandler: raise RuntimeError("Backup already exists, " "run with overwrite=True") - query = self._dump_query(self.uri, dump_dir, db_name=db_name) + query = self._dump_query(self.uri, dump_dir, + db_name=db_name, collection=collection) print("Mongodump query:: {}".format(query)) subprocess.run(query) @@ -187,7 +189,8 @@ class DBHandler: drop_part = "--drop" if db_name_out: - db_part += " --nsTo={}.*".format(db_name_out) + collection_str = collection or '*' + db_part += " --nsTo={}.{}".format(db_name_out, collection_str) query = "\"{}\" --uri=\"{}\" --dir=\"{}\" {} {} {}".format( "mongorestore", uri, dump_dir, db_part, coll_part, drop_part @@ -217,12 +220,12 @@ class DBHandler: return query -# handler = DBHandler(uri="mongodb://localhost:27017") +#handler = DBHandler(uri="mongodb://localhost:27017") # -# backup_dir = "c:\\projects\\dumps" +#backup_dir = "c:\\projects\\test_nuke_publish\\input\\dumps" # # -# handler.backup_to_dump("openpype", backup_dir, True) -# # handler.setup_from_dump("test_db", backup_dir, True) +#handler.backup_to_dump("avalon", backup_dir, True, collection="test_project") +#handler.setup_from_dump("test_db", backup_dir, True, db_name_out="avalon", collection="test_project") # # handler.setup_from_sql_file("test_db", "c:\\projects\\sql\\item.sql", # # collection="test_project", # # drop=False, mode="upsert") From 3fa0b39df196524ad4dd8b013e90ebe02a59e1b6 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 30 Nov 2021 14:40:01 +0100 Subject: [PATCH 10/74] OP-2042 - wip testing in Nuke --- .../hosts/nuke/test_publish_in_nuke.py | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 tests/integration/hosts/nuke/test_publish_in_nuke.py diff --git a/tests/integration/hosts/nuke/test_publish_in_nuke.py b/tests/integration/hosts/nuke/test_publish_in_nuke.py new file mode 100644 index 0000000000..3f3f191ac7 --- /dev/null +++ b/tests/integration/hosts/nuke/test_publish_in_nuke.py @@ -0,0 +1,94 @@ +import pytest +import os +import shutil + +from tests.lib.testing_classes import PublishTest + + +class TestPublishInNuke(PublishTest): + """Basic test case for publishing in Nuke + + Uses generic TestCase to prepare fixtures for test data, testing DBs, + env vars. + + Opens Maya, run publish on prepared workile. + + Then checks content of DB (if subset, version, representations were + created. + Checks tmp folder if all expected files were published. + + """ + PERSIST = True + + TEST_FILES = [ + ("1Bciy2pCwMKl1UIpxuPnlX_LHMo_Xkq0K", "test_Nuke_publish.zip", "") + ] + + APP = "Nuke" + APP_VARIANT = "12" + + APP_NAME = "{}/{}".format(APP, APP_VARIANT) + + TIMEOUT = 120 # publish timeout + + @pytest.fixture(scope="module") + def last_workfile_path(self, download_test_data): + """Get last_workfile_path from source data. + + Maya expects workfile in proper folder, so copy is done first. + """ + src_path = os.path.join(download_test_data, + "input", + "workfile", + "test_project_test_asset_TestTask_v001.psd") + dest_folder = os.path.join(download_test_data, + self.PROJECT, + self.ASSET, + "work", + self.TASK) + os.makedirs(dest_folder) + dest_path = os.path.join(dest_folder, + "test_project_test_asset_TestTask_v001.psd") + shutil.copy(src_path, dest_path) + + yield dest_path + + @pytest.fixture(scope="module") + def startup_scripts(self, monkeypatch_session, download_test_data): + """Points Maya to userSetup file from input data""" + pass + + def test_db_asserts(self, dbcon, publish_finished): + """Host and input data dependent expected results in DB.""" + print("test_db_asserts") + assert 5 == dbcon.count_documents({"type": "version"}), \ + "Not expected no of versions" + + assert 0 == dbcon.count_documents({"type": "version", + "name": {"$ne": 1}}), \ + "Only versions with 1 expected" + + assert 1 == dbcon.count_documents({"type": "subset", + "name": "modelMain"}), \ + "modelMain subset must be present" + + assert 1 == dbcon.count_documents({"type": "subset", + "name": "workfileTest_task"}), \ + "workfileTest_task subset must be present" + + assert 11 == dbcon.count_documents({"type": "representation"}), \ + "Not expected no of representations" + + assert 2 == dbcon.count_documents({"type": "representation", + "context.subset": "modelMain", + "context.ext": "abc"}), \ + "Not expected no of representations with ext 'abc'" + + assert 2 == dbcon.count_documents({"type": "representation", + "context.subset": "modelMain", + "context.ext": "ma"}), \ + "Not expected no of representations with ext 'abc'" + + +if __name__ == "__main__": + test_case = TestPublishInNuke() From 64c4e5f2bbae767e6f2e126c884853a1fab39eaf Mon Sep 17 00:00:00 2001 From: "clement.hector" Date: Wed, 1 Dec 2021 16:42:18 +0100 Subject: [PATCH 11/74] Add static and allView option in imagePlaneLoader --- .../maya/plugins/load/load_image_plane.py | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_image_plane.py b/openpype/hosts/maya/plugins/load/load_image_plane.py index f2640dc2eb..f7a5a7ea18 100644 --- a/openpype/hosts/maya/plugins/load/load_image_plane.py +++ b/openpype/hosts/maya/plugins/load/load_image_plane.py @@ -13,10 +13,14 @@ class CameraWindow(QtWidgets.QDialog): self.setWindowFlags(self.windowFlags() | QtCore.Qt.FramelessWindowHint) self.camera = None + self.static_image_plane = False + self.show_in_all_views = False self.widgets = { "label": QtWidgets.QLabel("Select camera for image plane."), "list": QtWidgets.QListWidget(), + "staticImagePlane": QtWidgets.QCheckBox(), + "showInAllViews": QtWidgets.QCheckBox(), "warning": QtWidgets.QLabel("No cameras selected!"), "buttons": QtWidgets.QWidget(), "okButton": QtWidgets.QPushButton("Ok"), @@ -31,6 +35,9 @@ class CameraWindow(QtWidgets.QDialog): for camera in cameras: self.widgets["list"].addItem(camera) + self.widgets["staticImagePlane"].setText("Make Image Plane Static") + self.widgets["showInAllViews"].setText("Show Image Plane in All Views") + # Build buttons. layout = QtWidgets.QHBoxLayout(self.widgets["buttons"]) layout.addWidget(self.widgets["okButton"]) @@ -40,6 +47,8 @@ class CameraWindow(QtWidgets.QDialog): layout = QtWidgets.QVBoxLayout(self) layout.addWidget(self.widgets["label"]) layout.addWidget(self.widgets["list"]) + layout.addWidget(self.widgets["staticImagePlane"]) + layout.addWidget(self.widgets["showInAllViews"]) layout.addWidget(self.widgets["buttons"]) layout.addWidget(self.widgets["warning"]) @@ -54,6 +63,8 @@ class CameraWindow(QtWidgets.QDialog): if self.camera is None: self.widgets["warning"].setVisible(True) return + self.show_in_all_views = self.widgets["showInAllViews"].isChecked() + self.static_image_plane = self.widgets["staticImagePlane"].isChecked() self.close() @@ -65,15 +76,15 @@ class CameraWindow(QtWidgets.QDialog): class ImagePlaneLoader(api.Loader): """Specific loader of plate for image planes on selected camera.""" - families = ["plate", "render"] + families = ["image", "plate", "render"] label = "Load imagePlane." representations = ["mov", "exr", "preview", "png"] icon = "image" color = "orange" - def load(self, context, name, namespace, data): + def load(self, context, name, namespace, data, option=None): import pymel.core as pm - + new_nodes = [] image_plane_depth = 1000 asset = context['asset']['name'] @@ -85,18 +96,16 @@ class ImagePlaneLoader(api.Loader): # Get camera from user selection. camera = None - default_cameras = [ - "frontShape", "perspShape", "sideShape", "topShape" - ] - cameras = [ - x for x in pm.ls(type="camera") if x.name() not in default_cameras - ] + cameras = pm.ls(type="camera") camera_names = {x.getParent().name(): x for x in cameras} camera_names["Create new camera."] = "create_camera" window = CameraWindow(camera_names.keys()) window.exec_() camera = camera_names[window.camera] + is_static_image_plane = window.static_image_plane + is_in_all_views = window.show_in_all_views + if camera == "create_camera": camera = pm.createNode("camera") @@ -111,7 +120,7 @@ class ImagePlaneLoader(api.Loader): # Create image plane image_plane_transform, image_plane_shape = pm.imagePlane( - camera=camera, showInAllViews=False + camera=camera, showInAllViews=is_in_all_views ) image_plane_shape.depth.set(image_plane_depth) @@ -119,6 +128,9 @@ class ImagePlaneLoader(api.Loader): context["representation"]["data"]["path"] ) + if is_static_image_plane: + image_plane_shape.detach() + start_frame = pm.playbackOptions(q=True, min=True) end_frame = pm.playbackOptions(q=True, max=True) From d48fdaeceb3af83131b009c748145a6678367f60 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 1 Dec 2021 18:29:56 +0100 Subject: [PATCH 12/74] Fix - missing extension for new workfile --- openpype/hooks/pre_foundry_apps.py | 2 +- repos/avalon-core | 2 +- .../hosts/nuke/test_publish_in_nuke.py | 41 ++++++++++++++----- tests/lib/db_handler.py | 8 ++-- 4 files changed, 36 insertions(+), 17 deletions(-) diff --git a/openpype/hooks/pre_foundry_apps.py b/openpype/hooks/pre_foundry_apps.py index 85f68c6b60..70554cbedb 100644 --- a/openpype/hooks/pre_foundry_apps.py +++ b/openpype/hooks/pre_foundry_apps.py @@ -13,7 +13,7 @@ class LaunchFoundryAppsWindows(PreLaunchHook): # Should be as last hook because must change launch arguments to string order = 1000 - app_groups = ["nuke", "nukex", "hiero", "nukestudio"] + app_groups = ["nuke", "nukex", "hiero", "nukestudio", "aftereffects"] platforms = ["windows"] def execute(self): diff --git a/repos/avalon-core b/repos/avalon-core index 7e5efd6885..e37f4f92ed 160000 --- a/repos/avalon-core +++ b/repos/avalon-core @@ -1 +1 @@ -Subproject commit 7e5efd6885330d84bb8495975bcab84df49bfa3d +Subproject commit e37f4f92ed25f89c870fdcb7f9538da7d0d7de90 diff --git a/tests/integration/hosts/nuke/test_publish_in_nuke.py b/tests/integration/hosts/nuke/test_publish_in_nuke.py index 3f3f191ac7..abadb0fb92 100644 --- a/tests/integration/hosts/nuke/test_publish_in_nuke.py +++ b/tests/integration/hosts/nuke/test_publish_in_nuke.py @@ -1,9 +1,12 @@ import pytest import os import shutil +import logging from tests.lib.testing_classes import PublishTest +log = logging.getLogger("test_publish_in_nuke") + class TestPublishInNuke(PublishTest): """Basic test case for publishing in Nuke @@ -21,11 +24,11 @@ class TestPublishInNuke(PublishTest): PERSIST = True TEST_FILES = [ - ("1Bciy2pCwMKl1UIpxuPnlX_LHMo_Xkq0K", "test_Nuke_publish.zip", "") + ("1635L4gww9nEkP-1EclfWXNdeDuRjDhey", "test_Nuke_publish.zip", "") ] - APP = "Nuke" - APP_VARIANT = "12" + APP = "nuke" + APP_VARIANT = "12-2" APP_NAME = "{}/{}".format(APP, APP_VARIANT) @@ -37,26 +40,42 @@ class TestPublishInNuke(PublishTest): Maya expects workfile in proper folder, so copy is done first. """ - src_path = os.path.join(download_test_data, - "input", - "workfile", - "test_project_test_asset_TestTask_v001.psd") + print("last_workfile_path") + log.info("log last_workfile_path") + src_path = os.path.join( + download_test_data, + "input", + "workfile", + "test_project_test_asset_CompositingInNuke_v001.nk") dest_folder = os.path.join(download_test_data, self.PROJECT, self.ASSET, "work", self.TASK) os.makedirs(dest_folder) - dest_path = os.path.join(dest_folder, - "test_project_test_asset_TestTask_v001.psd") + dest_path = os.path.join( + dest_folder, "test_project_test_asset_CompositingInNuke_v001.nk") shutil.copy(src_path, dest_path) yield dest_path @pytest.fixture(scope="module") def startup_scripts(self, monkeypatch_session, download_test_data): - """Points Maya to userSetup file from input data""" - pass + """Points Nuke to userSetup file from input data""" + print("startup_scripts") + log.info("log startup_scripts") + startup_path = os.path.join(download_test_data, + "input", + "startup") + startup_path = "C:\\projects\\test_nuke_publish\\input\\startup" + original_pythonpath = os.environ.get("NUKE_PATH") + monkeypatch_session.setenv("NUKE_PATH", + "{}{}{}".format(original_pythonpath, + os.pathsep, + startup_path)) + print("NUKE_PATH:: {}{}{}".format(startup_path, + os.pathsep, + original_pythonpath)) def test_db_asserts(self, dbcon, publish_finished): """Host and input data dependent expected results in DB.""" diff --git a/tests/lib/db_handler.py b/tests/lib/db_handler.py index 4dde5ba46e..88cde4d05f 100644 --- a/tests/lib/db_handler.py +++ b/tests/lib/db_handler.py @@ -165,7 +165,7 @@ class DBHandler: if collection: if not db_name: raise ValueError("db_name must be present") - coll_part = "--nsInclude={}.{}".format(db_name, collection) + coll_part = "--collection={}".format(collection) query = "\"{}\" --uri=\"{}\" --out={} {} {}".format( "mongodump", uri, output_path, db_part, coll_part ) @@ -220,11 +220,11 @@ class DBHandler: return query -#handler = DBHandler(uri="mongodb://localhost:27017") +handler = DBHandler(uri="mongodb://localhost:27017") # -#backup_dir = "c:\\projects\\test_nuke_publish\\input\\dumps" +backup_dir = "c:\\projects\\test_nuke_publish\\input\\dumps" # # -#handler.backup_to_dump("avalon", backup_dir, True, collection="test_project") +handler.backup_to_dump("avalon", backup_dir, True, collection="test_project") #handler.setup_from_dump("test_db", backup_dir, True, db_name_out="avalon", collection="test_project") # # handler.setup_from_sql_file("test_db", "c:\\projects\\sql\\item.sql", # # collection="test_project", From 3d6bf6e8c5eb5e8774a231fa6ff77e1422cf26af Mon Sep 17 00:00:00 2001 From: "clement.hector" Date: Wed, 1 Dec 2021 18:56:38 +0100 Subject: [PATCH 13/74] change option by options --- openpype/hosts/maya/plugins/load/load_image_plane.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/load/load_image_plane.py b/openpype/hosts/maya/plugins/load/load_image_plane.py index f7a5a7ea18..d7e61b9c64 100644 --- a/openpype/hosts/maya/plugins/load/load_image_plane.py +++ b/openpype/hosts/maya/plugins/load/load_image_plane.py @@ -82,7 +82,7 @@ class ImagePlaneLoader(api.Loader): icon = "image" color = "orange" - def load(self, context, name, namespace, data, option=None): + def load(self, context, name, namespace, data, options=None): import pymel.core as pm new_nodes = [] From 3c7b622b6e3bf56deb28b12138f980b73a4ef6d6 Mon Sep 17 00:00:00 2001 From: "clement.hector" Date: Thu, 2 Dec 2021 11:53:32 +0100 Subject: [PATCH 14/74] fix rotation after detach --- .../maya/plugins/load/load_image_plane.py | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_image_plane.py b/openpype/hosts/maya/plugins/load/load_image_plane.py index d7e61b9c64..ecfa8d7bc0 100644 --- a/openpype/hosts/maya/plugins/load/load_image_plane.py +++ b/openpype/hosts/maya/plugins/load/load_image_plane.py @@ -96,15 +96,23 @@ class ImagePlaneLoader(api.Loader): # Get camera from user selection. camera = None - cameras = pm.ls(type="camera") - camera_names = {x.getParent().name(): x for x in cameras} - camera_names["Create new camera."] = "create_camera" - window = CameraWindow(camera_names.keys()) - window.exec_() - camera = camera_names[window.camera] + is_static_image_plane = None + is_in_all_views = None + if data: + camera = pm.PyNode(data.get("camera")) + is_static_image_plane = data.get("static_image_plane") + is_in_all_views = data.get("in_all_views") - is_static_image_plane = window.static_image_plane - is_in_all_views = window.show_in_all_views + if not camera: + cameras = pm.ls(type="camera") + camera_names = {x.getParent().name(): x for x in cameras} + camera_names["Create new camera."] = "create_camera" + window = CameraWindow(camera_names.keys()) + window.exec_() + camera = camera_names[window.camera] + + is_static_image_plane = window.static_image_plane + is_in_all_views = window.show_in_all_views if camera == "create_camera": camera = pm.createNode("camera") @@ -129,7 +137,9 @@ class ImagePlaneLoader(api.Loader): ) if is_static_image_plane: + image_plane_shape.setMaintainRatio(True) image_plane_shape.detach() + image_plane_transform.setRotation(camera.getRotation()) start_frame = pm.playbackOptions(q=True, min=True) end_frame = pm.playbackOptions(q=True, max=True) From 931896519c05a423f4630001372bdb72d47da847 Mon Sep 17 00:00:00 2001 From: "clement.hector" Date: Thu, 2 Dec 2021 12:34:34 +0100 Subject: [PATCH 15/74] add fileName in imagePlane cmd --- openpype/hosts/maya/plugins/load/load_image_plane.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_image_plane.py b/openpype/hosts/maya/plugins/load/load_image_plane.py index ecfa8d7bc0..eea5844e8b 100644 --- a/openpype/hosts/maya/plugins/load/load_image_plane.py +++ b/openpype/hosts/maya/plugins/load/load_image_plane.py @@ -128,16 +128,12 @@ class ImagePlaneLoader(api.Loader): # Create image plane image_plane_transform, image_plane_shape = pm.imagePlane( + fileName=context["representation"]["data"]["path"], camera=camera, showInAllViews=is_in_all_views ) image_plane_shape.depth.set(image_plane_depth) - image_plane_shape.imageName.set( - context["representation"]["data"]["path"] - ) - if is_static_image_plane: - image_plane_shape.setMaintainRatio(True) image_plane_shape.detach() image_plane_transform.setRotation(camera.getRotation()) From d27b11774888d1af6dac39c25384bca25c900413 Mon Sep 17 00:00:00 2001 From: "clement.hector" Date: Thu, 2 Dec 2021 13:52:59 +0100 Subject: [PATCH 16/74] remove context key task from doc --- website/docs/admin_settings_project_anatomy.md | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docs/admin_settings_project_anatomy.md b/website/docs/admin_settings_project_anatomy.md index a8be77d25b..1f742c31ed 100644 --- a/website/docs/admin_settings_project_anatomy.md +++ b/website/docs/admin_settings_project_anatomy.md @@ -61,7 +61,6 @@ We have a few required anatomy templates for OpenPype to work properly, however | `task[type]` | Type of task | | `task[short]` | Shortname of task | | `parent` | Name of hierarchical parent | -| `task` | Name of task | | `version` | Version number | | `subset` | Subset name | | `family` | Main family name | From 991328c516a16c206bf5abacc58738a95aba9b11 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 2 Dec 2021 16:29:26 +0100 Subject: [PATCH 17/74] moved clockify module --- openpype/modules/base.py | 1 + openpype/modules/{default_modules => }/clockify/__init__.py | 0 openpype/modules/{default_modules => }/clockify/clockify_api.py | 0 .../modules/{default_modules => }/clockify/clockify_module.py | 0 openpype/modules/{default_modules => }/clockify/constants.py | 0 .../clockify/ftrack/server/action_clockify_sync_server.py | 0 .../clockify/ftrack/user/action_clockify_sync_local.py | 0 .../clockify/launcher_actions/ClockifyStart.py | 0 .../clockify/launcher_actions/ClockifySync.py | 0 openpype/modules/{default_modules => }/clockify/widgets.py | 0 10 files changed, 1 insertion(+) rename openpype/modules/{default_modules => }/clockify/__init__.py (100%) rename openpype/modules/{default_modules => }/clockify/clockify_api.py (100%) rename openpype/modules/{default_modules => }/clockify/clockify_module.py (100%) rename openpype/modules/{default_modules => }/clockify/constants.py (100%) rename openpype/modules/{default_modules => }/clockify/ftrack/server/action_clockify_sync_server.py (100%) rename openpype/modules/{default_modules => }/clockify/ftrack/user/action_clockify_sync_local.py (100%) rename openpype/modules/{default_modules => }/clockify/launcher_actions/ClockifyStart.py (100%) rename openpype/modules/{default_modules => }/clockify/launcher_actions/ClockifySync.py (100%) rename openpype/modules/{default_modules => }/clockify/widgets.py (100%) diff --git a/openpype/modules/base.py b/openpype/modules/base.py index 7ecfeae7bd..fdca9e90be 100644 --- a/openpype/modules/base.py +++ b/openpype/modules/base.py @@ -273,6 +273,7 @@ def _load_modules(): # Import default modules imported from 'openpype.modules' for default_module_name in ( + "clockify", "settings_action", "launcher_action", "project_manager_action", diff --git a/openpype/modules/default_modules/clockify/__init__.py b/openpype/modules/clockify/__init__.py similarity index 100% rename from openpype/modules/default_modules/clockify/__init__.py rename to openpype/modules/clockify/__init__.py diff --git a/openpype/modules/default_modules/clockify/clockify_api.py b/openpype/modules/clockify/clockify_api.py similarity index 100% rename from openpype/modules/default_modules/clockify/clockify_api.py rename to openpype/modules/clockify/clockify_api.py diff --git a/openpype/modules/default_modules/clockify/clockify_module.py b/openpype/modules/clockify/clockify_module.py similarity index 100% rename from openpype/modules/default_modules/clockify/clockify_module.py rename to openpype/modules/clockify/clockify_module.py diff --git a/openpype/modules/default_modules/clockify/constants.py b/openpype/modules/clockify/constants.py similarity index 100% rename from openpype/modules/default_modules/clockify/constants.py rename to openpype/modules/clockify/constants.py diff --git a/openpype/modules/default_modules/clockify/ftrack/server/action_clockify_sync_server.py b/openpype/modules/clockify/ftrack/server/action_clockify_sync_server.py similarity index 100% rename from openpype/modules/default_modules/clockify/ftrack/server/action_clockify_sync_server.py rename to openpype/modules/clockify/ftrack/server/action_clockify_sync_server.py diff --git a/openpype/modules/default_modules/clockify/ftrack/user/action_clockify_sync_local.py b/openpype/modules/clockify/ftrack/user/action_clockify_sync_local.py similarity index 100% rename from openpype/modules/default_modules/clockify/ftrack/user/action_clockify_sync_local.py rename to openpype/modules/clockify/ftrack/user/action_clockify_sync_local.py diff --git a/openpype/modules/default_modules/clockify/launcher_actions/ClockifyStart.py b/openpype/modules/clockify/launcher_actions/ClockifyStart.py similarity index 100% rename from openpype/modules/default_modules/clockify/launcher_actions/ClockifyStart.py rename to openpype/modules/clockify/launcher_actions/ClockifyStart.py diff --git a/openpype/modules/default_modules/clockify/launcher_actions/ClockifySync.py b/openpype/modules/clockify/launcher_actions/ClockifySync.py similarity index 100% rename from openpype/modules/default_modules/clockify/launcher_actions/ClockifySync.py rename to openpype/modules/clockify/launcher_actions/ClockifySync.py diff --git a/openpype/modules/default_modules/clockify/widgets.py b/openpype/modules/clockify/widgets.py similarity index 100% rename from openpype/modules/default_modules/clockify/widgets.py rename to openpype/modules/clockify/widgets.py From 568726d30f25805190e26cdbb874180ac5117601 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 2 Dec 2021 16:29:53 +0100 Subject: [PATCH 18/74] moved log viewer module --- openpype/modules/base.py | 1 + openpype/modules/{default_modules => }/log_viewer/__init__.py | 0 .../modules/{default_modules => }/log_viewer/log_view_module.py | 0 .../modules/{default_modules => }/log_viewer/tray/__init__.py | 0 openpype/modules/{default_modules => }/log_viewer/tray/app.py | 0 openpype/modules/{default_modules => }/log_viewer/tray/models.py | 0 .../modules/{default_modules => }/log_viewer/tray/widgets.py | 0 7 files changed, 1 insertion(+) rename openpype/modules/{default_modules => }/log_viewer/__init__.py (100%) rename openpype/modules/{default_modules => }/log_viewer/log_view_module.py (100%) rename openpype/modules/{default_modules => }/log_viewer/tray/__init__.py (100%) rename openpype/modules/{default_modules => }/log_viewer/tray/app.py (100%) rename openpype/modules/{default_modules => }/log_viewer/tray/models.py (100%) rename openpype/modules/{default_modules => }/log_viewer/tray/widgets.py (100%) diff --git a/openpype/modules/base.py b/openpype/modules/base.py index fdca9e90be..1dc9ccc718 100644 --- a/openpype/modules/base.py +++ b/openpype/modules/base.py @@ -273,6 +273,7 @@ def _load_modules(): # Import default modules imported from 'openpype.modules' for default_module_name in ( + "log_viewer", "clockify", "settings_action", "launcher_action", diff --git a/openpype/modules/default_modules/log_viewer/__init__.py b/openpype/modules/log_viewer/__init__.py similarity index 100% rename from openpype/modules/default_modules/log_viewer/__init__.py rename to openpype/modules/log_viewer/__init__.py diff --git a/openpype/modules/default_modules/log_viewer/log_view_module.py b/openpype/modules/log_viewer/log_view_module.py similarity index 100% rename from openpype/modules/default_modules/log_viewer/log_view_module.py rename to openpype/modules/log_viewer/log_view_module.py diff --git a/openpype/modules/default_modules/log_viewer/tray/__init__.py b/openpype/modules/log_viewer/tray/__init__.py similarity index 100% rename from openpype/modules/default_modules/log_viewer/tray/__init__.py rename to openpype/modules/log_viewer/tray/__init__.py diff --git a/openpype/modules/default_modules/log_viewer/tray/app.py b/openpype/modules/log_viewer/tray/app.py similarity index 100% rename from openpype/modules/default_modules/log_viewer/tray/app.py rename to openpype/modules/log_viewer/tray/app.py diff --git a/openpype/modules/default_modules/log_viewer/tray/models.py b/openpype/modules/log_viewer/tray/models.py similarity index 100% rename from openpype/modules/default_modules/log_viewer/tray/models.py rename to openpype/modules/log_viewer/tray/models.py diff --git a/openpype/modules/default_modules/log_viewer/tray/widgets.py b/openpype/modules/log_viewer/tray/widgets.py similarity index 100% rename from openpype/modules/default_modules/log_viewer/tray/widgets.py rename to openpype/modules/log_viewer/tray/widgets.py From 38bfece22befe69a5320f70ba3d01a1804630666 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 2 Dec 2021 16:30:21 +0100 Subject: [PATCH 19/74] moved muster module --- openpype/modules/base.py | 1 + openpype/modules/{default_modules => }/muster/__init__.py | 0 openpype/modules/{default_modules => }/muster/muster.py | 0 openpype/modules/{default_modules => }/muster/rest_api.py | 0 openpype/modules/{default_modules => }/muster/widget_login.py | 0 5 files changed, 1 insertion(+) rename openpype/modules/{default_modules => }/muster/__init__.py (100%) rename openpype/modules/{default_modules => }/muster/muster.py (100%) rename openpype/modules/{default_modules => }/muster/rest_api.py (100%) rename openpype/modules/{default_modules => }/muster/widget_login.py (100%) diff --git a/openpype/modules/base.py b/openpype/modules/base.py index 1dc9ccc718..2fa1967690 100644 --- a/openpype/modules/base.py +++ b/openpype/modules/base.py @@ -274,6 +274,7 @@ def _load_modules(): # Import default modules imported from 'openpype.modules' for default_module_name in ( "log_viewer", + "muster", "clockify", "settings_action", "launcher_action", diff --git a/openpype/modules/default_modules/muster/__init__.py b/openpype/modules/muster/__init__.py similarity index 100% rename from openpype/modules/default_modules/muster/__init__.py rename to openpype/modules/muster/__init__.py diff --git a/openpype/modules/default_modules/muster/muster.py b/openpype/modules/muster/muster.py similarity index 100% rename from openpype/modules/default_modules/muster/muster.py rename to openpype/modules/muster/muster.py diff --git a/openpype/modules/default_modules/muster/rest_api.py b/openpype/modules/muster/rest_api.py similarity index 100% rename from openpype/modules/default_modules/muster/rest_api.py rename to openpype/modules/muster/rest_api.py diff --git a/openpype/modules/default_modules/muster/widget_login.py b/openpype/modules/muster/widget_login.py similarity index 100% rename from openpype/modules/default_modules/muster/widget_login.py rename to openpype/modules/muster/widget_login.py From db31a6aea9f28d04c196979f1eaf6f9dc230543c Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 2 Dec 2021 16:30:46 +0100 Subject: [PATCH 20/74] moved python console interpreted module --- openpype/modules/base.py | 1 + .../{default_modules => }/python_console_interpreter/__init__.py | 0 .../{default_modules => }/python_console_interpreter/module.py | 0 .../python_console_interpreter/window/__init__.py | 0 .../python_console_interpreter/window/widgets.py | 0 5 files changed, 1 insertion(+) rename openpype/modules/{default_modules => }/python_console_interpreter/__init__.py (100%) rename openpype/modules/{default_modules => }/python_console_interpreter/module.py (100%) rename openpype/modules/{default_modules => }/python_console_interpreter/window/__init__.py (100%) rename openpype/modules/{default_modules => }/python_console_interpreter/window/widgets.py (100%) diff --git a/openpype/modules/base.py b/openpype/modules/base.py index 2fa1967690..e03fa6c45b 100644 --- a/openpype/modules/base.py +++ b/openpype/modules/base.py @@ -273,6 +273,7 @@ def _load_modules(): # Import default modules imported from 'openpype.modules' for default_module_name in ( + "python_console_interpreter", "log_viewer", "muster", "clockify", diff --git a/openpype/modules/default_modules/python_console_interpreter/__init__.py b/openpype/modules/python_console_interpreter/__init__.py similarity index 100% rename from openpype/modules/default_modules/python_console_interpreter/__init__.py rename to openpype/modules/python_console_interpreter/__init__.py diff --git a/openpype/modules/default_modules/python_console_interpreter/module.py b/openpype/modules/python_console_interpreter/module.py similarity index 100% rename from openpype/modules/default_modules/python_console_interpreter/module.py rename to openpype/modules/python_console_interpreter/module.py diff --git a/openpype/modules/default_modules/python_console_interpreter/window/__init__.py b/openpype/modules/python_console_interpreter/window/__init__.py similarity index 100% rename from openpype/modules/default_modules/python_console_interpreter/window/__init__.py rename to openpype/modules/python_console_interpreter/window/__init__.py diff --git a/openpype/modules/default_modules/python_console_interpreter/window/widgets.py b/openpype/modules/python_console_interpreter/window/widgets.py similarity index 100% rename from openpype/modules/default_modules/python_console_interpreter/window/widgets.py rename to openpype/modules/python_console_interpreter/window/widgets.py From 615f9145e140c42940e352bb4b1d9f4ecce35559 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 2 Dec 2021 16:31:22 +0100 Subject: [PATCH 21/74] moved slack module --- openpype/modules/base.py | 1 + .../modules/{default_modules => }/slack/README.md | 0 .../modules/{default_modules => }/slack/__init__.py | 0 .../slack/launch_hooks/pre_python2_vendor.py | 0 .../{default_modules => }/slack/manifest.yml | 0 .../slack/plugins/publish/collect_slack_family.py | 0 .../slack/plugins/publish/integrate_slack_api.py | 0 .../python2_vendor/python-slack-sdk-1/.appveyor.yml | 0 .../python2_vendor/python-slack-sdk-1/.coveragerc | 0 .../slack/python2_vendor/python-slack-sdk-1/.flake8 | 0 .../python-slack-sdk-1/.github/contributing.md | 0 .../python-slack-sdk-1/.github/issue_template.md | 0 .../python-slack-sdk-1/.github/maintainers_guide.md | 0 .../.github/pull_request_template.md | 0 .../python2_vendor/python-slack-sdk-1/.gitignore | 0 .../python2_vendor/python-slack-sdk-1/.travis.yml | 0 .../slack/python2_vendor/python-slack-sdk-1/LICENSE | 0 .../python2_vendor/python-slack-sdk-1/MANIFEST.in | 0 .../python2_vendor/python-slack-sdk-1/README.rst | 0 .../python-slack-sdk-1/docs-src/.gitignore | 0 .../python-slack-sdk-1/docs-src/Makefile | 0 .../docs-src/_themes/slack/conf.py | 0 .../docs-src/_themes/slack/layout.html | 0 .../docs-src/_themes/slack/localtoc.html | 0 .../docs-src/_themes/slack/relations.html | 0 .../docs-src/_themes/slack/sidebar.html | 0 .../docs-src/_themes/slack/static/default.css_t | 0 .../docs-src/_themes/slack/static/docs.css_t | 0 .../docs-src/_themes/slack/static/pygments.css_t | 0 .../docs-src/_themes/slack/theme.conf | 0 .../python-slack-sdk-1/docs-src/about.rst | 0 .../python-slack-sdk-1/docs-src/auth.rst | 0 .../python-slack-sdk-1/docs-src/basic_usage.rst | 0 .../python-slack-sdk-1/docs-src/changelog.rst | 0 .../python-slack-sdk-1/docs-src/conf.py | 0 .../python-slack-sdk-1/docs-src/conversations.rst | 0 .../python-slack-sdk-1/docs-src/faq.rst | 0 .../python-slack-sdk-1/docs-src/index.rst | 0 .../python-slack-sdk-1/docs-src/make.bat | 0 .../python-slack-sdk-1/docs-src/metadata.rst | 0 .../docs-src/real_time_messaging.rst | 0 .../slack/python2_vendor/python-slack-sdk-1/docs.sh | 0 .../python-slack-sdk-1/docs/.buildinfo | 0 .../python-slack-sdk-1/docs/.nojekyll | 0 .../python-slack-sdk-1/docs/_static/ajax-loader.gif | Bin .../python-slack-sdk-1/docs/_static/basic.css | 0 .../python-slack-sdk-1/docs/_static/classic.css | 0 .../docs/_static/comment-bright.png | Bin .../docs/_static/comment-close.png | Bin .../python-slack-sdk-1/docs/_static/comment.png | Bin .../python-slack-sdk-1/docs/_static/default.css | 0 .../python-slack-sdk-1/docs/_static/docs.css | 0 .../python-slack-sdk-1/docs/_static/doctools.js | 0 .../docs/_static/documentation_options.js | 0 .../docs/_static/down-pressed.png | Bin .../python-slack-sdk-1/docs/_static/down.png | Bin .../python-slack-sdk-1/docs/_static/file.png | Bin .../python-slack-sdk-1/docs/_static/jquery-3.2.1.js | 0 .../python-slack-sdk-1/docs/_static/jquery.js | 0 .../docs/_static/language_data.js | 0 .../python-slack-sdk-1/docs/_static/minus.png | Bin .../python-slack-sdk-1/docs/_static/plus.png | Bin .../python-slack-sdk-1/docs/_static/pygments.css | 0 .../python-slack-sdk-1/docs/_static/searchtools.js | 0 .../python-slack-sdk-1/docs/_static/sidebar.js | 0 .../docs/_static/underscore-1.3.1.js | 0 .../python-slack-sdk-1/docs/_static/underscore.js | 0 .../python-slack-sdk-1/docs/_static/up-pressed.png | Bin .../python-slack-sdk-1/docs/_static/up.png | Bin .../python-slack-sdk-1/docs/_static/websupport.js | 0 .../python-slack-sdk-1/docs/about.html | 0 .../python-slack-sdk-1/docs/auth.html | 0 .../python-slack-sdk-1/docs/basic_usage.html | 0 .../python-slack-sdk-1/docs/changelog.html | 0 .../python-slack-sdk-1/docs/conversations.html | 0 .../python2_vendor/python-slack-sdk-1/docs/faq.html | 0 .../python-slack-sdk-1/docs/genindex.html | 0 .../python-slack-sdk-1/docs/index.html | 0 .../python-slack-sdk-1/docs/metadata.html | 0 .../python-slack-sdk-1/docs/objects.inv | 0 .../docs/real_time_messaging.html | 0 .../python-slack-sdk-1/docs/search.html | 0 .../python-slack-sdk-1/docs/searchindex.js | 0 .../python-slack-sdk-1/requirements.txt | 0 .../python2_vendor/python-slack-sdk-1/setup.cfg | 0 .../python2_vendor/python-slack-sdk-1/setup.py | 0 .../python-slack-sdk-1/slackclient/__init__.py | 0 .../python-slack-sdk-1/slackclient/channel.py | 0 .../python-slack-sdk-1/slackclient/client.py | 0 .../python-slack-sdk-1/slackclient/exceptions.py | 0 .../python-slack-sdk-1/slackclient/im.py | 0 .../python-slack-sdk-1/slackclient/server.py | 0 .../python-slack-sdk-1/slackclient/slackrequest.py | 0 .../python-slack-sdk-1/slackclient/user.py | 0 .../python-slack-sdk-1/slackclient/util.py | 0 .../python-slack-sdk-1/slackclient/version.py | 0 .../python-slack-sdk-1/test_requirements.txt | 0 .../python-slack-sdk-1/tests/conftest.py | 0 .../tests/data/channel.created.json | 0 .../python-slack-sdk-1/tests/data/im.created.json | 0 .../python-slack-sdk-1/tests/data/rtm.start.json | 0 .../python-slack-sdk-1/tests/data/slack_logo.png | Bin .../python-slack-sdk-1/tests/test_channel.py | 0 .../python-slack-sdk-1/tests/test_server.py | 0 .../python-slack-sdk-1/tests/test_slackclient.py | 0 .../python-slack-sdk-1/tests/test_slackrequest.py | 0 .../slack/python2_vendor/python-slack-sdk-1/tox.ini | 0 .../{default_modules => }/slack/slack_module.py | 0 108 files changed, 1 insertion(+) rename openpype/modules/{default_modules => }/slack/README.md (100%) rename openpype/modules/{default_modules => }/slack/__init__.py (100%) rename openpype/modules/{default_modules => }/slack/launch_hooks/pre_python2_vendor.py (100%) rename openpype/modules/{default_modules => }/slack/manifest.yml (100%) rename openpype/modules/{default_modules => }/slack/plugins/publish/collect_slack_family.py (100%) rename openpype/modules/{default_modules => }/slack/plugins/publish/integrate_slack_api.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/.appveyor.yml (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/.coveragerc (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/.flake8 (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/.github/contributing.md (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/.github/issue_template.md (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/.github/maintainers_guide.md (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/.github/pull_request_template.md (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/.gitignore (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/.travis.yml (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/LICENSE (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/MANIFEST.in (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/README.rst (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/.gitignore (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/Makefile (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/conf.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/layout.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/localtoc.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/relations.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/sidebar.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/default.css_t (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/docs.css_t (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/pygments.css_t (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/theme.conf (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/about.rst (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/auth.rst (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/basic_usage.rst (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/changelog.rst (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/conf.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/conversations.rst (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/faq.rst (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/index.rst (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/make.bat (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/metadata.rst (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs-src/real_time_messaging.rst (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs.sh (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/.buildinfo (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/.nojekyll (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/ajax-loader.gif (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/basic.css (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/classic.css (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment-bright.png (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment-close.png (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment.png (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/default.css (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/docs.css (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/doctools.js (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/documentation_options.js (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/down-pressed.png (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/down.png (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/file.png (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/jquery-3.2.1.js (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/jquery.js (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/language_data.js (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/minus.png (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/plus.png (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/pygments.css (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/searchtools.js (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/sidebar.js (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/underscore-1.3.1.js (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/underscore.js (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/up-pressed.png (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/up.png (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/_static/websupport.js (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/about.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/auth.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/basic_usage.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/changelog.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/conversations.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/faq.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/genindex.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/index.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/metadata.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/objects.inv (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/real_time_messaging.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/search.html (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/docs/searchindex.js (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/requirements.txt (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/setup.cfg (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/setup.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/slackclient/__init__.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/slackclient/channel.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/slackclient/client.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/slackclient/exceptions.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/slackclient/im.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/slackclient/server.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/slackclient/slackrequest.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/slackclient/user.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/slackclient/util.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/slackclient/version.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/test_requirements.txt (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/tests/conftest.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/tests/data/channel.created.json (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/tests/data/im.created.json (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/tests/data/rtm.start.json (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/tests/data/slack_logo.png (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/tests/test_channel.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/tests/test_server.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/tests/test_slackclient.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/tests/test_slackrequest.py (100%) rename openpype/modules/{default_modules => }/slack/python2_vendor/python-slack-sdk-1/tox.ini (100%) rename openpype/modules/{default_modules => }/slack/slack_module.py (100%) diff --git a/openpype/modules/base.py b/openpype/modules/base.py index e03fa6c45b..eb40315dfa 100644 --- a/openpype/modules/base.py +++ b/openpype/modules/base.py @@ -274,6 +274,7 @@ def _load_modules(): # Import default modules imported from 'openpype.modules' for default_module_name in ( "python_console_interpreter", + "slack", "log_viewer", "muster", "clockify", diff --git a/openpype/modules/default_modules/slack/README.md b/openpype/modules/slack/README.md similarity index 100% rename from openpype/modules/default_modules/slack/README.md rename to openpype/modules/slack/README.md diff --git a/openpype/modules/default_modules/slack/__init__.py b/openpype/modules/slack/__init__.py similarity index 100% rename from openpype/modules/default_modules/slack/__init__.py rename to openpype/modules/slack/__init__.py diff --git a/openpype/modules/default_modules/slack/launch_hooks/pre_python2_vendor.py b/openpype/modules/slack/launch_hooks/pre_python2_vendor.py similarity index 100% rename from openpype/modules/default_modules/slack/launch_hooks/pre_python2_vendor.py rename to openpype/modules/slack/launch_hooks/pre_python2_vendor.py diff --git a/openpype/modules/default_modules/slack/manifest.yml b/openpype/modules/slack/manifest.yml similarity index 100% rename from openpype/modules/default_modules/slack/manifest.yml rename to openpype/modules/slack/manifest.yml diff --git a/openpype/modules/default_modules/slack/plugins/publish/collect_slack_family.py b/openpype/modules/slack/plugins/publish/collect_slack_family.py similarity index 100% rename from openpype/modules/default_modules/slack/plugins/publish/collect_slack_family.py rename to openpype/modules/slack/plugins/publish/collect_slack_family.py diff --git a/openpype/modules/default_modules/slack/plugins/publish/integrate_slack_api.py b/openpype/modules/slack/plugins/publish/integrate_slack_api.py similarity index 100% rename from openpype/modules/default_modules/slack/plugins/publish/integrate_slack_api.py rename to openpype/modules/slack/plugins/publish/integrate_slack_api.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.appveyor.yml b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/.appveyor.yml similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.appveyor.yml rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/.appveyor.yml diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.coveragerc b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/.coveragerc similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.coveragerc rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/.coveragerc diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.flake8 b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/.flake8 similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.flake8 rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/.flake8 diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.github/contributing.md b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/.github/contributing.md similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.github/contributing.md rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/.github/contributing.md diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.github/issue_template.md b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/.github/issue_template.md similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.github/issue_template.md rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/.github/issue_template.md diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.github/maintainers_guide.md b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/.github/maintainers_guide.md similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.github/maintainers_guide.md rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/.github/maintainers_guide.md diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.github/pull_request_template.md b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/.github/pull_request_template.md similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.github/pull_request_template.md rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/.github/pull_request_template.md diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.gitignore b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/.gitignore similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.gitignore rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/.gitignore diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.travis.yml b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/.travis.yml similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/.travis.yml rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/.travis.yml diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/LICENSE b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/LICENSE similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/LICENSE rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/LICENSE diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/MANIFEST.in b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/MANIFEST.in similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/MANIFEST.in rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/MANIFEST.in diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/README.rst b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/README.rst similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/README.rst rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/README.rst diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/.gitignore b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/.gitignore similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/.gitignore rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/.gitignore diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/Makefile b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/Makefile similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/Makefile rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/Makefile diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/conf.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/conf.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/conf.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/conf.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/layout.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/layout.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/layout.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/layout.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/localtoc.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/localtoc.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/localtoc.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/localtoc.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/relations.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/relations.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/relations.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/relations.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/sidebar.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/sidebar.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/sidebar.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/sidebar.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/default.css_t b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/default.css_t similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/default.css_t rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/default.css_t diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/docs.css_t b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/docs.css_t similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/docs.css_t rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/docs.css_t diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/pygments.css_t b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/pygments.css_t similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/pygments.css_t rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/static/pygments.css_t diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/theme.conf b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/theme.conf similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/theme.conf rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/_themes/slack/theme.conf diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/about.rst b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/about.rst similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/about.rst rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/about.rst diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/auth.rst b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/auth.rst similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/auth.rst rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/auth.rst diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/basic_usage.rst b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/basic_usage.rst similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/basic_usage.rst rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/basic_usage.rst diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/changelog.rst b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/changelog.rst similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/changelog.rst rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/changelog.rst diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/conf.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/conf.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/conf.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/conf.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/conversations.rst b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/conversations.rst similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/conversations.rst rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/conversations.rst diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/faq.rst b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/faq.rst similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/faq.rst rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/faq.rst diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/index.rst b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/index.rst similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/index.rst rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/index.rst diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/make.bat b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/make.bat similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/make.bat rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/make.bat diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/metadata.rst b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/metadata.rst similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/metadata.rst rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/metadata.rst diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/real_time_messaging.rst b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/real_time_messaging.rst similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs-src/real_time_messaging.rst rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs-src/real_time_messaging.rst diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs.sh b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs.sh similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs.sh rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs.sh diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/.buildinfo b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/.buildinfo similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/.buildinfo rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/.buildinfo diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/.nojekyll b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/.nojekyll similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/.nojekyll rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/.nojekyll diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/ajax-loader.gif b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/ajax-loader.gif similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/ajax-loader.gif rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/ajax-loader.gif diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/basic.css b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/basic.css similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/basic.css rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/basic.css diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/classic.css b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/classic.css similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/classic.css rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/classic.css diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment-bright.png b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment-bright.png similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment-bright.png rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment-bright.png diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment-close.png b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment-close.png similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment-close.png rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment-close.png diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment.png b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment.png similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment.png rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/comment.png diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/default.css b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/default.css similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/default.css rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/default.css diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/docs.css b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/docs.css similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/docs.css rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/docs.css diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/doctools.js b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/doctools.js similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/doctools.js rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/doctools.js diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/documentation_options.js b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/documentation_options.js similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/documentation_options.js rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/documentation_options.js diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/down-pressed.png b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/down-pressed.png similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/down-pressed.png rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/down-pressed.png diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/down.png b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/down.png similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/down.png rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/down.png diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/file.png b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/file.png similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/file.png rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/file.png diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/jquery-3.2.1.js b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/jquery-3.2.1.js similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/jquery-3.2.1.js rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/jquery-3.2.1.js diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/jquery.js b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/jquery.js similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/jquery.js rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/jquery.js diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/language_data.js b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/language_data.js similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/language_data.js rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/language_data.js diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/minus.png b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/minus.png similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/minus.png rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/minus.png diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/plus.png b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/plus.png similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/plus.png rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/plus.png diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/pygments.css b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/pygments.css similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/pygments.css rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/pygments.css diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/searchtools.js b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/searchtools.js similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/searchtools.js rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/searchtools.js diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/sidebar.js b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/sidebar.js similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/sidebar.js rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/sidebar.js diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/underscore-1.3.1.js b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/underscore-1.3.1.js similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/underscore-1.3.1.js rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/underscore-1.3.1.js diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/underscore.js b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/underscore.js similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/underscore.js rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/underscore.js diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/up-pressed.png b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/up-pressed.png similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/up-pressed.png rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/up-pressed.png diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/up.png b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/up.png similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/up.png rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/up.png diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/websupport.js b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/websupport.js similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/websupport.js rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/_static/websupport.js diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/about.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/about.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/about.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/about.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/auth.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/auth.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/auth.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/auth.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/basic_usage.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/basic_usage.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/basic_usage.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/basic_usage.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/changelog.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/changelog.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/changelog.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/changelog.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/conversations.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/conversations.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/conversations.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/conversations.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/faq.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/faq.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/faq.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/faq.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/genindex.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/genindex.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/genindex.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/genindex.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/index.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/index.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/index.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/index.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/metadata.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/metadata.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/metadata.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/metadata.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/objects.inv b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/objects.inv similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/objects.inv rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/objects.inv diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/real_time_messaging.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/real_time_messaging.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/real_time_messaging.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/real_time_messaging.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/search.html b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/search.html similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/search.html rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/search.html diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/searchindex.js b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/searchindex.js similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/docs/searchindex.js rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/docs/searchindex.js diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/requirements.txt b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/requirements.txt similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/requirements.txt rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/requirements.txt diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/setup.cfg b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/setup.cfg similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/setup.cfg rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/setup.cfg diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/setup.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/setup.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/setup.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/setup.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/__init__.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/__init__.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/__init__.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/__init__.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/channel.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/channel.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/channel.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/channel.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/client.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/client.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/client.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/client.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/exceptions.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/exceptions.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/exceptions.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/exceptions.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/im.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/im.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/im.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/im.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/server.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/server.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/server.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/server.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/slackrequest.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/slackrequest.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/slackrequest.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/slackrequest.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/user.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/user.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/user.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/user.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/util.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/util.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/util.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/util.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/version.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/version.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/slackclient/version.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/slackclient/version.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/test_requirements.txt b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/test_requirements.txt similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/test_requirements.txt rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/test_requirements.txt diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/conftest.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/conftest.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/conftest.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/conftest.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/data/channel.created.json b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/data/channel.created.json similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/data/channel.created.json rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/data/channel.created.json diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/data/im.created.json b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/data/im.created.json similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/data/im.created.json rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/data/im.created.json diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/data/rtm.start.json b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/data/rtm.start.json similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/data/rtm.start.json rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/data/rtm.start.json diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/data/slack_logo.png b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/data/slack_logo.png similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/data/slack_logo.png rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/data/slack_logo.png diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/test_channel.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/test_channel.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/test_channel.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/test_channel.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/test_server.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/test_server.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/test_server.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/test_server.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/test_slackclient.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/test_slackclient.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/test_slackclient.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/test_slackclient.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/test_slackrequest.py b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/test_slackrequest.py similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tests/test_slackrequest.py rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/tests/test_slackrequest.py diff --git a/openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tox.ini b/openpype/modules/slack/python2_vendor/python-slack-sdk-1/tox.ini similarity index 100% rename from openpype/modules/default_modules/slack/python2_vendor/python-slack-sdk-1/tox.ini rename to openpype/modules/slack/python2_vendor/python-slack-sdk-1/tox.ini diff --git a/openpype/modules/default_modules/slack/slack_module.py b/openpype/modules/slack/slack_module.py similarity index 100% rename from openpype/modules/default_modules/slack/slack_module.py rename to openpype/modules/slack/slack_module.py From 8b79961e286a18bb8dcb893c64470bee99177e3d Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 2 Dec 2021 16:31:34 +0100 Subject: [PATCH 22/74] moved webserver module --- openpype/modules/base.py | 1 + openpype/modules/{default_modules => }/webserver/__init__.py | 0 openpype/modules/{default_modules => }/webserver/base_routes.py | 0 .../{default_modules => }/webserver/host_console_listener.py | 0 openpype/modules/{default_modules => }/webserver/server.py | 0 .../modules/{default_modules => }/webserver/webserver_module.py | 0 6 files changed, 1 insertion(+) rename openpype/modules/{default_modules => }/webserver/__init__.py (100%) rename openpype/modules/{default_modules => }/webserver/base_routes.py (100%) rename openpype/modules/{default_modules => }/webserver/host_console_listener.py (100%) rename openpype/modules/{default_modules => }/webserver/server.py (100%) rename openpype/modules/{default_modules => }/webserver/webserver_module.py (100%) diff --git a/openpype/modules/base.py b/openpype/modules/base.py index eb40315dfa..e300dd0806 100644 --- a/openpype/modules/base.py +++ b/openpype/modules/base.py @@ -273,6 +273,7 @@ def _load_modules(): # Import default modules imported from 'openpype.modules' for default_module_name in ( + "webserver", "python_console_interpreter", "slack", "log_viewer", diff --git a/openpype/modules/default_modules/webserver/__init__.py b/openpype/modules/webserver/__init__.py similarity index 100% rename from openpype/modules/default_modules/webserver/__init__.py rename to openpype/modules/webserver/__init__.py diff --git a/openpype/modules/default_modules/webserver/base_routes.py b/openpype/modules/webserver/base_routes.py similarity index 100% rename from openpype/modules/default_modules/webserver/base_routes.py rename to openpype/modules/webserver/base_routes.py diff --git a/openpype/modules/default_modules/webserver/host_console_listener.py b/openpype/modules/webserver/host_console_listener.py similarity index 100% rename from openpype/modules/default_modules/webserver/host_console_listener.py rename to openpype/modules/webserver/host_console_listener.py diff --git a/openpype/modules/default_modules/webserver/server.py b/openpype/modules/webserver/server.py similarity index 100% rename from openpype/modules/default_modules/webserver/server.py rename to openpype/modules/webserver/server.py diff --git a/openpype/modules/default_modules/webserver/webserver_module.py b/openpype/modules/webserver/webserver_module.py similarity index 100% rename from openpype/modules/default_modules/webserver/webserver_module.py rename to openpype/modules/webserver/webserver_module.py From d65431c34b120c29b3a791cf7839092ae34db096 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 2 Dec 2021 17:20:29 +0100 Subject: [PATCH 23/74] OP-2042 - remove pytest deprecation warnings --- openpype/pype_commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openpype/pype_commands.py b/openpype/pype_commands.py index 519e7c285b..7f6e5f1c0c 100644 --- a/openpype/pype_commands.py +++ b/openpype/pype_commands.py @@ -216,6 +216,7 @@ class PypeCommands: task_name, app_name ) + print("env:: {}".format(env)) os.environ.update(env) os.environ["OPENPYPE_PUBLISH_DATA"] = batch_dir @@ -364,7 +365,10 @@ class PypeCommands: if pyargs: pyargs_str = "--pyargs {}".format(pyargs) - cmd = "pytest {} {} {}".format(folder, mark_str, pyargs_str) + depr_str = "--disable-pytest-warnings" + + cmd = "pytest {} {} {} {}".format(depr_str, folder, + mark_str, pyargs_str) print("Running {}".format(cmd)) subprocess.run(cmd) From 9dbae0e52e43b569051c28e4ef74179548f68065 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 2 Dec 2021 17:50:18 +0100 Subject: [PATCH 24/74] OP-2042 - added NUKE_PATH to settings It was overwriting existing value of NUKE_PATH before --- openpype/settings/defaults/system_settings/applications.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/settings/defaults/system_settings/applications.json b/openpype/settings/defaults/system_settings/applications.json index 8c119658be..4e50201036 100644 --- a/openpype/settings/defaults/system_settings/applications.json +++ b/openpype/settings/defaults/system_settings/applications.json @@ -139,7 +139,7 @@ "icon": "{}/app_icons/nuke.png", "host_name": "nuke", "environment": { - "NUKE_PATH": "{OPENPYPE_STUDIO_PLUGINS}/nuke" + "NUKE_PATH": ["{NUKE_PATH}", "{OPENPYPE_STUDIO_PLUGINS}/nuke"] }, "variants": { "13-0": { @@ -245,7 +245,7 @@ "icon": "{}/app_icons/nuke.png", "host_name": "nuke", "environment": { - "NUKE_PATH": "{OPENPYPE_STUDIO_PLUGINS}/nuke" + "NUKE_PATH": ["{NUKE_PATH}", "{OPENPYPE_STUDIO_PLUGINS}/nuke"] }, "variants": { "13-0": { From 591e81a4148396dd5e6e71a0f55133f7c6b13a1d Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 2 Dec 2021 17:51:45 +0100 Subject: [PATCH 25/74] OP-2042 - comment out examples --- tests/lib/db_handler.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/lib/db_handler.py b/tests/lib/db_handler.py index 88cde4d05f..0aa4c69ca6 100644 --- a/tests/lib/db_handler.py +++ b/tests/lib/db_handler.py @@ -220,15 +220,16 @@ class DBHandler: return query -handler = DBHandler(uri="mongodb://localhost:27017") -# -backup_dir = "c:\\projects\\test_nuke_publish\\input\\dumps" +# Examples +# handler = DBHandler(uri="mongodb://localhost:27017") # # -handler.backup_to_dump("avalon", backup_dir, True, collection="test_project") -#handler.setup_from_dump("test_db", backup_dir, True, db_name_out="avalon", collection="test_project") -# # handler.setup_from_sql_file("test_db", "c:\\projects\\sql\\item.sql", -# # collection="test_project", -# # drop=False, mode="upsert") -# handler.setup_from_sql("test_db", "c:\\projects\\sql", +# backup_dir = "c:\\projects\\test_nuke_publish\\input\\dumps" +# # # +# handler.backup_to_dump("avalon", backup_dir, True, collection="test_project") +# handler.setup_from_dump("test_db", backup_dir, True, db_name_out="avalon", collection="test_project") +# handler.setup_from_sql_file("test_db", "c:\\projects\\sql\\item.sql", # collection="test_project", # drop=False, mode="upsert") +# handler.setup_from_sql("test_db", "c:\\projects\\sql", +# collection="test_project", +# drop=False, mode="upsert") From fe86bbde299ffc9dd19b3bc9225cfb289c21ee3c Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 2 Dec 2021 18:12:54 +0100 Subject: [PATCH 26/74] OP-2042 - working example of test publish in Nuke --- .../hosts/nuke/test_publish_in_nuke.py | 42 ++++++++----------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/tests/integration/hosts/nuke/test_publish_in_nuke.py b/tests/integration/hosts/nuke/test_publish_in_nuke.py index abadb0fb92..574ad8de00 100644 --- a/tests/integration/hosts/nuke/test_publish_in_nuke.py +++ b/tests/integration/hosts/nuke/test_publish_in_nuke.py @@ -14,17 +14,20 @@ class TestPublishInNuke(PublishTest): Uses generic TestCase to prepare fixtures for test data, testing DBs, env vars. - Opens Maya, run publish on prepared workile. + Opens Nuke, run publish on prepared workile. Then checks content of DB (if subset, version, representations were created. Checks tmp folder if all expected files were published. + How to run: + {OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests ../tests/integration/hosts/nuke # noqa: E501 + """ - PERSIST = True + PERSIST = True # True - keep test_db, test_openpype, outputted test files TEST_FILES = [ - ("1635L4gww9nEkP-1EclfWXNdeDuRjDhey", "test_Nuke_publish.zip", "") + ("1SUurHj2aiQ21ZIMJfGVBI2KjR8kIjBGI", "test_Nuke_publish.zip", "") ] APP = "nuke" @@ -40,7 +43,6 @@ class TestPublishInNuke(PublishTest): Maya expects workfile in proper folder, so copy is done first. """ - print("last_workfile_path") log.info("log last_workfile_path") src_path = os.path.join( download_test_data, @@ -62,20 +64,14 @@ class TestPublishInNuke(PublishTest): @pytest.fixture(scope="module") def startup_scripts(self, monkeypatch_session, download_test_data): """Points Nuke to userSetup file from input data""" - print("startup_scripts") - log.info("log startup_scripts") startup_path = os.path.join(download_test_data, "input", "startup") - startup_path = "C:\\projects\\test_nuke_publish\\input\\startup" - original_pythonpath = os.environ.get("NUKE_PATH") + original_nuke_path = os.environ.get("NUKE_PATH", "") monkeypatch_session.setenv("NUKE_PATH", - "{}{}{}".format(original_pythonpath, + "{}{}{}".format(startup_path, os.pathsep, - startup_path)) - print("NUKE_PATH:: {}{}{}".format(startup_path, - os.pathsep, - original_pythonpath)) + original_nuke_path)) def test_db_asserts(self, dbcon, publish_finished): """Host and input data dependent expected results in DB.""" @@ -88,25 +84,21 @@ class TestPublishInNuke(PublishTest): "Only versions with 1 expected" assert 1 == dbcon.count_documents({"type": "subset", - "name": "modelMain"}), \ - "modelMain subset must be present" + "name": "renderCompositingInNukeMain"} # noqa: E501 + ), \ + "renderCompositingInNukeMain subset must be present" assert 1 == dbcon.count_documents({"type": "subset", "name": "workfileTest_task"}), \ "workfileTest_task subset must be present" - assert 11 == dbcon.count_documents({"type": "representation"}), \ + assert 10 == dbcon.count_documents({"type": "representation"}), \ "Not expected no of representations" - assert 2 == dbcon.count_documents({"type": "representation", - "context.subset": "modelMain", - "context.ext": "abc"}), \ - "Not expected no of representations with ext 'abc'" - - assert 2 == dbcon.count_documents({"type": "representation", - "context.subset": "modelMain", - "context.ext": "ma"}), \ - "Not expected no of representations with ext 'abc'" + assert 1 == dbcon.count_documents({"type": "representation", + "context.subset": "renderCompositingInNukeMain", # noqa: E501 + "context.ext": "exr"}), \ + "Not expected no of representations with ext 'exr'" if __name__ == "__main__": From e35920f9bed75a55770b219d0374d0e19b07ee7b Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 2 Dec 2021 18:40:39 +0100 Subject: [PATCH 27/74] OP-2042 - replaced testing zip files Zip files now stored on OP shared GDrive PS implementation is not working, fixed in OP-2019 --- tests/integration/hosts/maya/test_publish_in_maya.py | 9 +++++++-- .../hosts/photoshop/test_publish_in_photoshop.py | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/integration/hosts/maya/test_publish_in_maya.py b/tests/integration/hosts/maya/test_publish_in_maya.py index 1babf30029..566829b2e2 100644 --- a/tests/integration/hosts/maya/test_publish_in_maya.py +++ b/tests/integration/hosts/maya/test_publish_in_maya.py @@ -13,17 +13,22 @@ class TestPublishInMaya(PublishTest): Uses generic TestCase to prepare fixtures for test data, testing DBs, env vars. - Opens Maya, run publish on prepared workile. + Always pulls and uses test data from GDrive! + + Opens Maya, runs publish on prepared workile. Then checks content of DB (if subset, version, representations were created. Checks tmp folder if all expected files were published. + How to run: + {OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests ../tests/integration/hosts/maya # noqa: E501 + """ PERSIST = True TEST_FILES = [ - ("1pOwjA_VVBc6ooTZyFxtAwLS2KZHaBlkY", "test_maya_publish.zip", "") + ("1BTSIIULJTuDc8VvXseuiJV_fL6-Bu7FP", "test_maya_publish.zip", "") ] APP = "maya" diff --git a/tests/integration/hosts/photoshop/test_publish_in_photoshop.py b/tests/integration/hosts/photoshop/test_publish_in_photoshop.py index b634d422f3..3ef40f3041 100644 --- a/tests/integration/hosts/photoshop/test_publish_in_photoshop.py +++ b/tests/integration/hosts/photoshop/test_publish_in_photoshop.py @@ -11,17 +11,22 @@ class TestPublishInPhotoshop(PublishTest): Uses generic TestCase to prepare fixtures for test data, testing DBs, env vars. - Opens Maya, run publish on prepared workile. + Always pulls and uses test data from GDrive! + + Opens Photoshop, runs publish on prepared workile. Then checks content of DB (if subset, version, representations were created. Checks tmp folder if all expected files were published. + How to run: + {OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests ../tests/integration/hosts/photoshop # noqa: E501 + """ PERSIST = True TEST_FILES = [ - ("1Bciy2pCwMKl1UIpxuPnlX_LHMo_Xkq0K", "test_photoshop_publish.zip", "") + ("1zD2v5cBgkyOm_xIgKz3WKn8aFB_j8qC-", "test_photoshop_publish.zip", "") ] APP = "photoshop" From d4e5ab90cf3bc81a8ffe94b5b8736d7403adb2c3 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 2 Dec 2021 19:02:35 +0100 Subject: [PATCH 28/74] OP-2042 - added better documentation how to run it --- tests/integration/hosts/maya/test_publish_in_maya.py | 1 + tests/integration/hosts/nuke/test_publish_in_nuke.py | 1 + tests/integration/hosts/photoshop/test_publish_in_photoshop.py | 1 + 3 files changed, 3 insertions(+) diff --git a/tests/integration/hosts/maya/test_publish_in_maya.py b/tests/integration/hosts/maya/test_publish_in_maya.py index 566829b2e2..b53b26f66d 100644 --- a/tests/integration/hosts/maya/test_publish_in_maya.py +++ b/tests/integration/hosts/maya/test_publish_in_maya.py @@ -22,6 +22,7 @@ class TestPublishInMaya(PublishTest): Checks tmp folder if all expected files were published. How to run: + (in cmd with activated {OPENPYPE_ROOT}/.venv) {OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests ../tests/integration/hosts/maya # noqa: E501 """ diff --git a/tests/integration/hosts/nuke/test_publish_in_nuke.py b/tests/integration/hosts/nuke/test_publish_in_nuke.py index 574ad8de00..6dc880d757 100644 --- a/tests/integration/hosts/nuke/test_publish_in_nuke.py +++ b/tests/integration/hosts/nuke/test_publish_in_nuke.py @@ -21,6 +21,7 @@ class TestPublishInNuke(PublishTest): Checks tmp folder if all expected files were published. How to run: + (in cmd with activated {OPENPYPE_ROOT}/.venv) {OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests ../tests/integration/hosts/nuke # noqa: E501 """ diff --git a/tests/integration/hosts/photoshop/test_publish_in_photoshop.py b/tests/integration/hosts/photoshop/test_publish_in_photoshop.py index 3ef40f3041..43e03b2cc3 100644 --- a/tests/integration/hosts/photoshop/test_publish_in_photoshop.py +++ b/tests/integration/hosts/photoshop/test_publish_in_photoshop.py @@ -20,6 +20,7 @@ class TestPublishInPhotoshop(PublishTest): Checks tmp folder if all expected files were published. How to run: + (in cmd with activated {OPENPYPE_ROOT}/.venv) {OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests ../tests/integration/hosts/photoshop # noqa: E501 """ From 5d8550399535492c6bc52ba58f5c2aff9200f066 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 2 Dec 2021 19:03:43 +0100 Subject: [PATCH 29/74] OP-2042 - removed forgotten app for debugging --- openpype/hooks/pre_foundry_apps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hooks/pre_foundry_apps.py b/openpype/hooks/pre_foundry_apps.py index 70554cbedb..85f68c6b60 100644 --- a/openpype/hooks/pre_foundry_apps.py +++ b/openpype/hooks/pre_foundry_apps.py @@ -13,7 +13,7 @@ class LaunchFoundryAppsWindows(PreLaunchHook): # Should be as last hook because must change launch arguments to string order = 1000 - app_groups = ["nuke", "nukex", "hiero", "nukestudio", "aftereffects"] + app_groups = ["nuke", "nukex", "hiero", "nukestudio"] platforms = ["windows"] def execute(self): From 1762f4635b5fe520825343b4b80ff7fec02b9c42 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 2 Dec 2021 19:04:44 +0100 Subject: [PATCH 30/74] OP-2042 - fixed wrong value Belongs to merged PR for AE testing --- openpype/lib/remote_publish.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/lib/remote_publish.py b/openpype/lib/remote_publish.py index 4b4d233f1e..6c594b50e8 100644 --- a/openpype/lib/remote_publish.py +++ b/openpype/lib/remote_publish.py @@ -27,7 +27,7 @@ def headless_publish(log, close_plugin_name=None, is_test=False): publish_and_log(dbcon, _id, log, close_plugin_name) else: - publish(log, 'CloseAE') + publish(log, close_plugin_name) def get_webpublish_conn(): From 9a5f90620ed57bffe00888d5319d928064636b64 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 2 Dec 2021 19:27:50 +0100 Subject: [PATCH 31/74] Commit current develop avalon-core --- repos/avalon-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/avalon-core b/repos/avalon-core index e37f4f92ed..1d94a75ddf 160000 --- a/repos/avalon-core +++ b/repos/avalon-core @@ -1 +1 @@ -Subproject commit e37f4f92ed25f89c870fdcb7f9538da7d0d7de90 +Subproject commit 1d94a75ddf37a354955a9e7f4bb8695187f3e0ed From ceeaf28dd7e461cd2271796092651b014f6c6f8f Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 3 Dec 2021 10:14:14 +0100 Subject: [PATCH 32/74] OP-2042 - clean up files from different PR --- .../aftereffects/plugins/publish/closeAE.py | 29 ------ .../plugins/publish/extract_local_render.py | 3 +- openpype/lib/remote_publish.py | 46 --------- .../system_settings/applications.json | 17 ---- .../test_publish_in_aftereffects.py | 96 ------------------- 5 files changed, 2 insertions(+), 189 deletions(-) delete mode 100644 openpype/hosts/aftereffects/plugins/publish/closeAE.py delete mode 100644 tests/integration/hosts/aftereffects/test_publish_in_aftereffects.py diff --git a/openpype/hosts/aftereffects/plugins/publish/closeAE.py b/openpype/hosts/aftereffects/plugins/publish/closeAE.py deleted file mode 100644 index e6e9623474..0000000000 --- a/openpype/hosts/aftereffects/plugins/publish/closeAE.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -"""Close AE after publish. For Webpublishing only.""" -import os - -import pyblish.api - -from avalon import aftereffects - - -class CloseAE(pyblish.api.ContextPlugin): - """Close AE after publish. For Webpublishing only. - """ - - order = pyblish.api.IntegratorOrder + 14 - label = "Close AE" - optional = True - active = True - - hosts = ["aftereffects"] - targets = ["remotepublish"] - - def process(self, context): - self.log.info("CloseAE") - - stub = aftereffects.stub() - self.log.info("Shutting down AE") - stub.save() - stub.close() - self.log.info("AE closed") diff --git a/openpype/hosts/aftereffects/plugins/publish/extract_local_render.py b/openpype/hosts/aftereffects/plugins/publish/extract_local_render.py index b36ab24bde..37337e7fee 100644 --- a/openpype/hosts/aftereffects/plugins/publish/extract_local_render.py +++ b/openpype/hosts/aftereffects/plugins/publish/extract_local_render.py @@ -19,9 +19,10 @@ class ExtractLocalRender(openpype.api.Extractor): staging_dir = instance.data["stagingDir"] self.log.info("staging_dir::{}".format(staging_dir)) + stub.render(staging_dir) + # pull file name from Render Queue Output module render_q = stub.get_render_info() - stub.render(staging_dir) if not render_q: raise ValueError("No file extension set in Render Queue") _, ext = os.path.splitext(os.path.basename(render_q.file_name)) diff --git a/openpype/lib/remote_publish.py b/openpype/lib/remote_publish.py index 6c594b50e8..d7db4d1ab9 100644 --- a/openpype/lib/remote_publish.py +++ b/openpype/lib/remote_publish.py @@ -11,25 +11,6 @@ from openpype.lib.mongo import OpenPypeMongoConnection from openpype.lib.plugin_tools import parse_json -def headless_publish(log, close_plugin_name=None, is_test=False): - """Runs publish in a opened host with a context and closes Python process. - - Host is being closed via ClosePS pyblish plugin which triggers 'exit' - method in ConsoleTrayApp. - """ - if not is_test: - dbcon = get_webpublish_conn() - _id = os.environ.get("BATCH_LOG_ID") - if not _id: - log.warning("Unable to store log records, " - "batch will be unfinished!") - return - - publish_and_log(dbcon, _id, log, close_plugin_name) - else: - publish(log, close_plugin_name) - - def get_webpublish_conn(): """Get connection to OP 'webpublishes' collection.""" mongo_client = OpenPypeMongoConnection.get_mongo_client() @@ -56,33 +37,6 @@ def start_webpublish_log(dbcon, batch_id, user): }).inserted_id -def publish(log, close_plugin_name=None): - """Loops through all plugins, logs to console. Used for tests. - - Args: - log (OpenPypeLogger) - close_plugin_name (str): name of plugin with responsibility to - close host app - """ - # Error exit as soon as any error occurs. - error_format = "Failed {plugin.__name__}: {error} -- {error.traceback}" - - close_plugin = _get_close_plugin(close_plugin_name, log) - - for result in pyblish.util.publish_iter(): - for record in result["records"]: - log.info("{}: {}".format( - result["plugin"].label, record.msg)) - - if result["error"]: - log.error(error_format.format(**result)) - uninstall() - if close_plugin: # close host app explicitly after error - context = pyblish.api.Context() - close_plugin().process(context) - sys.exit(1) - - def publish_and_log(dbcon, _id, log, close_plugin_name=None): """Loops through all plugins, logs ok and fails into OP DB. diff --git a/openpype/settings/defaults/system_settings/applications.json b/openpype/settings/defaults/system_settings/applications.json index 4e50201036..c730e02984 100644 --- a/openpype/settings/defaults/system_settings/applications.json +++ b/openpype/settings/defaults/system_settings/applications.json @@ -1098,23 +1098,6 @@ "linux": [] }, "environment": {} - }, - "2022": { - "enabled": true, - "variant_label": "2022", - "executables": { - "windows": [ - "C:\\Program Files\\Adobe\\Adobe After Effects 2022\\Support Files\\AfterFX.exe" - ], - "darwin": [], - "linux": [] - }, - "arguments": { - "windows": [], - "darwin": [], - "linux": [] - }, - "environment": {} } } }, diff --git a/tests/integration/hosts/aftereffects/test_publish_in_aftereffects.py b/tests/integration/hosts/aftereffects/test_publish_in_aftereffects.py deleted file mode 100644 index d4e88dfd4c..0000000000 --- a/tests/integration/hosts/aftereffects/test_publish_in_aftereffects.py +++ /dev/null @@ -1,96 +0,0 @@ -import pytest -import os -import shutil - -from tests.lib.testing_classes import PublishTest - - -class TestPublishInAfterEffects(PublishTest): - """Basic test case for publishing in AfterEffects - - Uses generic TestCase to prepare fixtures for test data, testing DBs, - env vars. - - Opens AfterEffects, run publish on prepared workile. - - Then checks content of DB (if subset, version, representations were - created. - Checks tmp folder if all expected files were published. - - """ - PERSIST = True - - TEST_FILES = [ - ("1qsrq6OJWVpOeXE2LTWrdbsLqEVu155Uf", - "test_aftereffects_publish.zip", - "") - ] - - APP = "aftereffects" - APP_VARIANT = "2021" - - APP_NAME = "{}/{}".format(APP, APP_VARIANT) - - TIMEOUT = 120 # publish timeout - - @pytest.fixture(scope="module") - def last_workfile_path(self, download_test_data): - """Get last_workfile_path from source data. - - Maya expects workfile in proper folder, so copy is done first. - """ - src_path = os.path.join(download_test_data, - "input", - "workfile", - "test_project_test_asset_TestTask_v001.aep") - dest_folder = os.path.join(download_test_data, - self.PROJECT, - self.ASSET, - "work", - self.TASK) - os.makedirs(dest_folder) - dest_path = os.path.join(dest_folder, - "test_project_test_asset_TestTask_v001.aep") - shutil.copy(src_path, dest_path) - - yield dest_path - - @pytest.fixture(scope="module") - def startup_scripts(self, monkeypatch_session, download_test_data): - """Points AfterEffects to userSetup file from input data""" - pass - - def test_db_asserts(self, dbcon, publish_finished): - """Host and input data dependent expected results in DB.""" - print("test_db_asserts") - assert 5 == dbcon.count_documents({"type": "version"}), \ - "Not expected no of versions" - - assert 0 == dbcon.count_documents({"type": "version", - "name": {"$ne": 1}}), \ - "Only versions with 1 expected" - - assert 1 == dbcon.count_documents({"type": "subset", - "name": "modelMain"}), \ - "modelMain subset must be present" - - assert 1 == dbcon.count_documents({"type": "subset", - "name": "workfileTest_task"}), \ - "workfileTest_task subset must be present" - - assert 11 == dbcon.count_documents({"type": "representation"}), \ - "Not expected no of representations" - - assert 2 == dbcon.count_documents({"type": "representation", - "context.subset": "modelMain", - "context.ext": "abc"}), \ - "Not expected no of representations with ext 'abc'" - - assert 2 == dbcon.count_documents({"type": "representation", - "context.subset": "modelMain", - "context.ext": "ma"}), \ - "Not expected no of representations with ext 'abc'" - - -if __name__ == "__main__": - test_case = TestPublishInAfterEffects() From 486966efbc7daddefb6e264ec05a5718f8fce395 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 3 Dec 2021 10:16:05 +0100 Subject: [PATCH 33/74] Reverting change to avalon-core --- repos/avalon-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/avalon-core b/repos/avalon-core index 1d94a75ddf..9499f6517a 160000 --- a/repos/avalon-core +++ b/repos/avalon-core @@ -1 +1 @@ -Subproject commit 1d94a75ddf37a354955a9e7f4bb8695187f3e0ed +Subproject commit 9499f6517a1ff2d3bf94c5d34c0aece146734760 From d5b2127bcc04bbc5abab0de8c670e600c024cae2 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 3 Dec 2021 13:52:56 +0100 Subject: [PATCH 34/74] moved avalon apps module --- openpype/modules/{default_modules => }/avalon_apps/__init__.py | 0 openpype/modules/{default_modules => }/avalon_apps/avalon_app.py | 0 openpype/modules/{default_modules => }/avalon_apps/rest_api.py | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename openpype/modules/{default_modules => }/avalon_apps/__init__.py (100%) rename openpype/modules/{default_modules => }/avalon_apps/avalon_app.py (100%) rename openpype/modules/{default_modules => }/avalon_apps/rest_api.py (100%) diff --git a/openpype/modules/default_modules/avalon_apps/__init__.py b/openpype/modules/avalon_apps/__init__.py similarity index 100% rename from openpype/modules/default_modules/avalon_apps/__init__.py rename to openpype/modules/avalon_apps/__init__.py diff --git a/openpype/modules/default_modules/avalon_apps/avalon_app.py b/openpype/modules/avalon_apps/avalon_app.py similarity index 100% rename from openpype/modules/default_modules/avalon_apps/avalon_app.py rename to openpype/modules/avalon_apps/avalon_app.py diff --git a/openpype/modules/default_modules/avalon_apps/rest_api.py b/openpype/modules/avalon_apps/rest_api.py similarity index 100% rename from openpype/modules/default_modules/avalon_apps/rest_api.py rename to openpype/modules/avalon_apps/rest_api.py From 343159d5af8b1a77e8c7e95fe685c78a39e0ed88 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 3 Dec 2021 14:12:32 +0100 Subject: [PATCH 35/74] define constant with default modules --- openpype/modules/base.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/openpype/modules/base.py b/openpype/modules/base.py index e300dd0806..29c1c6fd5a 100644 --- a/openpype/modules/base.py +++ b/openpype/modules/base.py @@ -29,6 +29,21 @@ from openpype.settings.lib import ( from openpype.lib import PypeLogger +DEFAULT_OPENPYPE_MODULES = ( + "avalon_apps", + "clockify", + "log_viewer", + "muster", + "python_console_interpreter", + "slack", + "webserver", + "launcher_action", + "project_manager_action", + "settings_action", + "standalonepublish_action", +) + + # Inherit from `object` for Python 2 hosts class _ModuleClass(object): """Fake module class for storing OpenPype modules. @@ -272,18 +287,7 @@ def _load_modules(): log = PypeLogger.get_logger("ModulesLoader") # Import default modules imported from 'openpype.modules' - for default_module_name in ( - "webserver", - "python_console_interpreter", - "slack", - "log_viewer", - "muster", - "clockify", - "settings_action", - "launcher_action", - "project_manager_action", - "standalonepublish_action", - ): + for default_module_name in DEFAULT_OPENPYPE_MODULES: try: default_module = __import__( "openpype.modules.{}".format(default_module_name), From 10d959dd03c176c25fed674b09922eaf44302732 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 3 Dec 2021 14:13:16 +0100 Subject: [PATCH 36/74] modified and fixed import of default modules into 'openpype_modules' --- openpype/modules/base.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openpype/modules/base.py b/openpype/modules/base.py index 29c1c6fd5a..a1df3cfd14 100644 --- a/openpype/modules/base.py +++ b/openpype/modules/base.py @@ -289,10 +289,10 @@ def _load_modules(): # Import default modules imported from 'openpype.modules' for default_module_name in DEFAULT_OPENPYPE_MODULES: try: - default_module = __import__( - "openpype.modules.{}".format(default_module_name), - fromlist=("", ) - ) + import_str = "openpype.modules.{}".format(default_module_name) + new_import_str = "{}.{}".format(modules_key, default_module_name) + default_module = __import__(import_str, fromlist=("", )) + sys.modules[new_import_str] = default_module setattr(openpype_modules, default_module_name, default_module) except Exception: From 68b5078ae147130d3d10e4208a3e3ad7d9a20887 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 3 Dec 2021 15:37:00 +0100 Subject: [PATCH 37/74] OP-2042 - always capture stdout in pytest Previously it was printed only in case of failure --- openpype/pype_commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openpype/pype_commands.py b/openpype/pype_commands.py index 7f6e5f1c0c..ce1a9718b3 100644 --- a/openpype/pype_commands.py +++ b/openpype/pype_commands.py @@ -365,9 +365,10 @@ class PypeCommands: if pyargs: pyargs_str = "--pyargs {}".format(pyargs) - depr_str = "--disable-pytest-warnings" + # disable warnings and show captured stdout even if success + args_str = "--disable-pytest-warnings -rP" - cmd = "pytest {} {} {} {}".format(depr_str, folder, + cmd = "pytest {} {} {} {}".format(args_str, folder, mark_str, pyargs_str) print("Running {}".format(cmd)) subprocess.run(cmd) From d55d996f9c58030c86de4eb158837ea289d834d4 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 3 Dec 2021 15:39:43 +0100 Subject: [PATCH 38/74] OP-2042 - added functionality to reuse existing folder for testdata --- .../hosts/nuke/test_publish_in_nuke.py | 16 +++------ tests/lib/testing_classes.py | 34 +++++++++++-------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/tests/integration/hosts/nuke/test_publish_in_nuke.py b/tests/integration/hosts/nuke/test_publish_in_nuke.py index 6dc880d757..483e9fef98 100644 --- a/tests/integration/hosts/nuke/test_publish_in_nuke.py +++ b/tests/integration/hosts/nuke/test_publish_in_nuke.py @@ -25,7 +25,7 @@ class TestPublishInNuke(PublishTest): {OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests ../tests/integration/hosts/nuke # noqa: E501 """ - PERSIST = True # True - keep test_db, test_openpype, outputted test files + PERSIST = False # True - keep test_db, test_openpype, outputted test files TEST_FILES = [ ("1SUurHj2aiQ21ZIMJfGVBI2KjR8kIjBGI", "test_Nuke_publish.zip", "") @@ -38,11 +38,12 @@ class TestPublishInNuke(PublishTest): TIMEOUT = 120 # publish timeout + TEST_DATA_FOLDER = None # provide existing folder with test data + @pytest.fixture(scope="module") def last_workfile_path(self, download_test_data): """Get last_workfile_path from source data. - Maya expects workfile in proper folder, so copy is done first. """ log.info("log last_workfile_path") src_path = os.path.join( @@ -50,17 +51,8 @@ class TestPublishInNuke(PublishTest): "input", "workfile", "test_project_test_asset_CompositingInNuke_v001.nk") - dest_folder = os.path.join(download_test_data, - self.PROJECT, - self.ASSET, - "work", - self.TASK) - os.makedirs(dest_folder) - dest_path = os.path.join( - dest_folder, "test_project_test_asset_CompositingInNuke_v001.nk") - shutil.copy(src_path, dest_path) - yield dest_path + yield src_path @pytest.fixture(scope="module") def startup_scripts(self, monkeypatch_session, download_test_data): diff --git a/tests/lib/testing_classes.py b/tests/lib/testing_classes.py index 59d4abb3aa..aa8ef3caab 100644 --- a/tests/lib/testing_classes.py +++ b/tests/lib/testing_classes.py @@ -45,6 +45,8 @@ class ModuleUnitTest(BaseTest): ASSET = "test_asset" TASK = "test_task" + TEST_DATA_FOLDER = None + @pytest.fixture(scope='session') def monkeypatch_session(self): """Monkeypatch couldn't be used with module or session fixtures.""" @@ -55,24 +57,28 @@ class ModuleUnitTest(BaseTest): @pytest.fixture(scope="module") def download_test_data(self): - tmpdir = tempfile.mkdtemp() - for test_file in self.TEST_FILES: - file_id, file_name, md5 = test_file + if self.TEST_DATA_FOLDER: + print("Using existing folder {}".format(self.TEST_DATA_FOLDER)) + yield self.TEST_DATA_FOLDER + else: + tmpdir = tempfile.mkdtemp() + for test_file in self.TEST_FILES: + file_id, file_name, md5 = test_file - f_name, ext = os.path.splitext(file_name) + f_name, ext = os.path.splitext(file_name) - RemoteFileHandler.download_file_from_google_drive(file_id, - str(tmpdir), - file_name) + RemoteFileHandler.download_file_from_google_drive(file_id, + str(tmpdir), + file_name) - if ext.lstrip('.') in RemoteFileHandler.IMPLEMENTED_ZIP_FORMATS: - RemoteFileHandler.unzip(os.path.join(tmpdir, file_name)) - print("Temporary folder created:: {}".format(tmpdir)) - yield tmpdir + if ext.lstrip('.') in RemoteFileHandler.IMPLEMENTED_ZIP_FORMATS: #noqa E501 + RemoteFileHandler.unzip(os.path.join(tmpdir, file_name)) + print("Temporary folder created:: {}".format(tmpdir)) + yield tmpdir - if not self.PERSIST: - print("Removing {}".format(tmpdir)) - shutil.rmtree(tmpdir) + if not self.PERSIST: + print("Removing {}".format(tmpdir)) + shutil.rmtree(tmpdir) @pytest.fixture(scope="module") def env_var(self, monkeypatch_session, download_test_data): From d0ada90e44a4746f2dcb154a0e46d0e77998c958 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 3 Dec 2021 16:18:07 +0100 Subject: [PATCH 39/74] OP-2042 - added functionality to implicit choose variant If APP_VARIANT is empty it looks for latest installed variant of an application --- .../hosts/maya/test_publish_in_maya.py | 7 +++---- .../hosts/nuke/test_publish_in_nuke.py | 5 ++--- .../photoshop/test_publish_in_photoshop.py | 7 +++---- tests/lib/testing_classes.py | 19 +++++++++++++++---- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/tests/integration/hosts/maya/test_publish_in_maya.py b/tests/integration/hosts/maya/test_publish_in_maya.py index b53b26f66d..687e6fbc6e 100644 --- a/tests/integration/hosts/maya/test_publish_in_maya.py +++ b/tests/integration/hosts/maya/test_publish_in_maya.py @@ -26,16 +26,15 @@ class TestPublishInMaya(PublishTest): {OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests ../tests/integration/hosts/maya # noqa: E501 """ - PERSIST = True + PERSIST = False TEST_FILES = [ ("1BTSIIULJTuDc8VvXseuiJV_fL6-Bu7FP", "test_maya_publish.zip", "") ] APP = "maya" - APP_VARIANT = "2019" - - APP_NAME = "{}/{}".format(APP, APP_VARIANT) + # keep empty to locate latest installed variant or explicit + APP_VARIANT = "" TIMEOUT = 120 # publish timeout diff --git a/tests/integration/hosts/nuke/test_publish_in_nuke.py b/tests/integration/hosts/nuke/test_publish_in_nuke.py index 483e9fef98..14a79fdf3d 100644 --- a/tests/integration/hosts/nuke/test_publish_in_nuke.py +++ b/tests/integration/hosts/nuke/test_publish_in_nuke.py @@ -32,9 +32,8 @@ class TestPublishInNuke(PublishTest): ] APP = "nuke" - APP_VARIANT = "12-2" - - APP_NAME = "{}/{}".format(APP, APP_VARIANT) + # keep empty to locate latest installed variant or explicit + APP_VARIANT = "" TIMEOUT = 120 # publish timeout diff --git a/tests/integration/hosts/photoshop/test_publish_in_photoshop.py b/tests/integration/hosts/photoshop/test_publish_in_photoshop.py index 43e03b2cc3..c7f2399494 100644 --- a/tests/integration/hosts/photoshop/test_publish_in_photoshop.py +++ b/tests/integration/hosts/photoshop/test_publish_in_photoshop.py @@ -24,16 +24,15 @@ class TestPublishInPhotoshop(PublishTest): {OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests ../tests/integration/hosts/photoshop # noqa: E501 """ - PERSIST = True + PERSIST = False TEST_FILES = [ ("1zD2v5cBgkyOm_xIgKz3WKn8aFB_j8qC-", "test_photoshop_publish.zip", "") ] APP = "photoshop" - APP_VARIANT = "2021" - - APP_NAME = "{}/{}".format(APP, APP_VARIANT) + # keep empty to locate latest installed variant or explicit + APP_VARIANT = "" TIMEOUT = 120 # publish timeout diff --git a/tests/lib/testing_classes.py b/tests/lib/testing_classes.py index aa8ef3caab..bf1c490ecd 100644 --- a/tests/lib/testing_classes.py +++ b/tests/lib/testing_classes.py @@ -11,6 +11,8 @@ import glob from tests.lib.db_handler import DBHandler from tests.lib.file_handler import RemoteFileHandler +from openpype.lib.remote_publish import find_variant_key + class BaseTest: """Empty base test class""" @@ -173,12 +175,15 @@ class PublishTest(ModuleUnitTest): """ APP = "" - APP_VARIANT = "" - - APP_NAME = "{}/{}".format(APP, APP_VARIANT) + APP_VARIANT = "" # keep empty to locate latest installed variant TIMEOUT = 120 # publish timeout + @property + def app_name(self): + if self.APP_VARIANT: + return "{}/{}".format(self.APP, self.APP_VARIANT) + @pytest.fixture(scope="module") def last_workfile_path(self, download_test_data): raise NotImplementedError @@ -224,7 +229,13 @@ class PublishTest(ModuleUnitTest): "task_name": self.TASK } - yield application_manager.launch(self.APP_NAME, **data) + variant = self.APP_VARIANT + if not variant: + variant = find_variant_key(application_manager, self.APP) + + app_name = "{}/{}".format(self.APP, variant) + + yield application_manager.launch(app_name, **data) @pytest.fixture(scope="module") def publish_finished(self, dbcon, launched_app, download_test_data): From b61b3634b289406469e08ab3a9617860ef979840 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 3 Dec 2021 16:20:31 +0100 Subject: [PATCH 40/74] OP-2042 - Hound --- tests/integration/hosts/nuke/test_publish_in_nuke.py | 1 - tests/lib/testing_classes.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/integration/hosts/nuke/test_publish_in_nuke.py b/tests/integration/hosts/nuke/test_publish_in_nuke.py index 14a79fdf3d..fe1745299d 100644 --- a/tests/integration/hosts/nuke/test_publish_in_nuke.py +++ b/tests/integration/hosts/nuke/test_publish_in_nuke.py @@ -1,6 +1,5 @@ import pytest import os -import shutil import logging from tests.lib.testing_classes import PublishTest diff --git a/tests/lib/testing_classes.py b/tests/lib/testing_classes.py index bf1c490ecd..92b2b2b52b 100644 --- a/tests/lib/testing_classes.py +++ b/tests/lib/testing_classes.py @@ -73,7 +73,7 @@ class ModuleUnitTest(BaseTest): str(tmpdir), file_name) - if ext.lstrip('.') in RemoteFileHandler.IMPLEMENTED_ZIP_FORMATS: #noqa E501 + if ext.lstrip('.') in RemoteFileHandler.IMPLEMENTED_ZIP_FORMATS: # noqa: E501 RemoteFileHandler.unzip(os.path.join(tmpdir, file_name)) print("Temporary folder created:: {}".format(tmpdir)) yield tmpdir From 89490f4b14815d402c12ab8680e69c3241760da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20LORRAIN?= Date: Fri, 3 Dec 2021 17:22:27 +0100 Subject: [PATCH 41/74] add maya default render folder path to settings --- .../maya/plugins/publish/validate_render_image_rule.py | 8 +++++++- .../deadline/plugins/publish/submit_maya_deadline.py | 7 ++++++- openpype/settings/defaults/project_settings/maya.json | 3 ++- .../projects_schema/schemas/schema_maya_create.json | 5 +++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/validate_render_image_rule.py b/openpype/hosts/maya/plugins/publish/validate_render_image_rule.py index dad1691149..e892b239cc 100644 --- a/openpype/hosts/maya/plugins/publish/validate_render_image_rule.py +++ b/openpype/hosts/maya/plugins/publish/validate_render_image_rule.py @@ -23,7 +23,13 @@ class ValidateRenderImageRule(pyblish.api.InstancePlugin): def process(self, instance): - assert get_file_rule("images") == "renders", ( + default_render_file = instance.context.data.get('project_settings')\ + .get('maya') \ + .get('create') \ + .get('CreateRender') \ + .get('default_render_image_folder') + + assert get_file_rule("images") == default_render_file, ( "Workspace's `images` file rule must be set to: renders" ) diff --git a/openpype/modules/default_modules/deadline/plugins/publish/submit_maya_deadline.py b/openpype/modules/default_modules/deadline/plugins/publish/submit_maya_deadline.py index e6c42374ca..51a19e2aad 100644 --- a/openpype/modules/default_modules/deadline/plugins/publish/submit_maya_deadline.py +++ b/openpype/modules/default_modules/deadline/plugins/publish/submit_maya_deadline.py @@ -394,9 +394,14 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin): self.log.debug(filepath) # Gather needed data ------------------------------------------------ + default_render_file = instance.context.data.get('project_settings')\ + .get('maya')\ + .get('create')\ + .get('CreateRender')\ + .get('default_render_image_folder') filename = os.path.basename(filepath) comment = context.data.get("comment", "") - dirname = os.path.join(workspace, "renders") + dirname = os.path.join(workspace, default_render_file) renderlayer = instance.data['setMembers'] # rs_beauty deadline_user = context.data.get("user", getpass.getuser()) jobname = "%s - %s" % (filename, instance.name) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 73c75ef3ee..cbcf8cd600 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -43,7 +43,8 @@ "defaults": [ "Main" ], - "aov_separator": "underscore" + "aov_separator": "underscore", + "default_render_image_folder": "renders" }, "CreateAnimation": { "enabled": true, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_create.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_create.json index e50357cc40..088d5d1f96 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_create.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_create.json @@ -58,6 +58,11 @@ {"underscore": "_ (underscore)"}, {"dot": ". (dot)"} ] + }, + { + "type": "text", + "key": "default_render_image_folder", + "label": "Default render image folder" } ] }, From efa7bffe066cac6afcb68616f7196dadfb4df53d Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 3 Dec 2021 17:33:50 +0100 Subject: [PATCH 42/74] OP-2042 - added a bit of documentation --- tests/integration/README.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tests/integration/README.md b/tests/integration/README.md index 81c07ec50c..aeed53d097 100644 --- a/tests/integration/README.md +++ b/tests/integration/README.md @@ -5,16 +5,23 @@ Contains end-to-end tests for automatic testing of OP. Should run headless publish on all hosts to check basic publish use cases automatically to limit regression issues. +How to run +---------- +- activate `{OPENPYPE_ROOT}/.venv` +- run in cmd +`{OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests {OPENPYPE_ROOT}/tests/integration` + - add `hosts/APP_NAME` after integration part to limit only on specific app (eg. `{OPENPYPE_ROOT}/tests/integration/hosts/maya`) + How to create test for publishing from host ------------------------------------------ -- Extend PublishTest +- Extend PublishTest in `tests/lib/testing_classes.py` - Use `resources\test_data.zip` skeleton file as a template for testing input data - Put workfile into `test_data.zip/input/workfile` - If you require other than base DB dumps provide them to `test_data.zip/input/dumps` -- (Check commented code in `db_handler.py` how to dump specific DB. Currently all collections will be dumped.) - Implement `last_workfile_path` - `startup_scripts` - must contain pointing host to startup script saved into `test_data.zip/input/startup` - -- Script must contain something like + -- Script must contain something like (pseudocode) ``` import openpype from avalon import api, HOST @@ -25,13 +32,18 @@ pyblish.util.publish() EXIT_APP (command to exit host) ``` (Install and publish methods must be triggered only AFTER host app is fully initialized!) -- Zip `test_data.zip`, named it with descriptive name, upload it to Google Drive, right click - `Get link`, copy hash id +- If you would like add any command line arguments for your host app add it to `test_data.zip/input/app_args/app_args.json` (as a json list) +- Provide any required environment variables to `test_data.zip/input/env_vars/env_vars.json` (as a json dictionary) +- Zip `test_data.zip`, named it with descriptive name, upload it to Google Drive, right click - `Get link`, copy hash id (file must be accessible to anyone with a link!) - Put this hash id and zip file name into TEST_FILES [(HASH_ID, FILE_NAME, MD5_OPTIONAL)]. If you want to check MD5 of downloaded file, provide md5 value of zipped file. - Implement any assert checks you need in extended class - Run test class manually (via Pycharm or pytest runner (TODO)) -- If you want test to compare expected files to published one, set PERSIST to True, run test manually +- If you want test to visually compare expected files to published one, set PERSIST to True, run test manually -- Locate temporary `publish` subfolder of temporary folder (found in debugging console log) -- Copy whole folder content into .zip file into `expected` subfolder -- By default tests are comparing only structure of `expected` and published format (eg. if you want to save space, replace published files with empty files, but with expected names!) - -- Zip and upload again, change PERSIST to False \ No newline at end of file + -- Zip and upload again, change PERSIST to False + +- Use `TEST_DATA_FOLDER` variable in your class to reuse existing downloaded and unzipped test data (for faster creation of tests) +- Keep `APP_VARIANT` empty if you want to trigger test on latest version of app, or provide explicit value (as '2022' for Photoshop for example) \ No newline at end of file From 8eb7a30358275f47ca21691dca221fc00f2b4d57 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 3 Dec 2021 17:38:02 +0100 Subject: [PATCH 43/74] OP-2042 - added a functionality to inject additional command line arguments --- openpype/lib/applications.py | 2 ++ tests/lib/testing_classes.py | 30 +++++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/openpype/lib/applications.py b/openpype/lib/applications.py index 30be92e886..6eb44a9694 100644 --- a/openpype/lib/applications.py +++ b/openpype/lib/applications.py @@ -716,6 +716,8 @@ class ApplicationLaunchContext: # subprocess.Popen launch arguments (first argument in constructor) self.launch_args = executable.as_args() self.launch_args.extend(application.arguments) + if self.data.get("app_args"): + self.launch_args.extend(self.data.pop("app_args")) # Handle launch environemtns env = self.data.pop("env", None) diff --git a/tests/lib/testing_classes.py b/tests/lib/testing_classes.py index 92b2b2b52b..15ab685739 100644 --- a/tests/lib/testing_classes.py +++ b/tests/lib/testing_classes.py @@ -192,9 +192,35 @@ class PublishTest(ModuleUnitTest): def startup_scripts(self, monkeypatch_session, download_test_data): raise NotImplementedError + @pytest.fixture(scope="module") + def app_args(self, download_test_data): + """Returns additional application arguments from a test file. + + Test zip file should contain file at: + FOLDER_DIR/input/app_args/app_args.json + containing a list of command line arguments (like '-x' etc.) + """ + app_args = [] + args_url = os.path.join(download_test_data, "input", + "app_args", "app_args.json") + if not os.path.exists(args_url): + print("App argument file {} doesn't exist".format(args_url)) + else: + try: + with open(args_url) as json_file: + app_args = json.load(json_file) + + if not isinstance(app_args, list): + raise ValueError + except ValueError: + print("{} doesn't contain valid JSON".format(args_url)) + six.reraise(*sys.exc_info()) + + yield app_args + @pytest.fixture(scope="module") def launched_app(self, dbcon, download_test_data, last_workfile_path, - startup_scripts): + startup_scripts, app_args): """Launch host app""" # set publishing folders root_key = "config.roots.work.{}".format("windows") # TEMP @@ -228,6 +254,8 @@ class PublishTest(ModuleUnitTest): "asset_name": self.ASSET, "task_name": self.TASK } + if app_args: + data["app_args"] = app_args variant = self.APP_VARIANT if not variant: From b3ec2fe524dfd05ab60ef88649f40aa4b29ce3f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20LORRAIN?= Date: Mon, 6 Dec 2021 10:28:56 +0100 Subject: [PATCH 44/74] Use the setting in CollectRender --- openpype/hosts/maya/plugins/publish/collect_render.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_render.py b/openpype/hosts/maya/plugins/publish/collect_render.py index 580d459a90..e26859ad93 100644 --- a/openpype/hosts/maya/plugins/publish/collect_render.py +++ b/openpype/hosts/maya/plugins/publish/collect_render.py @@ -221,14 +221,18 @@ class CollectMayaRender(pyblish.api.ContextPlugin): # append full path full_exp_files = [] aov_dict = {} - + default_render_file = context.data.get('project_settings')\ + .get('maya')\ + .get('create')\ + .get('CreateRender')\ + .get('default_render_image_folder') # replace relative paths with absolute. Render products are # returned as list of dictionaries. publish_meta_path = None for aov in exp_files: full_paths = [] for file in aov[aov.keys()[0]]: - full_path = os.path.join(workspace, "renders", file) + full_path = os.path.join(workspace, default_render_file, file) full_path = full_path.replace("\\", "/") full_paths.append(full_path) publish_meta_path = os.path.dirname(full_path) From ca1516fa13b03409c160f3c0f97785143d59fd4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20LORRAIN?= Date: Mon, 6 Dec 2021 10:45:22 +0100 Subject: [PATCH 45/74] Fix syntax --- openpype/hosts/maya/plugins/publish/collect_render.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_render.py b/openpype/hosts/maya/plugins/publish/collect_render.py index e26859ad93..788ed12b41 100644 --- a/openpype/hosts/maya/plugins/publish/collect_render.py +++ b/openpype/hosts/maya/plugins/publish/collect_render.py @@ -222,17 +222,18 @@ class CollectMayaRender(pyblish.api.ContextPlugin): full_exp_files = [] aov_dict = {} default_render_file = context.data.get('project_settings')\ - .get('maya')\ - .get('create')\ - .get('CreateRender')\ - .get('default_render_image_folder') + .get('maya')\ + .get('create')\ + .get('CreateRender')\ + .get('default_render_image_folder') # replace relative paths with absolute. Render products are # returned as list of dictionaries. publish_meta_path = None for aov in exp_files: full_paths = [] for file in aov[aov.keys()[0]]: - full_path = os.path.join(workspace, default_render_file, file) + full_path = os.path.join(workspace, default_render_file, + file) full_path = full_path.replace("\\", "/") full_paths.append(full_path) publish_meta_path = os.path.dirname(full_path) From 7e04079151479548daf15ec81768c454935c71d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20LORRAIN?= Date: Mon, 6 Dec 2021 14:07:01 +0100 Subject: [PATCH 46/74] Update error message --- .../hosts/maya/plugins/publish/validate_render_image_rule.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/validate_render_image_rule.py b/openpype/hosts/maya/plugins/publish/validate_render_image_rule.py index e892b239cc..a912431b55 100644 --- a/openpype/hosts/maya/plugins/publish/validate_render_image_rule.py +++ b/openpype/hosts/maya/plugins/publish/validate_render_image_rule.py @@ -30,7 +30,9 @@ class ValidateRenderImageRule(pyblish.api.InstancePlugin): .get('default_render_image_folder') assert get_file_rule("images") == default_render_file, ( - "Workspace's `images` file rule must be set to: renders" + "Workspace's `images` file rule must be set to: {}".format( + default_render_file + ) ) @classmethod From 04c50532bb440f0d7d005c124495153f9e20076c Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Mon, 6 Dec 2021 15:41:47 +0100 Subject: [PATCH 47/74] OP-2042 - added a functionality to run tests either with start.py or openpype_console --- openpype/pype_commands.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openpype/pype_commands.py b/openpype/pype_commands.py index ce1a9718b3..f01c6f0e42 100644 --- a/openpype/pype_commands.py +++ b/openpype/pype_commands.py @@ -366,12 +366,12 @@ class PypeCommands: pyargs_str = "--pyargs {}".format(pyargs) # disable warnings and show captured stdout even if success - args_str = "--disable-pytest-warnings -rP" + args = ["--disable-pytest-warnings", "-rP"] - cmd = "pytest {} {} {} {}".format(args_str, folder, - mark_str, pyargs_str) - print("Running {}".format(cmd)) - subprocess.run(cmd) + args += [folder, mark_str, pyargs_str] + print("run_tests args: {}".format(args)) + import pytest + pytest.main(args) def syncserver(self, active_site): """Start running sync_server in background.""" From 150f6efd08fcf5e1f83d25110c8b76c88b52856f Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Mon, 6 Dec 2021 17:00:28 +0100 Subject: [PATCH 48/74] OP-2042 - explicitly sort variants alphabetically --- openpype/lib/remote_publish.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/lib/remote_publish.py b/openpype/lib/remote_publish.py index d7db4d1ab9..976de048f6 100644 --- a/openpype/lib/remote_publish.py +++ b/openpype/lib/remote_publish.py @@ -2,6 +2,7 @@ import os from datetime import datetime import sys from bson.objectid import ObjectId +import collections import pyblish.util import pyblish.api @@ -140,7 +141,9 @@ def find_variant_key(application_manager, host): found_variant_key = None # finds most up-to-date variant if any installed - for variant_key, variant in app_group.variants.items(): + sorted_variants = collections.OrderedDict( + sorted(app_group.variants.items())) + for variant_key, variant in sorted_variants.items(): for executable in variant.executables: if executable.exists(): found_variant_key = variant_key From eda5ff6b91b48bec5e747754cc9f664e7e47c3a8 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Mon, 6 Dec 2021 17:28:02 +0100 Subject: [PATCH 49/74] OP-2042 - better format of asserts --- .../hosts/nuke/test_publish_in_nuke.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/integration/hosts/nuke/test_publish_in_nuke.py b/tests/integration/hosts/nuke/test_publish_in_nuke.py index fe1745299d..d603b9f177 100644 --- a/tests/integration/hosts/nuke/test_publish_in_nuke.py +++ b/tests/integration/hosts/nuke/test_publish_in_nuke.py @@ -24,7 +24,7 @@ class TestPublishInNuke(PublishTest): {OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests ../tests/integration/hosts/nuke # noqa: E501 """ - PERSIST = False # True - keep test_db, test_openpype, outputted test files + PERSIST = True # True - keep test_db, test_openpype, outputted test files TEST_FILES = [ ("1SUurHj2aiQ21ZIMJfGVBI2KjR8kIjBGI", "test_Nuke_publish.zip", "") @@ -67,8 +67,10 @@ class TestPublishInNuke(PublishTest): def test_db_asserts(self, dbcon, publish_finished): """Host and input data dependent expected results in DB.""" print("test_db_asserts") - assert 5 == dbcon.count_documents({"type": "version"}), \ - "Not expected no of versions" + versions = dbcon.count_documents({"type": "version"}) + assert 5 == versions, \ + "Not expected no of versions. "\ + "Expected 5, found {}".format(versions) assert 0 == dbcon.count_documents({"type": "version", "name": {"$ne": 1}}), \ @@ -86,10 +88,12 @@ class TestPublishInNuke(PublishTest): assert 10 == dbcon.count_documents({"type": "representation"}), \ "Not expected no of representations" - assert 1 == dbcon.count_documents({"type": "representation", + reprs = dbcon.count_documents({"type": "representation", "context.subset": "renderCompositingInNukeMain", # noqa: E501 - "context.ext": "exr"}), \ - "Not expected no of representations with ext 'exr'" + "context.ext": "exr"}) + assert 1 == reprs, \ + "Not expected no of representations with ext 'exr'."\ + "Expected 1, found {}".format(reprs) if __name__ == "__main__": From 4a93c6927d52b5f363a2c1ffb6130d84dc0613d5 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Mon, 6 Dec 2021 17:28:23 +0100 Subject: [PATCH 50/74] OP-2042 - added mention of possibility to trigger it via executables --- tests/integration/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/README.md b/tests/integration/README.md index aeed53d097..8839e2e43f 100644 --- a/tests/integration/README.md +++ b/tests/integration/README.md @@ -11,6 +11,9 @@ How to run - run in cmd `{OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests {OPENPYPE_ROOT}/tests/integration` - add `hosts/APP_NAME` after integration part to limit only on specific app (eg. `{OPENPYPE_ROOT}/tests/integration/hosts/maya`) + +OR can use built executables +`openpype_console runtests {ABS_PATH}/tests/integration` How to create test for publishing from host ------------------------------------------ From c0ad1b5d8b635d24ccb81ac69bc9e38544d6eec9 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 7 Dec 2021 11:01:55 +0100 Subject: [PATCH 51/74] OP-2042 - use existing value of env var OPENPYPE_DATABASE_NAME if possible For better automatic testing --- start.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/start.py b/start.py index 0f7e82071d..ae6aefe34e 100644 --- a/start.py +++ b/start.py @@ -925,7 +925,9 @@ def boot(): sys.exit(1) os.environ["OPENPYPE_MONGO"] = openpype_mongo - os.environ["OPENPYPE_DATABASE_NAME"] = "openpype" # name of Pype database + # name of Pype database + os.environ["OPENPYPE_DATABASE_NAME"] = \ + os.environ.get("OPENPYPE_DATABASE_NAME") or "openpype" _print(">>> run disk mapping command ...") run_disk_mapping_commands(openpype_mongo) From 709d0ee625dfad38b70590ee1804b0f376ce4a10 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 7 Dec 2021 11:02:16 +0100 Subject: [PATCH 52/74] OP-2042 - reset connection to openpype DB --- tests/lib/testing_classes.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/lib/testing_classes.py b/tests/lib/testing_classes.py index 15ab685739..0a04dc59c2 100644 --- a/tests/lib/testing_classes.py +++ b/tests/lib/testing_classes.py @@ -108,6 +108,14 @@ class ModuleUnitTest(BaseTest): import openpype openpype_root = os.path.dirname(os.path.dirname(openpype.__file__)) + + #reset connection to openpype DB with new env var + import openpype.settings.lib as sett_lib + sett_lib._SETTINGS_HANDLER = None + sett_lib._LOCAL_SETTINGS_HANDLER = None + sett_lib.create_settings_handler() + sett_lib.create_local_settings_handler() + # ?? why 2 of those monkeypatch_session.setenv("OPENPYPE_ROOT", openpype_root) monkeypatch_session.setenv("OPENPYPE_REPOS_ROOT", openpype_root) From 23ed14a3973316324e9cac2bdddd2d65ea31ab41 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 8 Dec 2021 11:41:02 +0100 Subject: [PATCH 53/74] OP-2042 - remove superfluous logging --- openpype/lib/path_tools.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openpype/lib/path_tools.py b/openpype/lib/path_tools.py index 6fd0ad0dfe..9bb0231ca7 100644 --- a/openpype/lib/path_tools.py +++ b/openpype/lib/path_tools.py @@ -307,7 +307,6 @@ class HostDirmap: mapping = {} if not project_settings["global"]["sync_server"]["enabled"]: - log.debug("Site Sync not enabled") return mapping from openpype.settings.lib import get_site_local_overrides From 04689e72c0d1e1a546f737aff18b3c52c221ae90 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 8 Dec 2021 12:42:17 +0100 Subject: [PATCH 54/74] flame: moving `utility_scripts` to api folder also with `scripts` @iLLiCiTiT suggestion --- openpype/hosts/flame/{ => api}/scripts/wiretap_com.py | 0 .../export_preset/openpype_seg_thumbnails_jpg.xml | 0 .../export_preset/openpype_seg_video_h264.xml | 0 .../openpype_flame_to_ftrack/modules/__init__.py | 0 .../openpype_flame_to_ftrack/modules/app_utils.py | 0 .../openpype_flame_to_ftrack/modules/ftrack_lib.py | 0 .../openpype_flame_to_ftrack/modules/panel_app.py | 0 .../openpype_flame_to_ftrack/modules/uiwidgets.py | 0 .../openpype_flame_to_ftrack/openpype_flame_to_ftrack.py | 0 .../hosts/flame/{ => api}/utility_scripts/openpype_in_flame.py | 0 openpype/hosts/flame/api/utils.py | 1 + openpype/hosts/flame/hooks/pre_flame_setup.py | 2 +- 12 files changed, 2 insertions(+), 1 deletion(-) rename openpype/hosts/flame/{ => api}/scripts/wiretap_com.py (100%) rename openpype/hosts/flame/{ => api}/utility_scripts/openpype_flame_to_ftrack/export_preset/openpype_seg_thumbnails_jpg.xml (100%) rename openpype/hosts/flame/{ => api}/utility_scripts/openpype_flame_to_ftrack/export_preset/openpype_seg_video_h264.xml (100%) rename openpype/hosts/flame/{ => api}/utility_scripts/openpype_flame_to_ftrack/modules/__init__.py (100%) rename openpype/hosts/flame/{ => api}/utility_scripts/openpype_flame_to_ftrack/modules/app_utils.py (100%) rename openpype/hosts/flame/{ => api}/utility_scripts/openpype_flame_to_ftrack/modules/ftrack_lib.py (100%) rename openpype/hosts/flame/{ => api}/utility_scripts/openpype_flame_to_ftrack/modules/panel_app.py (100%) rename openpype/hosts/flame/{ => api}/utility_scripts/openpype_flame_to_ftrack/modules/uiwidgets.py (100%) rename openpype/hosts/flame/{ => api}/utility_scripts/openpype_flame_to_ftrack/openpype_flame_to_ftrack.py (100%) rename openpype/hosts/flame/{ => api}/utility_scripts/openpype_in_flame.py (100%) diff --git a/openpype/hosts/flame/scripts/wiretap_com.py b/openpype/hosts/flame/api/scripts/wiretap_com.py similarity index 100% rename from openpype/hosts/flame/scripts/wiretap_com.py rename to openpype/hosts/flame/api/scripts/wiretap_com.py diff --git a/openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/export_preset/openpype_seg_thumbnails_jpg.xml b/openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/export_preset/openpype_seg_thumbnails_jpg.xml similarity index 100% rename from openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/export_preset/openpype_seg_thumbnails_jpg.xml rename to openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/export_preset/openpype_seg_thumbnails_jpg.xml diff --git a/openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/export_preset/openpype_seg_video_h264.xml b/openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/export_preset/openpype_seg_video_h264.xml similarity index 100% rename from openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/export_preset/openpype_seg_video_h264.xml rename to openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/export_preset/openpype_seg_video_h264.xml diff --git a/openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/modules/__init__.py b/openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/modules/__init__.py similarity index 100% rename from openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/modules/__init__.py rename to openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/modules/__init__.py diff --git a/openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/modules/app_utils.py b/openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/modules/app_utils.py similarity index 100% rename from openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/modules/app_utils.py rename to openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/modules/app_utils.py diff --git a/openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/modules/ftrack_lib.py b/openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/modules/ftrack_lib.py similarity index 100% rename from openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/modules/ftrack_lib.py rename to openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/modules/ftrack_lib.py diff --git a/openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/modules/panel_app.py b/openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/modules/panel_app.py similarity index 100% rename from openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/modules/panel_app.py rename to openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/modules/panel_app.py diff --git a/openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/modules/uiwidgets.py b/openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/modules/uiwidgets.py similarity index 100% rename from openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/modules/uiwidgets.py rename to openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/modules/uiwidgets.py diff --git a/openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/openpype_flame_to_ftrack.py b/openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/openpype_flame_to_ftrack.py similarity index 100% rename from openpype/hosts/flame/utility_scripts/openpype_flame_to_ftrack/openpype_flame_to_ftrack.py rename to openpype/hosts/flame/api/utility_scripts/openpype_flame_to_ftrack/openpype_flame_to_ftrack.py diff --git a/openpype/hosts/flame/utility_scripts/openpype_in_flame.py b/openpype/hosts/flame/api/utility_scripts/openpype_in_flame.py similarity index 100% rename from openpype/hosts/flame/utility_scripts/openpype_in_flame.py rename to openpype/hosts/flame/api/utility_scripts/openpype_in_flame.py diff --git a/openpype/hosts/flame/api/utils.py b/openpype/hosts/flame/api/utils.py index a750046362..201c7d2fac 100644 --- a/openpype/hosts/flame/api/utils.py +++ b/openpype/hosts/flame/api/utils.py @@ -27,6 +27,7 @@ def _sync_utility_scripts(env=None): fsd_paths = [os.path.join( HOST_DIR, + "api", "utility_scripts" )] diff --git a/openpype/hosts/flame/hooks/pre_flame_setup.py b/openpype/hosts/flame/hooks/pre_flame_setup.py index 718c4b574c..159fb37410 100644 --- a/openpype/hosts/flame/hooks/pre_flame_setup.py +++ b/openpype/hosts/flame/hooks/pre_flame_setup.py @@ -22,7 +22,7 @@ class FlamePrelaunch(PreLaunchHook): flame_python_exe = "/opt/Autodesk/python/2021/bin/python2.7" wtc_script_path = os.path.join( - opflame.HOST_DIR, "scripts", "wiretap_com.py") + opflame.HOST_DIR, "api", "scripts", "wiretap_com.py") def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) From 6ed4db4da11ae598c8e7ebf3fbf94dc434cfcd47 Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Wed, 8 Dec 2021 17:11:45 +0100 Subject: [PATCH 55/74] installand copy xcb libs to pyside2 inside openpype --- Dockerfile.centos7 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile.centos7 b/Dockerfile.centos7 index f3b257e66b..ce60ea7fb1 100644 --- a/Dockerfile.centos7 +++ b/Dockerfile.centos7 @@ -41,6 +41,8 @@ RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.n ncurses \ ncurses-devel \ qt5-qtbase-devel \ + xcb-util-wm \ + xcb-util-renderutil && yum clean all # we need to build our own patchelf @@ -92,7 +94,8 @@ RUN source $HOME/.bashrc \ RUN cp /usr/lib64/libffi* ./build/exe.linux-x86_64-3.7/lib \ && cp /usr/lib64/libssl* ./build/exe.linux-x86_64-3.7/lib \ && cp /usr/lib64/libcrypto* ./build/exe.linux-x86_64-3.7/lib \ - && cp /root/.pyenv/versions/${OPENPYPE_PYTHON_VERSION}/lib/libpython* ./build/exe.linux-x86_64-3.7/lib + && cp /root/.pyenv/versions/${OPENPYPE_PYTHON_VERSION}/lib/libpython* ./build/exe.linux-x86_64-3.7/lib \ + && cp /usr/lib64/libxcb* ./build/exe.linux-x86_64-3.7/vendor/python/PySide2/Qt/lib RUN cd /opt/openpype \ rm -rf ./vendor/bin From 9e2760c52e5e0a8964e2ed3f6c1bcb44976408eb Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 8 Dec 2021 18:10:46 +0100 Subject: [PATCH 56/74] OP-2042 - better handling of reusing deployed workfile --- .../hosts/nuke/test_publish_in_nuke.py | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/tests/integration/hosts/nuke/test_publish_in_nuke.py b/tests/integration/hosts/nuke/test_publish_in_nuke.py index d603b9f177..092fd7d1c6 100644 --- a/tests/integration/hosts/nuke/test_publish_in_nuke.py +++ b/tests/integration/hosts/nuke/test_publish_in_nuke.py @@ -1,6 +1,7 @@ import pytest import os import logging +import shutil from tests.lib.testing_classes import PublishTest @@ -23,6 +24,8 @@ class TestPublishInNuke(PublishTest): (in cmd with activated {OPENPYPE_ROOT}/.venv) {OPENPYPE_ROOT}/.venv/Scripts/python.exe {OPENPYPE_ROOT}/start.py runtests ../tests/integration/hosts/nuke # noqa: E501 + To check log/errors from launched app's publish process keep PERSIST + to True and check `test_openpype.logs` collection. """ PERSIST = True # True - keep test_db, test_openpype, outputted test files @@ -36,21 +39,32 @@ class TestPublishInNuke(PublishTest): TIMEOUT = 120 # publish timeout - TEST_DATA_FOLDER = None # provide existing folder with test data + TEST_DATA_FOLDER = "C:\\Users\\petrk\\AppData\\Local\\Temp\\tmpbfh976y6" # provide existing folder with test data @pytest.fixture(scope="module") def last_workfile_path(self, download_test_data): """Get last_workfile_path from source data. """ - log.info("log last_workfile_path") - src_path = os.path.join( - download_test_data, - "input", - "workfile", - "test_project_test_asset_CompositingInNuke_v001.nk") + source_file_name = "test_project_test_asset_CompositingInNuke_v001.nk" + src_path = os.path.join(download_test_data, + "input", + "workfile", + source_file_name) + dest_folder = os.path.join(download_test_data, + self.PROJECT, + self.ASSET, + "work", + self.TASK) + if not os.path.exists(dest_folder): + os.makedirs(dest_folder) - yield src_path + dest_path = os.path.join(dest_folder, + source_file_name) + + shutil.copy(src_path, dest_path) + + yield dest_path @pytest.fixture(scope="module") def startup_scripts(self, monkeypatch_session, download_test_data): @@ -68,9 +82,9 @@ class TestPublishInNuke(PublishTest): """Host and input data dependent expected results in DB.""" print("test_db_asserts") versions = dbcon.count_documents({"type": "version"}) - assert 5 == versions, \ + assert 2 == versions, \ "Not expected no of versions. "\ - "Expected 5, found {}".format(versions) + "Expected 2, found {}".format(versions) assert 0 == dbcon.count_documents({"type": "version", "name": {"$ne": 1}}), \ From a3638ef70ffc2c6d6bed9b8bf0126736f59b35fe Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 8 Dec 2021 18:12:01 +0100 Subject: [PATCH 57/74] OP-2042 - injection of TEST_SOURCE_FOLDER It tells Nuke where it should locate test input data --- tests/lib/testing_classes.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/lib/testing_classes.py b/tests/lib/testing_classes.py index 0a04dc59c2..25ad66cdfb 100644 --- a/tests/lib/testing_classes.py +++ b/tests/lib/testing_classes.py @@ -105,9 +105,6 @@ class ModuleUnitTest(BaseTest): value = value.format(**all_vars) print("Setting {}:{}".format(key, value)) monkeypatch_session.setenv(key, str(value)) - import openpype - - openpype_root = os.path.dirname(os.path.dirname(openpype.__file__)) #reset connection to openpype DB with new env var import openpype.settings.lib as sett_lib @@ -116,10 +113,16 @@ class ModuleUnitTest(BaseTest): sett_lib.create_settings_handler() sett_lib.create_local_settings_handler() + import openpype + openpype_root = os.path.dirname(os.path.dirname(openpype.__file__)) + # ?? why 2 of those monkeypatch_session.setenv("OPENPYPE_ROOT", openpype_root) monkeypatch_session.setenv("OPENPYPE_REPOS_ROOT", openpype_root) + # for remapping purposes (currently in Nuke) + monkeypatch_session.setenv("TEST_SOURCE_FOLDER", download_test_data) + @pytest.fixture(scope="module") def db_setup(self, download_test_data, env_var, monkeypatch_session): """Restore prepared MongoDB dumps into selected DB.""" @@ -271,7 +274,8 @@ class PublishTest(ModuleUnitTest): app_name = "{}/{}".format(self.APP, variant) - yield application_manager.launch(app_name, **data) + app_process = application_manager.launch(app_name, **data) + yield app_process @pytest.fixture(scope="module") def publish_finished(self, dbcon, launched_app, download_test_data): From e680a362b778943f9cfe80f18395c69c8c5ca8b2 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 8 Dec 2021 18:13:08 +0100 Subject: [PATCH 58/74] OP-2042 - additions to developer documentation --- tests/integration/README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/integration/README.md b/tests/integration/README.md index 8839e2e43f..0b6a1804ae 100644 --- a/tests/integration/README.md +++ b/tests/integration/README.md @@ -15,6 +15,10 @@ How to run OR can use built executables `openpype_console runtests {ABS_PATH}/tests/integration` +How to check logs/errors from app +-------------------------------- +Keep PERSIST to True in the class and check `test_openpype.logs` collection. + How to create test for publishing from host ------------------------------------------ - Extend PublishTest in `tests/lib/testing_classes.py` @@ -28,9 +32,21 @@ How to create test for publishing from host ``` import openpype from avalon import api, HOST + +from openpype.api import Logger + +log = Logger().get_logger(__name__) api.install(HOST) -pyblish.util.publish() +log_lines = [] +for result in pyblish.util.publish_iter(): + for record in result["records"]: # for logging to test_openpype DB + log_lines.append("{}: {}".format( + result["plugin"].label, record.msg)) + + if result["error"]: + err_fmt = "Failed {plugin.__name__}: {error} -- {error.traceback}" + log.error(err_fmt.format(**result)) EXIT_APP (command to exit host) ``` From 2f2116b4bda283fa9b8e20464a97fb8a3dd25fc7 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 9 Dec 2021 18:30:43 +0100 Subject: [PATCH 59/74] OP-2042 - added test_data_folder to command line --- openpype/cli.py | 8 ++++++-- openpype/pype_commands.py | 18 +++++++++--------- tests/integration/conftest.py | 12 ++++++++++++ tests/lib/testing_classes.py | 8 ++++---- 4 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 tests/integration/conftest.py diff --git a/openpype/cli.py b/openpype/cli.py index 4c4dc1a3c6..1f444006ca 100644 --- a/openpype/cli.py +++ b/openpype/cli.py @@ -356,9 +356,13 @@ def run(script): "--pyargs", help="Run tests from package", default=None) -def runtests(folder, mark, pyargs): +@click.option("-t", + "--test_data_folder", + help="Unzipped directory path of test file", + default=None) +def runtests(folder, mark, pyargs, test_data_folder): """Run all automatic tests after proper initialization via start.py""" - PypeCommands().run_tests(folder, mark, pyargs) + PypeCommands().run_tests(folder, mark, pyargs, test_data_folder) @main.command() diff --git a/openpype/pype_commands.py b/openpype/pype_commands.py index f01c6f0e42..7b3c799b3c 100644 --- a/openpype/pype_commands.py +++ b/openpype/pype_commands.py @@ -341,7 +341,7 @@ class PypeCommands: def validate_jsons(self): pass - def run_tests(self, folder, mark, pyargs): + def run_tests(self, folder, mark, pyargs, test_data_folder): """ Runs tests from 'folder' @@ -349,26 +349,26 @@ class PypeCommands: folder (str): relative path to folder with tests mark (str): label to run tests marked by it (slow etc) pyargs (str): package path to test + test_data_folder (str): url to unzipped folder of test data """ print("run_tests") - import subprocess - if folder: folder = " ".join(list(folder)) else: folder = "../tests" - mark_str = pyargs_str = '' + # disable warnings and show captured stdout even if success + args = ["--disable-pytest-warnings", "-rP", folder] + if mark: - mark_str = "-m {}".format(mark) + args.extend(["-m", mark]) if pyargs: - pyargs_str = "--pyargs {}".format(pyargs) + args.extend(["--pyargs", pyargs]) - # disable warnings and show captured stdout even if success - args = ["--disable-pytest-warnings", "-rP"] + if test_data_folder: + args.extend(["--test_data_folder", test_data_folder]) - args += [folder, mark_str, pyargs_str] print("run_tests args: {}".format(args)) import pytest pytest.main(args) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py new file mode 100644 index 0000000000..bc002e8f86 --- /dev/null +++ b/tests/integration/conftest.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +import pytest + +def pytest_addoption(parser): + parser.addoption( + "--test_data_folder", action="store", default=None, + help="Provide url of a folder of unzipped test file" + ) + +@pytest.fixture(scope="module") +def test_data_folder(request): + return request.config.getoption("--test_data_folder") \ No newline at end of file diff --git a/tests/lib/testing_classes.py b/tests/lib/testing_classes.py index 25ad66cdfb..541a92d15d 100644 --- a/tests/lib/testing_classes.py +++ b/tests/lib/testing_classes.py @@ -58,10 +58,10 @@ class ModuleUnitTest(BaseTest): m.undo() @pytest.fixture(scope="module") - def download_test_data(self): - if self.TEST_DATA_FOLDER: - print("Using existing folder {}".format(self.TEST_DATA_FOLDER)) - yield self.TEST_DATA_FOLDER + def download_test_data(self, test_data_folder): + if test_data_folder: + print("Using existing folder {}".format(test_data_folder)) + yield test_data_folder else: tmpdir = tempfile.mkdtemp() for test_file in self.TEST_FILES: From 53bbae2cbd1d19b25b6acbde3a0195aec58bfd2a Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 9 Dec 2021 18:34:40 +0100 Subject: [PATCH 60/74] OP-2042 - better error message in validator --- .../hosts/nuke/plugins/publish/validate_rendered_frames.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/nuke/plugins/publish/validate_rendered_frames.py b/openpype/hosts/nuke/plugins/publish/validate_rendered_frames.py index 29faf867d2..af5e8e9d27 100644 --- a/openpype/hosts/nuke/plugins/publish/validate_rendered_frames.py +++ b/openpype/hosts/nuke/plugins/publish/validate_rendered_frames.py @@ -67,7 +67,9 @@ class ValidateRenderedFrames(pyblish.api.InstancePlugin): if not repre.get("files"): msg = ("no frames were collected, " - "you need to render them") + "you need to render them.\n" + "Check properties of write node (group) and" + "select 'Local' option in 'Publish' dropdown.") self.log.error(msg) raise ValidationException(msg) From 06a8f5014023ec1c792263fc66eb82c15159f908 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 10 Dec 2021 13:46:08 +0100 Subject: [PATCH 61/74] OP-2042 - evaluate paths in write nodes Paths in write nodes could contain python code for automatic testing. It needs to be evaluated to all os operations to work properly. --- .../nuke/plugins/publish/extract_render_local.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/openpype/hosts/nuke/plugins/publish/extract_render_local.py b/openpype/hosts/nuke/plugins/publish/extract_render_local.py index bc7b41c733..50a5d01483 100644 --- a/openpype/hosts/nuke/plugins/publish/extract_render_local.py +++ b/openpype/hosts/nuke/plugins/publish/extract_render_local.py @@ -42,10 +42,14 @@ class NukeRenderLocal(openpype.api.Extractor): self.log.info("Start frame: {}".format(first_frame)) self.log.info("End frame: {}".format(last_frame)) + # write node url might contain nuke's ctl expressin + # as [python ...]/path... + path = node["file"].evaluate() + # Ensure output directory exists. - directory = os.path.dirname(node["file"].value()) - if not os.path.exists(directory): - os.makedirs(directory) + out_dir = os.path.dirname(path) + if not os.path.exists(out_dir): + os.makedirs(out_dir) # Render frames nuke.execute( @@ -58,15 +62,12 @@ class NukeRenderLocal(openpype.api.Extractor): if "slate" in families: first_frame += 1 - path = node['file'].value() - out_dir = os.path.dirname(path) ext = node["file_type"].value() if "representations" not in instance.data: instance.data["representations"] = [] collected_frames = os.listdir(out_dir) - if len(collected_frames) == 1: repre = { 'name': ext, From 00d9681d56e381169e47f6561a065ca9d2e4ea88 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 10 Dec 2021 13:47:55 +0100 Subject: [PATCH 62/74] OP-2042 - better cleanup of test DBs before start of test --- tests/lib/db_handler.py | 14 +++++++++++--- tests/lib/testing_classes.py | 6 ++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/lib/db_handler.py b/tests/lib/db_handler.py index 0aa4c69ca6..b181055012 100644 --- a/tests/lib/db_handler.py +++ b/tests/lib/db_handler.py @@ -112,9 +112,17 @@ class DBHandler: source 'db_name' """ db_name_out = db_name_out or db_name - if self._db_exists(db_name) and not overwrite: - raise RuntimeError("DB {} already exists".format(db_name_out) + - "Run with overwrite=True") + if self._db_exists(db_name_out): + if not overwrite: + raise RuntimeError("DB {} already exists".format(db_name_out) + + "Run with overwrite=True") + else: + if collection: + coll = self.client[db_name_out].get(collection) + if coll: + coll.drop() + else: + self.teardown(db_name_out) dir_path = os.path.join(dump_dir, db_name) if not os.path.exists(dir_path): diff --git a/tests/lib/testing_classes.py b/tests/lib/testing_classes.py index 541a92d15d..96e7148bff 100644 --- a/tests/lib/testing_classes.py +++ b/tests/lib/testing_classes.py @@ -130,10 +130,12 @@ class ModuleUnitTest(BaseTest): uri = os.environ.get("OPENPYPE_MONGO") db_handler = DBHandler(uri) - db_handler.setup_from_dump(self.TEST_DB_NAME, backup_dir, True, + db_handler.setup_from_dump(self.TEST_DB_NAME, backup_dir, + overwrite=True, db_name_out=self.TEST_DB_NAME) - db_handler.setup_from_dump("openpype", backup_dir, True, + db_handler.setup_from_dump("openpype", backup_dir, + overwrite=True, db_name_out=self.TEST_OPENPYPE_NAME) yield db_handler From 6e9c9c087cd5047c5f4d7e32b6019ce6a782df3d Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 10 Dec 2021 15:04:10 +0100 Subject: [PATCH 63/74] OP-2042 - adding persist, app_variant to cli --- openpype/cli.py | 13 +++++- openpype/pype_commands.py | 15 ++++++- tests/integration/conftest.py | 25 ++++++++++- .../hosts/nuke/test_publish_in_nuke.py | 15 ++++--- tests/lib/testing_classes.py | 45 ++++++++++++------- 5 files changed, 85 insertions(+), 28 deletions(-) diff --git a/openpype/cli.py b/openpype/cli.py index 1f444006ca..6b20fb5203 100644 --- a/openpype/cli.py +++ b/openpype/cli.py @@ -360,9 +360,18 @@ def run(script): "--test_data_folder", help="Unzipped directory path of test file", default=None) -def runtests(folder, mark, pyargs, test_data_folder): +@click.option("-s", + "--persist", + help="Persist test DB and published files after test end", + default=None) +@click.option("-a", + "--app_variant", + help="Provide specific app variant for test, empty for latest", + default=None) +def runtests(folder, mark, pyargs, test_data_folder, persist, app_variant): """Run all automatic tests after proper initialization via start.py""" - PypeCommands().run_tests(folder, mark, pyargs, test_data_folder) + PypeCommands().run_tests(folder, mark, pyargs, test_data_folder, + persist, app_variant) @main.command() diff --git a/openpype/pype_commands.py b/openpype/pype_commands.py index 7b3c799b3c..a6330bae1f 100644 --- a/openpype/pype_commands.py +++ b/openpype/pype_commands.py @@ -341,7 +341,8 @@ class PypeCommands: def validate_jsons(self): pass - def run_tests(self, folder, mark, pyargs, test_data_folder): + def run_tests(self, folder, mark, pyargs, + test_data_folder, persist, app_variant): """ Runs tests from 'folder' @@ -350,6 +351,10 @@ class PypeCommands: mark (str): label to run tests marked by it (slow etc) pyargs (str): package path to test test_data_folder (str): url to unzipped folder of test data + persist (bool): True if keep test db and published after test + end + app_variant (str): variant (eg 2020 for AE), empty if use + latest installed version """ print("run_tests") if folder: @@ -366,9 +371,15 @@ class PypeCommands: if pyargs: args.extend(["--pyargs", pyargs]) - if test_data_folder: + if persist: args.extend(["--test_data_folder", test_data_folder]) + if persist: + args.extend(["--persist", persist]) + + if app_variant: + args.extend(["--app_variant", app_variant]) + print("run_tests args: {}".format(args)) import pytest pytest.main(args) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index bc002e8f86..400c0dcc2a 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -1,12 +1,35 @@ # -*- coding: utf-8 -*- +# adds command line arguments for 'runtests' as a fixtures import pytest + def pytest_addoption(parser): parser.addoption( "--test_data_folder", action="store", default=None, help="Provide url of a folder of unzipped test file" ) + parser.addoption( + "--persist", action="store", default=None, + help="True - keep test_db, test_openpype, outputted test files" + ) + + parser.addoption( + "--app_variant", action="store", default=None, + help="Keep empty to locate latest installed variant or explicit" + ) + + @pytest.fixture(scope="module") def test_data_folder(request): - return request.config.getoption("--test_data_folder") \ No newline at end of file + return request.config.getoption("--test_data_folder") + + +@pytest.fixture(scope="module") +def persist(request): + return request.config.getoption("--persist") + + +@pytest.fixture(scope="module") +def app_variant(request): + return request.config.getoption("--app_variant") diff --git a/tests/integration/hosts/nuke/test_publish_in_nuke.py b/tests/integration/hosts/nuke/test_publish_in_nuke.py index 092fd7d1c6..a5a09bdd04 100644 --- a/tests/integration/hosts/nuke/test_publish_in_nuke.py +++ b/tests/integration/hosts/nuke/test_publish_in_nuke.py @@ -27,22 +27,23 @@ class TestPublishInNuke(PublishTest): To check log/errors from launched app's publish process keep PERSIST to True and check `test_openpype.logs` collection. """ - PERSIST = True # True - keep test_db, test_openpype, outputted test files - + # https://drive.google.com/file/d/1SUurHj2aiQ21ZIMJfGVBI2KjR8kIjBGI/view?usp=sharing # noqa: E501 TEST_FILES = [ ("1SUurHj2aiQ21ZIMJfGVBI2KjR8kIjBGI", "test_Nuke_publish.zip", "") ] APP = "nuke" - # keep empty to locate latest installed variant or explicit - APP_VARIANT = "" TIMEOUT = 120 # publish timeout - TEST_DATA_FOLDER = "C:\\Users\\petrk\\AppData\\Local\\Temp\\tmpbfh976y6" # provide existing folder with test data + # could be overwritten by command line arguments + # keep empty to locate latest installed variant or explicit + APP_VARIANT = "" + PERSIST = True # True - keep test_db, test_openpype, outputted test files + TEST_DATA_FOLDER = None @pytest.fixture(scope="module") - def last_workfile_path(self, download_test_data): + def last_workfile_path(self, download_test_data, output_folder_url): """Get last_workfile_path from source data. """ @@ -99,7 +100,7 @@ class TestPublishInNuke(PublishTest): "name": "workfileTest_task"}), \ "workfileTest_task subset must be present" - assert 10 == dbcon.count_documents({"type": "representation"}), \ + assert 4 == dbcon.count_documents({"type": "representation"}), \ "Not expected no of representations" reprs = dbcon.count_documents({"type": "representation", diff --git a/tests/lib/testing_classes.py b/tests/lib/testing_classes.py index 96e7148bff..40363e928f 100644 --- a/tests/lib/testing_classes.py +++ b/tests/lib/testing_classes.py @@ -7,6 +7,7 @@ import pytest import tempfile import shutil import glob +import platform from tests.lib.db_handler import DBHandler from tests.lib.file_handler import RemoteFileHandler @@ -58,7 +59,8 @@ class ModuleUnitTest(BaseTest): m.undo() @pytest.fixture(scope="module") - def download_test_data(self, test_data_folder): + def download_test_data(self, test_data_folder, persist=False): + test_data_folder = test_data_folder or self.TEST_DATA_FOLDER if test_data_folder: print("Using existing folder {}".format(test_data_folder)) yield test_data_folder @@ -78,7 +80,8 @@ class ModuleUnitTest(BaseTest): print("Temporary folder created:: {}".format(tmpdir)) yield tmpdir - if not self.PERSIST: + persist = persist or self.PERSIST + if not persist: print("Removing {}".format(tmpdir)) shutil.rmtree(tmpdir) @@ -188,14 +191,28 @@ class PublishTest(ModuleUnitTest): """ APP = "" - APP_VARIANT = "" # keep empty to locate latest installed variant TIMEOUT = 120 # publish timeout - @property - def app_name(self): - if self.APP_VARIANT: - return "{}/{}".format(self.APP, self.APP_VARIANT) + # could be overwritten by command line arguments + # command line value takes precedence + + # keep empty to locate latest installed variant or explicit + APP_VARIANT = "" + PERSIST = True # True - keep test_db, test_openpype, outputted test files + TEST_DATA_FOLDER = None # use specific folder of unzipped test file + + @pytest.fixture(scope="module") + def app_name(self, app_variant): + """Returns calculated value for ApplicationManager. Eg.(nuke/12-2)""" + from openpype.lib import ApplicationManager + app_variant = app_variant or self.APP_VARIANT + + application_manager = ApplicationManager() + if not app_variant: + app_variant = find_variant_key(application_manager, self.APP) + + yield "{}/{}".format(self.APP, app_variant) @pytest.fixture(scope="module") def last_workfile_path(self, download_test_data): @@ -203,6 +220,7 @@ class PublishTest(ModuleUnitTest): @pytest.fixture(scope="module") def startup_scripts(self, monkeypatch_session, download_test_data): + """"Adds init scripts (like userSetup) to expected location""" raise NotImplementedError @pytest.fixture(scope="module") @@ -270,12 +288,6 @@ class PublishTest(ModuleUnitTest): if app_args: data["app_args"] = app_args - variant = self.APP_VARIANT - if not variant: - variant = find_variant_key(application_manager, self.APP) - - app_name = "{}/{}".format(self.APP, variant) - app_process = application_manager.launch(app_name, **data) yield app_process @@ -295,13 +307,13 @@ class PublishTest(ModuleUnitTest): yield True def test_folder_structure_same(self, dbcon, publish_finished, - download_test_data): + download_test_data, output_folder_url): """Check if expected and published subfolders contain same files. Compares only presence, not size nor content! """ published_dir_base = download_test_data - published_dir = os.path.join(published_dir_base, + published_dir = os.path.join(output_folder_url, self.PROJECT, self.TASK, "**") @@ -311,7 +323,8 @@ class PublishTest(ModuleUnitTest): self.PROJECT, self.TASK, "**") - + print("Comparing published:'{}' : expected:'{}'".format(published_dir, + expected_dir)) published = set(f.replace(published_dir_base, '') for f in glob.glob(published_dir, recursive=True) if f != published_dir_base and os.path.exists(f)) From 9a0d55e2f3c6e07d1ccfffd3cd1f5f04669b15b7 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 10 Dec 2021 15:08:13 +0100 Subject: [PATCH 64/74] OP-2042 - added new fixture output_folder_url Explicitly sets directory of published files. (Purges them if exist!) --- .../hosts/maya/test_publish_in_maya.py | 4 ++-- .../hosts/nuke/test_publish_in_nuke.py | 2 +- .../photoshop/test_publish_in_photoshop.py | 4 ++-- tests/lib/testing_classes.py | 19 +++++++++++++++---- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/tests/integration/hosts/maya/test_publish_in_maya.py b/tests/integration/hosts/maya/test_publish_in_maya.py index 687e6fbc6e..5f3a550c6a 100644 --- a/tests/integration/hosts/maya/test_publish_in_maya.py +++ b/tests/integration/hosts/maya/test_publish_in_maya.py @@ -39,7 +39,7 @@ class TestPublishInMaya(PublishTest): TIMEOUT = 120 # publish timeout @pytest.fixture(scope="module") - def last_workfile_path(self, download_test_data): + def last_workfile_path(self, download_test_data, output_folder_url): """Get last_workfile_path from source data. Maya expects workfile in proper folder, so copy is done first. @@ -48,7 +48,7 @@ class TestPublishInMaya(PublishTest): "input", "workfile", "test_project_test_asset_TestTask_v001.mb") - dest_folder = os.path.join(download_test_data, + dest_folder = os.path.join(output_folder_url, self.PROJECT, self.ASSET, "work", diff --git a/tests/integration/hosts/nuke/test_publish_in_nuke.py b/tests/integration/hosts/nuke/test_publish_in_nuke.py index a5a09bdd04..797bc0a9d3 100644 --- a/tests/integration/hosts/nuke/test_publish_in_nuke.py +++ b/tests/integration/hosts/nuke/test_publish_in_nuke.py @@ -52,7 +52,7 @@ class TestPublishInNuke(PublishTest): "input", "workfile", source_file_name) - dest_folder = os.path.join(download_test_data, + dest_folder = os.path.join(output_folder_url, self.PROJECT, self.ASSET, "work", diff --git a/tests/integration/hosts/photoshop/test_publish_in_photoshop.py b/tests/integration/hosts/photoshop/test_publish_in_photoshop.py index c7f2399494..541552fedf 100644 --- a/tests/integration/hosts/photoshop/test_publish_in_photoshop.py +++ b/tests/integration/hosts/photoshop/test_publish_in_photoshop.py @@ -37,7 +37,7 @@ class TestPublishInPhotoshop(PublishTest): TIMEOUT = 120 # publish timeout @pytest.fixture(scope="module") - def last_workfile_path(self, download_test_data): + def last_workfile_path(self, download_test_data, output_folder_url): """Get last_workfile_path from source data. Maya expects workfile in proper folder, so copy is done first. @@ -46,7 +46,7 @@ class TestPublishInPhotoshop(PublishTest): "input", "workfile", "test_project_test_asset_TestTask_v001.psd") - dest_folder = os.path.join(download_test_data, + dest_folder = os.path.join(output_folder_url, self.PROJECT, self.ASSET, "work", diff --git a/tests/lib/testing_classes.py b/tests/lib/testing_classes.py index 40363e928f..ad637e6974 100644 --- a/tests/lib/testing_classes.py +++ b/tests/lib/testing_classes.py @@ -215,7 +215,17 @@ class PublishTest(ModuleUnitTest): yield "{}/{}".format(self.APP, app_variant) @pytest.fixture(scope="module") - def last_workfile_path(self, download_test_data): + def output_folder_url(self, download_test_data): + """Returns location of published data, cleans it first if exists.""" + path = os.path.join(download_test_data, "output") + if os.path.exists(path): + print("Purging {}".format(path)) + shutil.rmtree(path) + yield path + + @pytest.fixture(scope="module") + def last_workfile_path(self, download_test_data, output_folder_url): + """Returns url of workfile""" raise NotImplementedError @pytest.fixture(scope="module") @@ -251,15 +261,16 @@ class PublishTest(ModuleUnitTest): @pytest.fixture(scope="module") def launched_app(self, dbcon, download_test_data, last_workfile_path, - startup_scripts, app_args): + startup_scripts, app_args, app_name, output_folder_url): """Launch host app""" # set publishing folders - root_key = "config.roots.work.{}".format("windows") # TEMP + platform_str = platform.system().lower() + root_key = "config.roots.work.{}".format(platform_str) dbcon.update_one( {"type": "project"}, {"$set": { - root_key: download_test_data + root_key: output_folder_url }} ) From 09bbebae18bca1da746229963bc45cf2f48f8d32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20LORRAIN?= Date: Fri, 10 Dec 2021 15:14:03 +0100 Subject: [PATCH 65/74] Add settings to repair --- .../publish/validate_render_image_rule.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/validate_render_image_rule.py b/openpype/hosts/maya/plugins/publish/validate_render_image_rule.py index a912431b55..642ca9e25d 100644 --- a/openpype/hosts/maya/plugins/publish/validate_render_image_rule.py +++ b/openpype/hosts/maya/plugins/publish/validate_render_image_rule.py @@ -23,11 +23,7 @@ class ValidateRenderImageRule(pyblish.api.InstancePlugin): def process(self, instance): - default_render_file = instance.context.data.get('project_settings')\ - .get('maya') \ - .get('create') \ - .get('CreateRender') \ - .get('default_render_image_folder') + default_render_file = self.get_default_render_image_folder(instance) assert get_file_rule("images") == default_render_file, ( "Workspace's `images` file rule must be set to: {}".format( @@ -37,5 +33,14 @@ class ValidateRenderImageRule(pyblish.api.InstancePlugin): @classmethod def repair(cls, instance): - pm.workspace.fileRules["images"] = "renders" + default = cls.get_default_render_image_folder(instance) + pm.workspace.fileRules["images"] = default pm.system.Workspace.save() + + @staticmethod + def get_default_render_image_folder(instance): + return instance.context.data.get('project_settings')\ + .get('maya') \ + .get('create') \ + .get('CreateRender') \ + .get('default_render_image_folder') From c754521d0aa5ba0bed5baab997e3278224d7a602 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 10 Dec 2021 16:40:23 +0100 Subject: [PATCH 66/74] OP-2042 - added new handling of asserts Added DBAssert class which wraps standard use cases for asserts --- .../hosts/nuke/test_publish_in_nuke.py | 43 +++++++++--------- tests/lib/assert_classes.py | 45 +++++++++++++++++++ 2 files changed, 66 insertions(+), 22 deletions(-) create mode 100644 tests/lib/assert_classes.py diff --git a/tests/integration/hosts/nuke/test_publish_in_nuke.py b/tests/integration/hosts/nuke/test_publish_in_nuke.py index 797bc0a9d3..6b1088206a 100644 --- a/tests/integration/hosts/nuke/test_publish_in_nuke.py +++ b/tests/integration/hosts/nuke/test_publish_in_nuke.py @@ -4,6 +4,7 @@ import logging import shutil from tests.lib.testing_classes import PublishTest +from tests.lib.assert_classes import DBAssert log = logging.getLogger("test_publish_in_nuke") @@ -82,33 +83,31 @@ class TestPublishInNuke(PublishTest): def test_db_asserts(self, dbcon, publish_finished): """Host and input data dependent expected results in DB.""" print("test_db_asserts") - versions = dbcon.count_documents({"type": "version"}) - assert 2 == versions, \ - "Not expected no of versions. "\ - "Expected 2, found {}".format(versions) + failures = [] - assert 0 == dbcon.count_documents({"type": "version", - "name": {"$ne": 1}}), \ - "Only versions with 1 expected" + failures.append(DBAssert.count_of_types(dbcon, "version", 2)) - assert 1 == dbcon.count_documents({"type": "subset", - "name": "renderCompositingInNukeMain"} # noqa: E501 - ), \ - "renderCompositingInNukeMain subset must be present" + failures.append( + DBAssert.count_of_types(dbcon, "version", 0, name={"$ne": 1})) - assert 1 == dbcon.count_documents({"type": "subset", - "name": "workfileTest_task"}), \ - "workfileTest_task subset must be present" + failures.append( + DBAssert.count_of_types(dbcon, "subset", 1, + name="renderCompositingInNukeMain")) - assert 4 == dbcon.count_documents({"type": "representation"}), \ - "Not expected no of representations" + failures.append( + DBAssert.count_of_types(dbcon, "subset", 1, + name="workfileTest_task")) - reprs = dbcon.count_documents({"type": "representation", - "context.subset": "renderCompositingInNukeMain", # noqa: E501 - "context.ext": "exr"}) - assert 1 == reprs, \ - "Not expected no of representations with ext 'exr'."\ - "Expected 1, found {}".format(reprs) + failures.append( + DBAssert.count_of_types(dbcon, "representation", 4)) + + additional_args = {"context.subset": "renderCompositingInNukeMain", + "context.ext": "exr"} + failures.append( + DBAssert.count_of_types(dbcon, "representation", 1, + additional_args=additional_args)) + + assert not any(failures) if __name__ == "__main__": diff --git a/tests/lib/assert_classes.py b/tests/lib/assert_classes.py new file mode 100644 index 0000000000..7298853b67 --- /dev/null +++ b/tests/lib/assert_classes.py @@ -0,0 +1,45 @@ +"""Classed and methods for comparing expected and published items in DBs""" + +class DBAssert: + + @classmethod + def count_of_types(cls, dbcon, queried_type, expected, **kwargs): + """Queries 'dbcon' and counts documents of type 'queried_type' + + Args: + dbcon (AvalonMongoDB) + queried_type (str): type of document ("asset", "version"...) + expected (int): number of documents found + any number of additional keyword arguments + + special handling of argument additional_args (dict) + with additional args like + {"context.subset": "XXX"} + """ + args = {"type": queried_type} + for key, val in kwargs.items(): + if key == "additional_args": + args.update(val) + else: + args[key] = val + + msg = None + no_of_docs = dbcon.count_documents(args) + if expected != no_of_docs: + msg = "Not expected no of versions. "\ + "Expected {}, found {}".format(expected, no_of_docs) + + args.pop("type") + detail_str = " " + if args: + detail_str = " with {}".format(args) + + status = "successful" + if msg: + status = "failed" + + print("Comparing count of {}{} {}".format(queried_type, + detail_str, + status)) + + return msg From ec15b482dbfd38a0a4c18831f38009c900156632 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 10 Dec 2021 17:25:37 +0100 Subject: [PATCH 67/74] OP-2042 - added additional class wrapper per host --- tests/integration/hosts/maya/lib.py | 41 +++++++++++++++++ .../hosts/maya/test_publish_in_maya.py | 42 +----------------- tests/integration/hosts/nuke/lib.py | 44 +++++++++++++++++++ .../hosts/nuke/test_publish_in_nuke.py | 44 +------------------ tests/integration/hosts/photoshop/lib.py | 34 ++++++++++++++ .../photoshop/test_publish_in_photoshop.py | 35 +-------------- tests/lib/testing_classes.py | 23 +++++----- 7 files changed, 138 insertions(+), 125 deletions(-) create mode 100644 tests/integration/hosts/maya/lib.py create mode 100644 tests/integration/hosts/nuke/lib.py create mode 100644 tests/integration/hosts/photoshop/lib.py diff --git a/tests/integration/hosts/maya/lib.py b/tests/integration/hosts/maya/lib.py new file mode 100644 index 0000000000..f3a438c065 --- /dev/null +++ b/tests/integration/hosts/maya/lib.py @@ -0,0 +1,41 @@ +import os +import pytest +import shutil + +from tests.lib.testing_classes import HostFixtures + + +class MayaTestClass(HostFixtures): + @pytest.fixture(scope="module") + def last_workfile_path(self, download_test_data, output_folder_url): + """Get last_workfile_path from source data. + + Maya expects workfile in proper folder, so copy is done first. + """ + src_path = os.path.join(download_test_data, + "input", + "workfile", + "test_project_test_asset_TestTask_v001.mb") + dest_folder = os.path.join(output_folder_url, + self.PROJECT, + self.ASSET, + "work", + self.TASK) + os.makedirs(dest_folder) + dest_path = os.path.join(dest_folder, + "test_project_test_asset_TestTask_v001.mb") + shutil.copy(src_path, dest_path) + + yield dest_path + + @pytest.fixture(scope="module") + def startup_scripts(self, monkeypatch_session, download_test_data): + """Points Maya to userSetup file from input data""" + startup_path = os.path.join(download_test_data, + "input", + "startup") + original_pythonpath = os.environ.get("PYTHONPATH") + monkeypatch_session.setenv("PYTHONPATH", + "{}{}{}".format(startup_path, + os.pathsep, + original_pythonpath)) diff --git a/tests/integration/hosts/maya/test_publish_in_maya.py b/tests/integration/hosts/maya/test_publish_in_maya.py index 5f3a550c6a..68b0564428 100644 --- a/tests/integration/hosts/maya/test_publish_in_maya.py +++ b/tests/integration/hosts/maya/test_publish_in_maya.py @@ -1,11 +1,7 @@ -import pytest -import os -import shutil - -from tests.lib.testing_classes import PublishTest +from tests.integration.hosts.maya.lib import MayaTestClass -class TestPublishInMaya(PublishTest): +class TestPublishInMaya(MayaTestClass): """Basic test case for publishing in Maya Shouldnt be running standalone only via 'runtests' pype command! (??) @@ -38,40 +34,6 @@ class TestPublishInMaya(PublishTest): TIMEOUT = 120 # publish timeout - @pytest.fixture(scope="module") - def last_workfile_path(self, download_test_data, output_folder_url): - """Get last_workfile_path from source data. - - Maya expects workfile in proper folder, so copy is done first. - """ - src_path = os.path.join(download_test_data, - "input", - "workfile", - "test_project_test_asset_TestTask_v001.mb") - dest_folder = os.path.join(output_folder_url, - self.PROJECT, - self.ASSET, - "work", - self.TASK) - os.makedirs(dest_folder) - dest_path = os.path.join(dest_folder, - "test_project_test_asset_TestTask_v001.mb") - shutil.copy(src_path, dest_path) - - yield dest_path - - @pytest.fixture(scope="module") - def startup_scripts(self, monkeypatch_session, download_test_data): - """Points Maya to userSetup file from input data""" - startup_path = os.path.join(download_test_data, - "input", - "startup") - original_pythonpath = os.environ.get("PYTHONPATH") - monkeypatch_session.setenv("PYTHONPATH", - "{}{}{}".format(startup_path, - os.pathsep, - original_pythonpath)) - def test_db_asserts(self, dbcon, publish_finished): """Host and input data dependent expected results in DB.""" print("test_db_asserts") diff --git a/tests/integration/hosts/nuke/lib.py b/tests/integration/hosts/nuke/lib.py new file mode 100644 index 0000000000..d3c3d7ba81 --- /dev/null +++ b/tests/integration/hosts/nuke/lib.py @@ -0,0 +1,44 @@ +import os +import pytest +import shutil + +from tests.lib.testing_classes import HostFixtures + + +class NukeTestClass(HostFixtures): + @pytest.fixture(scope="module") + def last_workfile_path(self, download_test_data, output_folder_url): + """Get last_workfile_path from source data. + + """ + source_file_name = "test_project_test_asset_CompositingInNuke_v001.nk" + src_path = os.path.join(download_test_data, + "input", + "workfile", + source_file_name) + dest_folder = os.path.join(output_folder_url, + self.PROJECT, + self.ASSET, + "work", + self.TASK) + if not os.path.exists(dest_folder): + os.makedirs(dest_folder) + + dest_path = os.path.join(dest_folder, + source_file_name) + + shutil.copy(src_path, dest_path) + + yield dest_path + + @pytest.fixture(scope="module") + def startup_scripts(self, monkeypatch_session, download_test_data): + """Points Nuke to userSetup file from input data""" + startup_path = os.path.join(download_test_data, + "input", + "startup") + original_nuke_path = os.environ.get("NUKE_PATH", "") + monkeypatch_session.setenv("NUKE_PATH", + "{}{}{}".format(startup_path, + os.pathsep, + original_nuke_path)) \ No newline at end of file diff --git a/tests/integration/hosts/nuke/test_publish_in_nuke.py b/tests/integration/hosts/nuke/test_publish_in_nuke.py index 6b1088206a..884160e0b5 100644 --- a/tests/integration/hosts/nuke/test_publish_in_nuke.py +++ b/tests/integration/hosts/nuke/test_publish_in_nuke.py @@ -1,15 +1,12 @@ -import pytest -import os import logging -import shutil -from tests.lib.testing_classes import PublishTest from tests.lib.assert_classes import DBAssert +from tests.integration.hosts.nuke.lib import NukeTestClass log = logging.getLogger("test_publish_in_nuke") -class TestPublishInNuke(PublishTest): +class TestPublishInNuke(NukeTestClass): """Basic test case for publishing in Nuke Uses generic TestCase to prepare fixtures for test data, testing DBs, @@ -43,43 +40,6 @@ class TestPublishInNuke(PublishTest): PERSIST = True # True - keep test_db, test_openpype, outputted test files TEST_DATA_FOLDER = None - @pytest.fixture(scope="module") - def last_workfile_path(self, download_test_data, output_folder_url): - """Get last_workfile_path from source data. - - """ - source_file_name = "test_project_test_asset_CompositingInNuke_v001.nk" - src_path = os.path.join(download_test_data, - "input", - "workfile", - source_file_name) - dest_folder = os.path.join(output_folder_url, - self.PROJECT, - self.ASSET, - "work", - self.TASK) - if not os.path.exists(dest_folder): - os.makedirs(dest_folder) - - dest_path = os.path.join(dest_folder, - source_file_name) - - shutil.copy(src_path, dest_path) - - yield dest_path - - @pytest.fixture(scope="module") - def startup_scripts(self, monkeypatch_session, download_test_data): - """Points Nuke to userSetup file from input data""" - startup_path = os.path.join(download_test_data, - "input", - "startup") - original_nuke_path = os.environ.get("NUKE_PATH", "") - monkeypatch_session.setenv("NUKE_PATH", - "{}{}{}".format(startup_path, - os.pathsep, - original_nuke_path)) - def test_db_asserts(self, dbcon, publish_finished): """Host and input data dependent expected results in DB.""" print("test_db_asserts") diff --git a/tests/integration/hosts/photoshop/lib.py b/tests/integration/hosts/photoshop/lib.py new file mode 100644 index 0000000000..16ef2d3ae6 --- /dev/null +++ b/tests/integration/hosts/photoshop/lib.py @@ -0,0 +1,34 @@ +import os +import pytest +import shutil + +from tests.lib.testing_classes import HostFixtures + + +class PhotoshopTestClass(HostFixtures): + @pytest.fixture(scope="module") + def last_workfile_path(self, download_test_data, output_folder_url): + """Get last_workfile_path from source data. + + Maya expects workfile in proper folder, so copy is done first. + """ + src_path = os.path.join(download_test_data, + "input", + "workfile", + "test_project_test_asset_TestTask_v001.psd") + dest_folder = os.path.join(output_folder_url, + self.PROJECT, + self.ASSET, + "work", + self.TASK) + os.makedirs(dest_folder) + dest_path = os.path.join(dest_folder, + "test_project_test_asset_TestTask_v001.psd") + shutil.copy(src_path, dest_path) + + yield dest_path + + @pytest.fixture(scope="module") + def startup_scripts(self, monkeypatch_session, download_test_data): + """Points Maya to userSetup file from input data""" + pass diff --git a/tests/integration/hosts/photoshop/test_publish_in_photoshop.py b/tests/integration/hosts/photoshop/test_publish_in_photoshop.py index 541552fedf..ab07577b4a 100644 --- a/tests/integration/hosts/photoshop/test_publish_in_photoshop.py +++ b/tests/integration/hosts/photoshop/test_publish_in_photoshop.py @@ -1,11 +1,7 @@ -import pytest -import os -import shutil - -from tests.lib.testing_classes import PublishTest +from tests.integration.hosts.photoshop.lib import PhotoshopTestClass -class TestPublishInPhotoshop(PublishTest): +class TestPublishInPhotoshop(PhotoshopTestClass): """Basic test case for publishing in Photoshop Uses generic TestCase to prepare fixtures for test data, testing DBs, @@ -36,33 +32,6 @@ class TestPublishInPhotoshop(PublishTest): TIMEOUT = 120 # publish timeout - @pytest.fixture(scope="module") - def last_workfile_path(self, download_test_data, output_folder_url): - """Get last_workfile_path from source data. - - Maya expects workfile in proper folder, so copy is done first. - """ - src_path = os.path.join(download_test_data, - "input", - "workfile", - "test_project_test_asset_TestTask_v001.psd") - dest_folder = os.path.join(output_folder_url, - self.PROJECT, - self.ASSET, - "work", - self.TASK) - os.makedirs(dest_folder) - dest_path = os.path.join(dest_folder, - "test_project_test_asset_TestTask_v001.psd") - shutil.copy(src_path, dest_path) - - yield dest_path - - @pytest.fixture(scope="module") - def startup_scripts(self, monkeypatch_session, download_test_data): - """Points Maya to userSetup file from input data""" - pass - def test_db_asserts(self, dbcon, publish_finished): """Host and input data dependent expected results in DB.""" print("test_db_asserts") diff --git a/tests/lib/testing_classes.py b/tests/lib/testing_classes.py index ad637e6974..06922abc01 100644 --- a/tests/lib/testing_classes.py +++ b/tests/lib/testing_classes.py @@ -223,16 +223,6 @@ class PublishTest(ModuleUnitTest): shutil.rmtree(path) yield path - @pytest.fixture(scope="module") - def last_workfile_path(self, download_test_data, output_folder_url): - """Returns url of workfile""" - raise NotImplementedError - - @pytest.fixture(scope="module") - def startup_scripts(self, monkeypatch_session, download_test_data): - """"Adds init scripts (like userSetup) to expected location""" - raise NotImplementedError - @pytest.fixture(scope="module") def app_args(self, download_test_data): """Returns additional application arguments from a test file. @@ -345,3 +335,16 @@ class PublishTest(ModuleUnitTest): not_matched = expected.difference(published) assert not not_matched, "Missing {} files".format(not_matched) + + +class HostFixtures(PublishTest): + """Host specific fixtures. Should be implemented once per host.""" + @pytest.fixture(scope="module") + def last_workfile_path(self, download_test_data, output_folder_url): + """Returns url of workfile""" + raise NotImplementedError + + @pytest.fixture(scope="module") + def startup_scripts(self, monkeypatch_session, download_test_data): + """"Adds init scripts (like userSetup) to expected location""" + raise NotImplementedError \ No newline at end of file From ea034447ed88285f52e1d7466bdfa4d26b82bed3 Mon Sep 17 00:00:00 2001 From: OpenPype Date: Sat, 11 Dec 2021 03:41:14 +0000 Subject: [PATCH 68/74] [Automated] Bump version --- CHANGELOG.md | 6 +++--- openpype/version.py | 2 +- pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a38bbf7af..860e26c59c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [3.7.0-nightly.6](https://github.com/pypeclub/OpenPype/tree/HEAD) +## [3.7.0-nightly.7](https://github.com/pypeclub/OpenPype/tree/HEAD) [Full Changelog](https://github.com/pypeclub/OpenPype/compare/3.6.4...HEAD) @@ -30,6 +30,7 @@ - General: Reduce vendor imports [\#2305](https://github.com/pypeclub/OpenPype/pull/2305) - Tools: Cleanup of unused classes [\#2304](https://github.com/pypeclub/OpenPype/pull/2304) - Project Manager: Added ability to delete project [\#2298](https://github.com/pypeclub/OpenPype/pull/2298) +- Ftrack: Synchronize input links [\#2287](https://github.com/pypeclub/OpenPype/pull/2287) - Nuke: extract baked review videos presets [\#2248](https://github.com/pypeclub/OpenPype/pull/2248) **🐛 Bug fixes** @@ -93,7 +94,6 @@ - Tools: Assets widget [\#2265](https://github.com/pypeclub/OpenPype/pull/2265) - SceneInventory: Choose loader in asset switcher [\#2262](https://github.com/pypeclub/OpenPype/pull/2262) - Style: New fonts in OpenPype style [\#2256](https://github.com/pypeclub/OpenPype/pull/2256) -- Tools: SceneInventory in OpenPype [\#2255](https://github.com/pypeclub/OpenPype/pull/2255) - Tools: Tasks widget [\#2251](https://github.com/pypeclub/OpenPype/pull/2251) - Tools: Creator in OpenPype [\#2244](https://github.com/pypeclub/OpenPype/pull/2244) @@ -121,8 +121,8 @@ **🚀 Enhancements** +- Tools: SceneInventory in OpenPype [\#2255](https://github.com/pypeclub/OpenPype/pull/2255) - Tools: Subset manager in OpenPype [\#2243](https://github.com/pypeclub/OpenPype/pull/2243) -- General: Skip module directories without init file [\#2239](https://github.com/pypeclub/OpenPype/pull/2239) **🐛 Bug fixes** diff --git a/openpype/version.py b/openpype/version.py index 8909c5edac..95cd7a285f 100644 --- a/openpype/version.py +++ b/openpype/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring Pype version.""" -__version__ = "3.7.0-nightly.6" +__version__ = "3.7.0-nightly.7" diff --git a/pyproject.toml b/pyproject.toml index 0b2176d277..d994569fa7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "OpenPype" -version = "3.7.0-nightly.6" # OpenPype +version = "3.7.0-nightly.7" # OpenPype description = "Open VFX and Animation pipeline with support." authors = ["OpenPype Team "] license = "MIT License" From c78d4d89a4a36b7987b0ba7d7fc175a282cf0593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20LORRAIN?= Date: Mon, 13 Dec 2021 10:45:30 +0100 Subject: [PATCH 69/74] Handle message type attribute --- openpype/hosts/maya/plugins/publish/collect_look.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openpype/hosts/maya/plugins/publish/collect_look.py b/openpype/hosts/maya/plugins/publish/collect_look.py index 20a9d4ca12..0ab278772e 100644 --- a/openpype/hosts/maya/plugins/publish/collect_look.py +++ b/openpype/hosts/maya/plugins/publish/collect_look.py @@ -489,6 +489,8 @@ class CollectLook(pyblish.api.InstancePlugin): if not cmds.attributeQuery(attr, node=node, exists=True): continue attribute = "{}.{}".format(node, attr) + if cmds.getAttr(attribute, type=True) == "message": + continue node_attributes[attr] = cmds.getAttr(attribute) attributes.append({"name": node, From daa8eb532a2428d93376cf67a591c89319f9ac9d Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Mon, 13 Dec 2021 11:49:19 +0100 Subject: [PATCH 70/74] OP-2042 - fix tested output path --- tests/lib/testing_classes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/lib/testing_classes.py b/tests/lib/testing_classes.py index 06922abc01..fa467acf9c 100644 --- a/tests/lib/testing_classes.py +++ b/tests/lib/testing_classes.py @@ -316,12 +316,14 @@ class PublishTest(ModuleUnitTest): published_dir_base = download_test_data published_dir = os.path.join(output_folder_url, self.PROJECT, + self.ASSET, self.TASK, "**") expected_dir_base = os.path.join(published_dir_base, "expected") expected_dir = os.path.join(expected_dir_base, self.PROJECT, + self.ASSET, self.TASK, "**") print("Comparing published:'{}' : expected:'{}'".format(published_dir, From fed3013703b944142bc5f084b23b0705fbd0aaa0 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 13 Dec 2021 12:37:33 +0100 Subject: [PATCH 71/74] fix changed state of wrapper label --- openpype/style/style.css | 57 +++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/openpype/style/style.css b/openpype/style/style.css index 19245cdc40..81aa70ea62 100644 --- a/openpype/style/style.css +++ b/openpype/style/style.css @@ -1044,16 +1044,45 @@ QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { color: {color:settings:label-fg}; } #SettingsLabel:hover {color: {color:settings:label-fg-hover};} -#SettingsLabel[state="studio"] {color: {color:settings:studio-light};} -#SettingsLabel[state="studio"]:hover {color: {color:settings:studio-label-hover};} -#SettingsLabel[state="modified"] {color: {color:settings:modified-mid};} -#SettingsLabel[state="modified"]:hover {color: {color:settings:modified-light};} -#SettingsLabel[state="overriden-modified"] {color: {color:settings:modified-mid};} -#SettingsLabel[state="overriden-modified"]:hover {color: {color:settings:modified-light};} -#SettingsLabel[state="overriden"] {color: {color:settings:project-mid};} -#SettingsLabel[state="overriden"]:hover {color: {color:settings:project-light};} -#SettingsLabel[state="invalid"] {color:{color:settings:invalid-dark};} -#SettingsLabel[state="invalid"]:hover {color: {color:settings:invalid-dark};} + +#ExpandLabel { + font-weight: bold; + color: {color:settings:label-fg}; +} +#ExpandLabel:hover { + color: {color:settings:label-fg-hover}; +} + +#ExpandLabel[state="studio"], #SettingsLabel[state="studio"] { + color: {color:settings:studio-light}; +} +#ExpandLabel[state="studio"]:hover, #SettingsLabel[state="studio"]:hover { + color: {color:settings:studio-label-hover}; +} +#ExpandLabel[state="modified"], #SettingsLabel[state="modified"] { + color: {color:settings:modified-mid}; +} +#ExpandLabel[state="modified"]:hover, #SettingsLabel[state="modified"]:hover { + color: {color:settings:modified-light}; +} +#ExpandLabel[state="overriden-modified"], #SettingsLabel[state="overriden-modified"] { + color: {color:settings:modified-mid}; +} +#ExpandLabel[state="overriden-modified"]:hover, #SettingsLabel[state="overriden-modified"]:hover { + color: {color:settings:modified-light}; +} +#ExpandLabel[state="overriden"], #SettingsLabel[state="overriden"] {color: { + color:settings:project-mid}; +} +#ExpandLabel[state="overriden"]:hover, #SettingsLabel[state="overriden"]:hover { + color: {color:settings:project-light}; +} +#ExpandLabel[state="invalid"], #SettingsLabel[state="invalid"] { + color:{color:settings:invalid-dark}; +} +#ExpandLabel[state="invalid"]:hover, #SettingsLabel[state="invalid"]:hover { + color: {color:settings:invalid-dark}; +} /* TODO Replace these with explicit widget types if possible */ #SettingsMainWidget QWidget[input-state="modified"] { @@ -1085,14 +1114,6 @@ QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { #DictKey[state="modified"] {border-color: {color:settings:modified-mid};} #DictKey[state="invalid"] {border-color: {color:settings:invalid-dark};} -#ExpandLabel { - font-weight: bold; - color: {color:settings:label-fg}; -} -#ExpandLabel:hover { - color: {color:settings:label-fg-hover}; -} - #ContentWidget { background-color: transparent; } From 590f19e96f0b6a903cb760157a50ed55f0a782c3 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 13 Dec 2021 12:44:37 +0100 Subject: [PATCH 72/74] fixed typo --- openpype/style/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/style/style.css b/openpype/style/style.css index 81aa70ea62..4159fe1676 100644 --- a/openpype/style/style.css +++ b/openpype/style/style.css @@ -1071,8 +1071,8 @@ QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { #ExpandLabel[state="overriden-modified"]:hover, #SettingsLabel[state="overriden-modified"]:hover { color: {color:settings:modified-light}; } -#ExpandLabel[state="overriden"], #SettingsLabel[state="overriden"] {color: { - color:settings:project-mid}; +#ExpandLabel[state="overriden"], #SettingsLabel[state="overriden"] { + color: {color:settings:project-mid}; } #ExpandLabel[state="overriden"]:hover, #SettingsLabel[state="overriden"]:hover { color: {color:settings:project-light}; From ebbd43bd5fd6d587f6e88558df5512d8c9e971d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= <33513211+antirotor@users.noreply.github.com> Date: Tue, 14 Dec 2021 13:46:34 +0100 Subject: [PATCH 73/74] Update Dockerfile.centos7 Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- Dockerfile.centos7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.centos7 b/Dockerfile.centos7 index ce60ea7fb1..736a42663c 100644 --- a/Dockerfile.centos7 +++ b/Dockerfile.centos7 @@ -42,7 +42,7 @@ RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.n ncurses-devel \ qt5-qtbase-devel \ xcb-util-wm \ - xcb-util-renderutil + xcb-util-renderutil \ && yum clean all # we need to build our own patchelf From b57a09b430a8dd1e09db2fa97cf37685b0ca9aa8 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 14 Dec 2021 15:16:48 +0100 Subject: [PATCH 74/74] OP-2019 - revert unwanted commit --- openpype/hooks/pre_foundry_apps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hooks/pre_foundry_apps.py b/openpype/hooks/pre_foundry_apps.py index 70554cbedb..85f68c6b60 100644 --- a/openpype/hooks/pre_foundry_apps.py +++ b/openpype/hooks/pre_foundry_apps.py @@ -13,7 +13,7 @@ class LaunchFoundryAppsWindows(PreLaunchHook): # Should be as last hook because must change launch arguments to string order = 1000 - app_groups = ["nuke", "nukex", "hiero", "nukestudio", "aftereffects"] + app_groups = ["nuke", "nukex", "hiero", "nukestudio"] platforms = ["windows"] def execute(self):