Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

General: Host implementation defined with class #3337

Merged
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d9bde0c
implemented base classes for host implementation
iLLiCiTiT Jun 13, 2022
626e6f9
moved import of settings to top
iLLiCiTiT Jun 13, 2022
7f106ca
added maintained_selection to HostImplementation
iLLiCiTiT Jun 13, 2022
7ac1b6c
added logger to HostImplementation
iLLiCiTiT Jun 13, 2022
0ff8e2b
added validation methods to interfaces
iLLiCiTiT Jun 13, 2022
b81dbf9
use validations from interfaces
iLLiCiTiT Jun 13, 2022
3aa8881
added is_installed function to legacy_io
iLLiCiTiT Jun 13, 2022
97e6aa4
use HostImplementation class in Maya host
iLLiCiTiT Jun 13, 2022
df16589
added interfaces to inheritance
iLLiCiTiT Jun 14, 2022
94bccd5
Merge branch 'develop' into feature/OP-3315_Host-implementation-defin…
iLLiCiTiT Jun 22, 2022
796348d
renamed 'HostImplementation' to 'HostBase' and `MayaHostImplementatio…
iLLiCiTiT Jun 22, 2022
20cf87c
forgotten changes of MayaHost imports
iLLiCiTiT Jun 23, 2022
ecd2686
added some docstrings
iLLiCiTiT Jun 23, 2022
e36c80f
added type hints
iLLiCiTiT Jun 23, 2022
bf59264
added new names of methods and old variants are marked as deprecated
iLLiCiTiT Jun 23, 2022
779f423
use new method names based on inheritance in workfiles tool and scene…
iLLiCiTiT Jun 23, 2022
3ab8b75
fix double accessed self
iLLiCiTiT Jun 23, 2022
fcefcc7
removed type hints
iLLiCiTiT Jun 24, 2022
b4d141f
initial commit of docstrings
iLLiCiTiT Jun 24, 2022
6af7f90
added host installation and usage of tools in host
iLLiCiTiT Jun 27, 2022
9621877
renamed 'save_current_workfile' -> 'save_workfile'
iLLiCiTiT Jun 27, 2022
918ee53
renamed 'get_referenced_containers' -> 'get_containers'
iLLiCiTiT Jun 27, 2022
f846ef4
removed signature validation from host registration
iLLiCiTiT Jun 28, 2022
fb36060
Merge branch 'develop' into feature/OP-3315_Host-implementation-defin…
iLLiCiTiT Jun 28, 2022
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
13 changes: 13 additions & 0 deletions openpype/host/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from .host import (
HostImplementation,
IWorkfileHost,
ILoadHost,
INewPublisher,
)

__all__ = (
"HostImplementation",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finding it a bit odd to include "Implementation" into the class name. It's an programming concept.. and as the first line of the class comment states:
"Host is pipeline implementation of DCC application". So it feels a bit redundant.
Any issue with simply calling it "Host" ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not againts but Host is too short (for my taste), maybe BaseHost or HostBase?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any issue with simply calling it "Host" ?

I personally felt the same as @icyvapor - I'd prefer shorter if possible.
Same for MayaHostImplementation - I'm not sure why it couldn't be called MayaHost.
From a class naming convention I'd understand MayaHost better than MayaHostImplementation. The latter almost sounds like there's still another MayaHost class somewhere in the code base.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to HostBase and MayaHost, is it ok? Any other comments?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only problem with host as a word, that it's super hard to find it in the code base when you need to trace it's usages. HostBase and MayaHost is pretty good and specific enough not to have millions of false positives when searching through codebase

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would AsbtractHost make sense too? I'm also fine with HostBase by the way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only abstract part of the class is name property. In future is planned to have more pre-implemented functionality thus I'm more in HostBase.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry guys, soon after the comment I was put out of commission for the rest of the week by some health issue. Thanks for addressing the comment.

"IWorkfileHost",
"ILoadHost",
"INewPublisher",
)
Loading