Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
c97d081
:wrench: WIP: add hero version integrator for trait-based reps
antirotor Mar 2, 2026
356dc62
:wrench: use entities from server
antirotor Mar 5, 2026
9cf048c
:recycle: reshuffle code to make it available elsewhere
antirotor Mar 12, 2026
489ddfb
Merge remote-tracking branch 'origin/develop' into 1685-yn-0470-integ…
antirotor Mar 20, 2026
8bfa33f
Merge remote-tracking branch 'origin/1685-yn-0470-integrating-hero-ve…
antirotor Mar 22, 2026
336ab66
:alembic: fix tests
antirotor Mar 22, 2026
4d142f4
Merge branch 'develop' into 1685-yn-0470-integrating-hero-version-not…
antirotor Mar 23, 2026
4f15ada
:alembic: fix tests
antirotor Mar 23, 2026
756d977
:alembic: add more tests and create the entities
antirotor Mar 26, 2026
4aa7408
:dog: fix linter issues
antirotor Mar 27, 2026
fe9b589
:fire: remove failing test until it can be properly mocked
antirotor Mar 27, 2026
8acc917
Merge branch 'develop' into 1685-yn-0470-integrating-hero-version-not…
antirotor Mar 27, 2026
4f1133f
Merge branch 'develop' into 1685-yn-0470-integrating-hero-version-not…
antirotor Mar 30, 2026
4eb1373
:fire: remove unused logging
antirotor Mar 30, 2026
bf87104
:recycle: remove changes
antirotor Mar 30, 2026
bc71d3f
🤖 fix indents
antirotor Mar 30, 2026
08e209a
:fire: remove unused padding calculations
antirotor Mar 30, 2026
6324ca0
:bug: fix settings category typo
antirotor Mar 30, 2026
271ef57
🤖 restore default behavior
antirotor Mar 30, 2026
d8982c4
:bug: fix docstring
antirotor Mar 30, 2026
2b9cf1a
:recycle: :memo: remove stub function and complete docstring
antirotor Mar 30, 2026
4e0e094
🤖 implement AI suggestions
antirotor Mar 30, 2026
d101c33
:bug: fix placeholder usage
antirotor Mar 30, 2026
b82419f
Merge remote-tracking branch 'origin/develop' into 1685-yn-0470-integ…
antirotor Apr 10, 2026
49a7680
rename 'RootItem' to 'AnatomyRoot'
iLLiCiTiT May 21, 2026
08465c7
use new class name in anatomy public api
iLLiCiTiT May 21, 2026
1a606d7
prepare publish template once
iLLiCiTiT May 21, 2026
a43835c
added preferred root for representation files information logic
iLLiCiTiT May 21, 2026
5bda8e2
fix whitespace
iLLiCiTiT May 21, 2026
25aea00
Merge remote-tracking branch 'origin/develop' into 1685-yn-0470-integ…
antirotor May 21, 2026
205db3e
Merge remote-tracking branch 'origin/develop' into 1685-yn-0470-integ…
antirotor May 26, 2026
4792b1e
refactor: implement code review suggestions part 1
antirotor Jun 1, 2026
6f212a7
Merge branch 'develop' into 1685-yn-0470-integrating-hero-version-not…
antirotor Jun 1, 2026
1c531ff
:bug: fix linter issues and obsolete ruff CI argument
antirotor Jun 1, 2026
19d0436
Merge remote-tracking branch 'origin/1685-yn-0470-integrating-hero-ve…
antirotor Jun 1, 2026
8b679b3
fix: add future, collect files in one folder
antirotor Jun 1, 2026
1000a9c
bug: remove duplicity, move enhanced function to lib only
antirotor Jun 1, 2026
d9fc253
fix: remove unused imports
antirotor Jun 1, 2026
d3a9053
docs: update docstring
antirotor Jun 1, 2026
5abc2c4
fix: update trait path on integration
antirotor Jun 1, 2026
cfe4ce0
Merge branch 'develop' into 1685-yn-0470-integrating-hero-version-not…
antirotor Jun 1, 2026
ea17885
Merge branch 'develop' into 1685-yn-0470-integrating-hero-version-not…
antirotor Jun 3, 2026
13ceae5
Merge branch 'develop' into 1685-yn-0470-integrating-hero-version-not…
antirotor Jun 5, 2026
3fe545f
Merge branch 'develop' into enhancement/repre-rootless-paths
BigRoy Jun 6, 2026
b191e48
fix typo
iLLiCiTiT Jun 8, 2026
b4843e8
Merge remote-tracking branch 'origin/develop' into 1685-yn-0470-integ…
antirotor Jun 8, 2026
5d711a2
Merge remote-tracking branch 'origin/1685-yn-0470-integrating-hero-ve…
antirotor Jun 8, 2026
db14f5e
Merge branch 'develop' into 1685-yn-0470-integrating-hero-version-not…
antirotor Jun 12, 2026
210eff4
[Automated] Add generated package files from main
ynbot Jun 16, 2026
f77fd68
[Automated] Update version in package.py for develop
ynbot Jun 16, 2026
b737a51
chore(): update bug report / version
github-actions[bot] Jun 16, 2026
bcd46d2
Merge branch 'develop' into 1685-yn-0470-integrating-hero-version-not…
antirotor Jun 17, 2026
982a3ce
MK Docs: Refactor the title
MustafaJafar Jun 21, 2026
7e8809a
Merge branch 'develop' into enhancement/repre-rootless-paths
antirotor Jun 22, 2026
e887b50
RootItem is class that is raising warning and have docstring
iLLiCiTiT Jun 22, 2026
00915d5
Merge pull request #1853 from ynput/enhancement/repre-rootless-paths
iLLiCiTiT Jun 22, 2026
1e3b04d
Merge branch 'develop' into 1685-yn-0470-integrating-hero-version-not…
antirotor Jun 25, 2026
f5cd8e6
Merge pull request #1766 from ynput/1685-yn-0470-integrating-hero-ver…
antirotor Jun 25, 2026
e8759f0
Merge branch 'develop' into chore/1901-change-title-of-mk-docs
iLLiCiTiT Jun 29, 2026
e671f73
Merge pull request #1902 from ynput/chore/1901-change-title-of-mk-docs
iLLiCiTiT Jun 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ body:
label: Version
description: What version are you running? Look to AYON Tray
options:
- 1.9.7
- 1.9.6
- 1.9.5
- 1.9.4
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pr_linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ jobs:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
with:
changed-files: "true"
version-file: "pyproject.toml"
8 changes: 6 additions & 2 deletions client/ayon_core/pipeline/anatomy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
TemplateMissingKey,
AnatomyTemplateUnsolved,
)
from .anatomy import Anatomy
from .roots import AnatomyRoot, AnatomyRoots
from .templates import AnatomyTemplateResult, AnatomyStringTemplate
from .anatomy import Anatomy


__all__ = (
Expand All @@ -16,8 +17,11 @@
"TemplateMissingKey",
"AnatomyTemplateUnsolved",

"Anatomy",
"AnatomyRoot",
"AnatomyRoots",

"AnatomyTemplateResult",
"AnatomyStringTemplate",

"Anatomy",
)
22 changes: 19 additions & 3 deletions client/ayon_core/pipeline/anatomy/anatomy.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from __future__ import annotations

import os
import re
import copy
import platform
import collections
from typing import TYPE_CHECKING, Any

import ayon_api

Expand All @@ -17,7 +20,12 @@

from .exceptions import RootCombinationError, ProjectNotSet
from .roots import AnatomyRoots
from .templates import AnatomyTemplates
from .templates import AnatomyTemplates, NOT_SET


if TYPE_CHECKING:
from .templates import TemplateItem


log = Logger.get_logger(__name__)

Expand Down Expand Up @@ -104,7 +112,13 @@ def templates_obj(self):
"""Return `AnatomyTemplates` object of current Anatomy instance."""
return self._templates_obj

def get_template_item(self, *args, **kwargs):
def get_template_item(
self,
category_name: str,
template_name: str,
subkey: str | None = None,
default: Any = NOT_SET,
) -> TemplateItem | Any:
"""Get template item from category.

Args:
Expand All @@ -117,7 +131,9 @@ def get_template_item(self, *args, **kwargs):
Any: Template item, subkey value as AnatomyStringTemplate or None.

"""
return self._templates_obj.get_template_item(*args, **kwargs)
return self._templates_obj.get_template_item(
category_name, template_name, subkey, default
)

def format(self, *args, **kwargs):
"""Wrap `format` method of Anatomy's `templates_obj`."""
Expand Down
45 changes: 30 additions & 15 deletions client/ayon_core/pipeline/anatomy/roots.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import os
import platform
import numbers
import warnings

from ayon_core.lib import Logger, StringTemplate
from ayon_core.lib.path_templates import FormatObject

from .exceptions import RootMissingEnv


class RootItem(FormatObject):
class AnatomyRoot(FormatObject):
"""Represents one item or roots.

Holds raw data of root item specification. Raw data contain value
Expand Down Expand Up @@ -243,6 +244,21 @@ def find_root_template_from_path(self, path):
return (result, output)


# TODO remove
class RootItem(AnatomyRoot):
"""DEPRECATED: Use 'AnatomyRoot' instead.

Backwards compatibility added 2026/05/21.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
warnings.warn(
"RootItem is deprecated. Use AnatomyRoot instead.",
DeprecationWarning,
stacklevel=2,
)


class AnatomyRoots:
"""Object which should be used for formatting "root" key in templates.

Expand Down Expand Up @@ -296,7 +312,7 @@ def path_remapper(
src_platform (Optional[str]): Specify source platform. This is
recommended to not use and keep unset until you really want
to use specific platform.
roots (Optional[Union[dict, RootItem])): It is possible to remap
roots (Optional[Union[dict, AnatomyRoot])): It is possible to remap
path with different roots then instance where method was
called has.

Expand All @@ -318,7 +334,7 @@ def path_remapper(
if not dst_platform:
return path

if isinstance(roots, RootItem):
if isinstance(roots, AnatomyRoot):
return roots.path_remapper(path, dst_platform, src_platform)

for _root in roots.values():
Expand Down Expand Up @@ -353,7 +369,7 @@ def find_root_template_from_path(self, path, roots=None):
if roots is None:
raise ValueError("Roots are not set. Can't find path.")

if isinstance(roots, RootItem):
if isinstance(roots, AnatomyRoot):
return roots.find_root_template_from_path(path)

for root_name, _root in roots.items():
Expand Down Expand Up @@ -411,7 +427,7 @@ def all_root_paths(self, roots=None):
roots = self.roots

output = []
if isinstance(roots, RootItem):
if isinstance(roots, AnatomyRoot):
for value in roots.raw_data.values():
output.append(value)
return output
Expand All @@ -426,7 +442,7 @@ def _root_environments(self, keys=None, roots=None):
if roots is None:
roots = self.roots

if isinstance(roots, RootItem):
if isinstance(roots, AnatomyRoot):
key_items = [self.env_prefix]
for _key in keys:
key_items.append(_key.upper())
Expand Down Expand Up @@ -462,7 +478,7 @@ def _root_environmets_fill_data(self, template, keys=None, roots=None):
)
}

if isinstance(roots, RootItem):
if isinstance(roots, AnatomyRoot):
key_items = [AnatomyRoots.env_prefix]
for _key in keys:
key_items.append(_key.upper())
Expand Down Expand Up @@ -513,32 +529,31 @@ def _discover(self):
Default roots are loaded if project override's does not contain roots.

Returns:
`RootItem` or `dict` with multiple `RootItem`s when multiroot
`AnatomyRoot` or `dict` with multiple `AnatomyRoot`s when multiroot
setting is used.
"""

return self._parse_dict(self._anatomy["roots"], self)

@staticmethod
def _parse_dict(data, parent):
"""Parse roots raw data into RootItem or dictionary with RootItems.
"""Parse roots raw data into dictionary with AnatomyRoots.

Converting raw roots data to `RootItem` helps to handle platform keys.
This method is recursive to be able handle multiroot setup and
is static to be able to load default roots without creating new object.
Converting raw roots data to `AnatomyRoot` helps to handle platform
keys.

Args:
data (dict): Should contain raw roots data to be parsed.
parent (AnatomyRoots): Parent object set as parent
for ``RootItem``.
for ``AnatomyRoot``.

Returns:
dict[str, RootItem]: Root items by name.
dict[str, AnatomyRoot]: Root items by name.

"""
output = {}
for root_name, root_values in data.items():
output[root_name] = RootItem(
output[root_name] = AnatomyRoot(
parent, root_values, root_name
)
return output
23 changes: 15 additions & 8 deletions client/ayon_core/pipeline/anatomy/templates.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from __future__ import annotations
import os
import re
import copy
import platform
import collections
import numbers
from typing import Any

from ayon_core.lib.path_templates import (
TemplateResult,
Expand All @@ -16,8 +18,9 @@
AnatomyTemplateUnsolved,
)


_IS_WINDOWS = platform.system().lower() == "windows"
_PLACEHOLDER = object()
NOT_SET = object()


class AnatomyTemplateResult(TemplateResult):
Expand Down Expand Up @@ -441,7 +444,7 @@ def roots(self):
"""Anatomy roots object.

Returns:
RootItem: Anatomy roots data.
dict[str, AnatomyRoot]: Anatomy roots data.

"""
return self._anatomy.roots
Expand Down Expand Up @@ -578,14 +581,18 @@ def format_all(self, in_data):
return self.format(in_data, strict=False)

def get_template_item(
self, category_name, template_name, subkey=None, default=_PLACEHOLDER
):
self,
category_name: str,
template_name: str,
subkey: str | None = None,
default: Any = NOT_SET
) -> Any:
"""Get template item from category.

Args:
category_name (str): Category name.
template_name (str): Template name.
subkey (Optional[str]): Subkey name.
subkey (str | None): Subkey name.
default (Any): Default value if template is not found.

Returns:
Expand All @@ -599,13 +606,13 @@ def get_template_item(
self._validate_discovery()
category = self.get(category_name)
if category is None:
if default is not _PLACEHOLDER:
if default is not NOT_SET:
return default
raise KeyError("Category '{}' not found.".format(category_name))

template_item = category.get(template_name)
if template_item is None:
if default is not _PLACEHOLDER:
if default is not NOT_SET:
return default
raise KeyError(
"Template '{}' not found in category '{}'.".format(
Expand All @@ -620,7 +627,7 @@ def get_template_item(
if item is not None:
return item

if default is not _PLACEHOLDER:
if default is not NOT_SET:
return default
raise KeyError(
"Subkey '{}' not found in '{}/{}'.".format(
Expand Down
18 changes: 18 additions & 0 deletions client/ayon_core/pipeline/publish/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@
has_trait_representations,
set_trait_representations,

get_instance_template_name,
get_instance_publish_template,
get_publish_template_object,
get_instance_families,
get_version_data_from_instance,
get_rootless_path,

IntegrationTemplateItem,

get_default_reviewable_layers,
)

Expand Down Expand Up @@ -119,5 +128,14 @@
"has_trait_representations",
"set_trait_representations",

"get_instance_template_name",
"get_instance_publish_template",
"get_publish_template_object",
"get_instance_families",
"get_version_data_from_instance",
"get_rootless_path",

"IntegrationTemplateItem",

"get_default_reviewable_layers",
)
Loading
Loading