ynput / OpenPype

OpenPype has been surpassed by AYON and is now read only.
https://ayon.ynput.io
MIT License
286 stars 129 forks source link

Pype 4: Define representation as data class #1355

Open antirotor opened 3 years ago

antirotor commented 3 years ago

Problem

Current use of representation data as normal dict is pretty wild as we depend on its values but we are not enforcing them anyhow. It lacks proper documentation and is not very developer friendly. I propose to use attrs module we already have in dependencies for it - it provides clear interface for data classes in python and proper serialization so code impact should be minimal.

[cuID:OP-1188]

create-issue-branch[bot] commented 3 years ago

Branch feature/1355-pype-3-define-representation-as-data-class created!

antirotor commented 3 years ago

representation should take into account file we aren't tracking now - those copied to resources folder, like textures in lookdev, etc.

iLLiCiTiT commented 2 years ago

It would be good to keep metadata about files in representation like resolution, fps, codec, frames (list?) so each part of publishing don't have to get or guess that information.

mkolar commented 2 years ago

We have started to map all currently used families and their representations with some attributes. The work is aimed mostly to help with discussion and implementation of OpenAssetIO down the line, but it is directly related to this issue as well. Feel free to have a look and leave comment. The most important is the last sheet with the target state for v4 https://docs.google.com/spreadsheets/d/1PtnKuYBL8tVkQdabX95T2w0b_Xj06gkdTzpvdNGAYMM/edit#gid=165858577