From daea1fae80b6f9df4dd88125531ee1a69e3900d3 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Mon, 17 Feb 2025 16:33:29 +0100 Subject: [PATCH 1/7] Add unit tests as part of CI/CD --- .github/workflows/pr_unittests.yaml | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pr_unittests.yaml diff --git a/.github/workflows/pr_unittests.yaml b/.github/workflows/pr_unittests.yaml new file mode 100644 index 0000000000..a701180133 --- /dev/null +++ b/.github/workflows/pr_unittests.yaml @@ -0,0 +1,31 @@ +name: 📇 Code Linting + +on: + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number}} + cancel-in-progress: true + +permissions: + contents: read + pull-requests: write + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.9' + - name: Install requirements + run: ./tools/manage.sh create-env + - name: Run tests + run: ./tools/manage.sh run-tests From 5ee08a10dc64bf561cf6f1b811dd4f31d4630ea2 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Mon, 17 Feb 2025 16:34:32 +0100 Subject: [PATCH 2/7] Add unit tests as part of CI/CD --- .github/workflows/pr_unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_unittests.yaml b/.github/workflows/pr_unittests.yaml index a701180133..424135785c 100644 --- a/.github/workflows/pr_unittests.yaml +++ b/.github/workflows/pr_unittests.yaml @@ -1,4 +1,4 @@ -name: 📇 Code Linting +name: Run Unit Tests on: push: From 901ec4673824e23902e2212a142d96700903288c Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Mon, 17 Feb 2025 16:37:55 +0100 Subject: [PATCH 3/7] Change emoji. --- .github/workflows/pr_unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_unittests.yaml b/.github/workflows/pr_unittests.yaml index 424135785c..9dcb1f301f 100644 --- a/.github/workflows/pr_unittests.yaml +++ b/.github/workflows/pr_unittests.yaml @@ -1,4 +1,4 @@ -name: Run Unit Tests +name: 💯 Run Unit Tests on: push: From df95e252fa18b9e3d068357506c73023c6373a2d Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Wed, 26 Feb 2025 11:09:25 +0100 Subject: [PATCH 4/7] Add SXR support for image extension. --- client/ayon_core/lib/transcoding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/lib/transcoding.py b/client/ayon_core/lib/transcoding.py index e9750864ac..1fda014bd8 100644 --- a/client/ayon_core/lib/transcoding.py +++ b/client/ayon_core/lib/transcoding.py @@ -53,7 +53,7 @@ IMAGE_EXTENSIONS = { ".kra", ".logluv", ".mng", ".miff", ".nrrd", ".ora", ".pam", ".pbm", ".pgm", ".ppm", ".pnm", ".pcx", ".pgf", ".pictor", ".png", ".psd", ".psb", ".psp", ".qtvr", - ".ras", ".rgbe", ".sgi", ".tga", + ".ras", ".rgbe", ".sgi", ".sxr", ".tga", ".tif", ".tiff", ".tiff/ep", ".tiff/it", ".ufo", ".ufp", ".wbmp", ".webp", ".xr", ".xt", ".xbm", ".xcf", ".xpm", ".xwd" } From d519d284a4f35b593ac38352e0b3220f7e891a78 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Thu, 27 Feb 2025 09:54:53 +0100 Subject: [PATCH 5/7] Change icon. --- .github/workflows/pr_unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_unittests.yaml b/.github/workflows/pr_unittests.yaml index 9dcb1f301f..811843d5e3 100644 --- a/.github/workflows/pr_unittests.yaml +++ b/.github/workflows/pr_unittests.yaml @@ -1,4 +1,4 @@ -name: 💯 Run Unit Tests +name: 🧐 Run Unit Tests on: push: From 8bf17b8e52434ffaa8dfa84c3f622af1281f8899 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Tue, 4 Mar 2025 20:15:25 +0200 Subject: [PATCH 6/7] remove usage of a deprecated tag: `thumb-nuke` --- client/ayon_core/plugins/publish/extract_thumbnail.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/ayon_core/plugins/publish/extract_thumbnail.py b/client/ayon_core/plugins/publish/extract_thumbnail.py index bd2f7eb0ae..da429c1cd2 100644 --- a/client/ayon_core/plugins/publish/extract_thumbnail.py +++ b/client/ayon_core/plugins/publish/extract_thumbnail.py @@ -343,8 +343,7 @@ class ExtractThumbnail(pyblish.api.InstancePlugin): # to be published locally continue - valid = "review" in tags or "thumb-nuke" in tags - if not valid: + if "review" not in tags: continue if not repre.get("files"): From 1f415d66e3fb3461ab802be275373aaa4437767a Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 5 Mar 2025 00:51:46 +0100 Subject: [PATCH 7/7] Allow setting the default USD Contribution enabled state per profile in settings --- .../publish/extract_usd_layer_contributions.py | 3 ++- server/settings/publish_plugins.py | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py b/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py index a2698b03de..ec1fddc6b1 100644 --- a/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py +++ b/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py @@ -479,6 +479,7 @@ class CollectUSDLayerContributions(pyblish.api.InstancePlugin, profile = {} # Define defaults + default_enabled = profile.get("contribution_enabled", True) default_contribution_layer = profile.get( "contribution_layer", None) default_apply_as_variant = profile.get( @@ -513,7 +514,7 @@ class CollectUSDLayerContributions(pyblish.api.InstancePlugin, "In both cases the USD data itself is free to have " "references and sublayers of its own." ), - default=True), + default=default_enabled), TextDef("contribution_target_product", label="Target product", tooltip=( diff --git a/server/settings/publish_plugins.py b/server/settings/publish_plugins.py index d10a6b7507..c9c66e65d9 100644 --- a/server/settings/publish_plugins.py +++ b/server/settings/publish_plugins.py @@ -91,6 +91,15 @@ class CollectUSDLayerContributionsProfileModel(BaseSettingsModel): " creating from within that task type." ), ) + contribution_enabled: bool = SettingsField( + True, + title="Contribution Enabled (default)", + description=( + "The default state for USD Contribution being marked enabled or" + " disabled for this profile." + ), + section="Instance attribute defaults", + ) contribution_layer: str = SettingsField( "", title="Contribution Department Layer", @@ -99,7 +108,6 @@ class CollectUSDLayerContributionsProfileModel(BaseSettingsModel): " matching this profile. The layer name should be in the" " 'Department Layer Orders' list to get a sensible order." ), - section="Instance attribute defaults", ) contribution_apply_as_variant: bool = SettingsField( True, @@ -1082,6 +1090,7 @@ DEFAULT_PUBLISH_VALUES = { { "product_types": ["model"], "task_types": [], + "contribution_enabled": True, "contribution_layer": "model", "contribution_apply_as_variant": True, "contribution_target_product": "usdAsset" @@ -1089,6 +1098,7 @@ DEFAULT_PUBLISH_VALUES = { { "product_types": ["look"], "task_types": [], + "contribution_enabled": True, "contribution_layer": "look", "contribution_apply_as_variant": True, "contribution_target_product": "usdAsset" @@ -1096,6 +1106,7 @@ DEFAULT_PUBLISH_VALUES = { { "product_types": ["groom"], "task_types": [], + "contribution_enabled": True, "contribution_layer": "groom", "contribution_apply_as_variant": True, "contribution_target_product": "usdAsset" @@ -1103,6 +1114,7 @@ DEFAULT_PUBLISH_VALUES = { { "product_types": ["rig"], "task_types": [], + "contribution_enabled": True, "contribution_layer": "rig", "contribution_apply_as_variant": True, "contribution_target_product": "usdAsset" @@ -1110,6 +1122,7 @@ DEFAULT_PUBLISH_VALUES = { { "product_types": ["usd"], "task_types": [], + "contribution_enabled": True, "contribution_layer": "assembly", "contribution_apply_as_variant": False, "contribution_target_product": "usdShot"