kedro-org / kedro-plugins

First-party plugins maintained by the Kedro team.
Apache License 2.0
94 stars 90 forks source link

ci(airflow): Replace type hints with CatalogProtocol #845

Closed ankatiyar closed 2 months ago

ankatiyar commented 2 months ago

Description

Fix https://github.com/kedro-org/kedro-plugins/issues/840

Development notes

Replace DataCatalog with CatalogProtocol

Checklist

ankatiyar commented 2 months ago

@ankatiyar should we also specify kedro version when release? Cause CatalogProtocol will be available only in 0.19.9.

@ElenaKhaustova Yeah, you're right, let me see if I can make this work with both older and newer versions otherwise we might need to pin airflow plugin to newer versions of Kedro

ankatiyar commented 2 months ago

@merelcht @ElenaKhaustova I've made some changes and checked with released Kedro 0.19.8 version as well as the latest main version of Kedro that the tests pass and airflow plugin works. The mypy check doesn't for older versions complaining that CatalogProtocol doesn't exist in kedro.io but if I add an ignore statement it complains on CI because we run these tests with the main version so I've left it as it is.

I've also added ignore statements to the bandit failures in the experimental dataset (see #850) Will leave that ticket open for the actual solution, but this will unblock the CI.

Would you mind taking another look?