Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(ingest): inherit capabilities from superclasses #9174

Merged
merged 3 commits into from Nov 6, 2023

Conversation

hsheth2
Copy link
Collaborator

@hsheth2 hsheth2 commented Nov 3, 2023

Also fixes Airflow tests.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Nov 3, 2023
@@ -101,6 +101,10 @@ def get_long_description():
f"acryl-datahub[testing-utils]{_self_pin}",
# Extra requirements for loading our test dags.
"apache-airflow[snowflake]>=2.0.2",
# Connexion's new version breaks Airflow:
# See https://github.com/apache/airflow/issues/35234.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not a big deal but the period messes up the link on github

@@ -93,10 +93,20 @@ def capability(
"""

def wrapper(cls: Type) -> Type:
if not hasattr(cls, "__capabilities"):
if not hasattr(cls, "__capabilities") or any(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we just use single underscore instead of double underscore here? I think that's why we have to do this in the first place: https://www.scaler.com/topics/double-underscore-python/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

in this case, we actually do want double underscore to signal that it's specific to that class and not subclasses, since the inheritance piece of it we do ourselves using copies to avoid mutating the same underlying object

also the double underscores don't actually get mangled here because we're not within a class context

@asikowitz asikowitz merged commit 86d2b08 into datahub-project:master Nov 6, 2023
51 checks passed
@asikowitz asikowitz deleted the capability-inherit branch November 6, 2023 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants