Skip to content

Commit 468d173

Browse files
committed
add docstring to the installable class
1 parent ab125c7 commit 468d173

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

  • src/cloudai/_core/installables

‎src/cloudai/_core/installables/base.py‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,25 @@
2424

2525

2626
class Installable(ABC):
27+
"""
28+
Base class for dependencies that CloudAI installs before running workloads.
29+
30+
Custom installables should:
31+
32+
- Implement ``__eq__`` and ``__hash__``. They define the installable's
33+
identity and are used to deduplicate dependencies across tests. Use only
34+
stable configuration values, not mutable installation state.
35+
- Stop there if a custom installer handles this installable by overriding
36+
``install_one``, ``uninstall_one``, ``is_installed_one``, or
37+
``mark_as_installed_one``.
38+
- Also override ``install``, ``uninstall``, ``is_installed``, and optionally
39+
``mark_as_installed`` if the installable should be handled by the default
40+
``BaseInstaller``. These methods receive the active installer instance and
41+
must return ``InstallStatusResult``.
42+
43+
Default operation methods return an unsupported ``InstallStatusResult``.
44+
"""
45+
2746
@abstractmethod
2847
def __eq__(self, other: object) -> bool: ...
2948

0 commit comments

Comments
 (0)