forked from kedro-org/kedro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KED-1888] Enable auto-registration of hooks implementations (kedro-o…
…rg#711) First iteration, to be revisited next week.
- Loading branch information
Lorena Bălan
authored
Jul 17, 2020
1 parent
cbf6544
commit 49834dd
Showing
14 changed files
with
196 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright 2020 QuantumBlack Visual Analytics Limited | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND | ||
# NONINFRINGEMENT. IN NO EVENT WILL THE LICENSOR OR OTHER CONTRIBUTORS | ||
# BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN | ||
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN | ||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
# | ||
# The QuantumBlack Visual Analytics Limited ("QuantumBlack") name and logo | ||
# (either separately or in combination, "QuantumBlack Trademarks") are | ||
# trademarks of QuantumBlack. The License does not grant you any right or | ||
# license to the QuantumBlack Trademarks. You may not use the QuantumBlack | ||
# Trademarks or any confusingly similar mark as a trademark for your product, | ||
# or use the QuantumBlack Trademarks in any other manner that might cause | ||
# confusion in the marketplace, including but not limited to in advertising, | ||
# on websites, or on software. | ||
# | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
"""Dummy plugin with simple hook implementations.""" | ||
import logging | ||
|
||
from kedro.framework.hooks import hook_impl | ||
|
||
|
||
class MyPluginHook: | ||
@hook_impl | ||
def after_catalog_created( | ||
self, catalog | ||
): # pylint: disable=unused-argument,no-self-use | ||
logging.info("Reached after_catalog_created hook") | ||
|
||
|
||
hooks = MyPluginHook() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright 2020 QuantumBlack Visual Analytics Limited | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND | ||
# NONINFRINGEMENT. IN NO EVENT WILL THE LICENSOR OR OTHER CONTRIBUTORS | ||
# BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN | ||
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN | ||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
# | ||
# The QuantumBlack Visual Analytics Limited ("QuantumBlack") name and logo | ||
# (either separately or in combination, "QuantumBlack Trademarks") are | ||
# trademarks of QuantumBlack. The License does not grant you any right or | ||
# license to the QuantumBlack Trademarks. You may not use the QuantumBlack | ||
# Trademarks or any confusingly similar mark as a trademark for your product, | ||
# or use the QuantumBlack Trademarks in any other manner that might cause | ||
# confusion in the marketplace, including but not limited to in advertising, | ||
# on websites, or on software. | ||
# | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
from setuptools import find_packages, setup | ||
|
||
setup( | ||
name="test_plugin", | ||
version="0.1", | ||
description="Dummy plugin with hook implementations", | ||
packages=find_packages(), | ||
entry_points={"kedro.hooks": ["test_plugin = plugin:hooks"]}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.