Bitbucket
zenml.integrations.bitbucket
Initialization of the bitbucket ZenML integration.
Attributes
BITBUCKET = 'bitbucket'
module-attribute
BITBUCKET_EVENT_FLAVOR = 'bitbucket'
module-attribute
Classes
BasePluginFlavor
Bases: ABC
Base Class for all PluginFlavors.
Functions
get_flavor_response_model(hydrate: bool) -> BasePluginFlavorResponse[Any, Any, Any]
abstractmethod
classmethod
Convert the Flavor into a Response Model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
hydrate
|
bool
|
Whether the model should be hydrated. |
required |
Source code in src/zenml/plugins/base_plugin_flavor.py
79 80 81 82 83 84 85 86 87 88 |
|
BitbucketIntegration
Bases: Integration
Definition of bitbucket integration for ZenML.
Functions
plugin_flavors() -> List[Type[BasePluginFlavor]]
classmethod
Declare the event flavors for the bitbucket integration.
Returns:
Type | Description |
---|---|
List[Type[BasePluginFlavor]]
|
List of stack component flavors for this integration. |
Source code in src/zenml/integrations/bitbucket/__init__.py
30 31 32 33 34 35 36 37 38 39 |
|
Integration
Base class for integration in ZenML.
Functions
activate() -> None
classmethod
Abstract method to activate the integration.
Source code in src/zenml/integrations/integration.py
140 141 142 |
|
check_installation() -> bool
classmethod
Method to check whether the required packages are installed.
Returns:
Type | Description |
---|---|
bool
|
True if all required packages are installed, False otherwise. |
Source code in src/zenml/integrations/integration.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
flavors() -> List[Type[Flavor]]
classmethod
Abstract method to declare new stack component flavors.
Returns:
Type | Description |
---|---|
List[Type[Flavor]]
|
A list of new stack component flavors. |
Source code in src/zenml/integrations/integration.py
144 145 146 147 148 149 150 151 |
|
get_requirements(target_os: Optional[str] = None, python_version: Optional[str] = None) -> List[str]
classmethod
Method to get the requirements for the integration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target_os
|
Optional[str]
|
The target operating system to get the requirements for. |
None
|
python_version
|
Optional[str]
|
The Python version to use for the requirements. |
None
|
Returns:
Type | Description |
---|---|
List[str]
|
A list of requirements. |
Source code in src/zenml/integrations/integration.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
get_uninstall_requirements(target_os: Optional[str] = None) -> List[str]
classmethod
Method to get the uninstall requirements for the integration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target_os
|
Optional[str]
|
The target operating system to get the requirements for. |
None
|
Returns:
Type | Description |
---|---|
List[str]
|
A list of requirements. |
Source code in src/zenml/integrations/integration.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
|
plugin_flavors() -> List[Type[BasePluginFlavor]]
classmethod
Abstract method to declare new plugin flavors.
Returns:
Type | Description |
---|---|
List[Type[BasePluginFlavor]]
|
A list of new plugin flavors. |
Source code in src/zenml/integrations/integration.py
153 154 155 156 157 158 159 160 |
|
Modules
plugins
Bitbucket event flavors.
Classes
BitbucketWebhookEventSourceFlavor
Modules
bitbucket_webhook_event_source_flavor
Bitbucket webhook event source flavor.
BitbucketWebhookEventSourceFlavor
event_sources
bitbucket_webhook_event_source
Implementation of the Bitbucket webhook event source.
BitbucketEvent
Bases: BaseEvent
Bitbucket Event.
branch: Optional[str]
property
The branch the event happened on.
Returns:
Type | Description |
---|---|
Optional[str]
|
The branch name. |
event_type: Union[BitbucketEventType, str]
property
The type of Bitbucket event.
Returns:
Type | Description |
---|---|
Union[BitbucketEventType, str]
|
The type of the event. |
BitbucketEventType
BitbucketWebhookEventFilterConfiguration
Bases: WebhookEventFilterConfig
Configuration for Bitbucket event filters.
event_matches_filter(event: BaseEvent) -> bool
Checks the filter against the inbound event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event
|
BaseEvent
|
The incoming event |
required |
Returns:
Type | Description |
---|---|
bool
|
Whether the event matches the filter |
Source code in src/zenml/integrations/bitbucket/plugins/event_sources/bitbucket_webhook_event_source.py
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
|
BitbucketWebhookEventSourceConfiguration
BitbucketWebhookEventSourceHandler(event_hub: Optional[BaseEventHub] = None)
Bases: BaseWebhookEventSourceHandler
Handler for all Bitbucket events.
Source code in src/zenml/event_sources/base_event_source.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
config_class: Type[BitbucketWebhookEventSourceConfiguration]
property
Returns the webhook event source configuration class.
Returns:
Type | Description |
---|---|
Type[BitbucketWebhookEventSourceConfiguration]
|
The configuration. |
filter_class: Type[BitbucketWebhookEventFilterConfiguration]
property
Returns the webhook event filter configuration class.
Returns:
Type | Description |
---|---|
Type[BitbucketWebhookEventFilterConfiguration]
|
The event filter configuration class. |
flavor_class: Type[BaseWebhookEventSourceFlavor]
property
Returns the flavor class of the plugin.
Returns:
Type | Description |
---|---|
Type[BaseWebhookEventSourceFlavor]
|
The flavor class of the plugin. |
Commit
Bases: BaseModel
Bitbucket Commit.
Push
Bases: BaseModel
Bitbucket Push.
PushChange
Bases: BaseModel
Bitbucket Push Change.
Repository
Bases: BaseModel
Bitbucket Repository.
User
Bases: BaseModel
Bitbucket User.