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

Remove dbt-core dependency #81

Merged
merged 12 commits into from
Oct 31, 2024

Conversation

jochemvandooren
Copy link
Contributor

@jochemvandooren jochemvandooren commented Oct 28, 2024

Get rid of the dependency dbt-core.

In order to keep the number of dependencies as low as possible, to keep python environments small, get rid of the dbt-core dependency and add it to the dev dependencies. This is possible because dbt-score only needs a manifest.json in order to run, although dbt-score is able to run dbt parse by itself.

@jochemvandooren jochemvandooren marked this pull request as ready for review October 28, 2024 16:37
@jochemvandooren jochemvandooren changed the title WIP Get rid of dbt-core dependency Get rid of dbt-core dependency Oct 28, 2024
@jochemvandooren jochemvandooren changed the title Get rid of dbt-core dependency Remove dbt-core dependency Oct 28, 2024
src/dbt_score/cli.py Outdated Show resolved Hide resolved
src/dbt_score/dbt_utils.py Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
Co-authored-by: Matthieu Caneill <[email protected]>
pyproject.toml Show resolved Hide resolved
src/dbt_score/dbt_utils.py Outdated Show resolved Hide resolved
docs/get_started.md Outdated Show resolved Hide resolved
docs/get_started.md Outdated Show resolved Hide resolved
jochemvandooren and others added 2 commits October 31, 2024 08:17
Co-authored-by: Matthieu Caneill <[email protected]>
Co-authored-by: Matthieu Caneill <[email protected]>
Copy link
Contributor

@druzhinin-kirill druzhinin-kirill left a comment

Choose a reason for hiding this comment

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

Left one comment, PHAL, but preapproving anyways 👌

def dbt_required(func: Callable[..., Any]) -> Callable[..., Any]:
"""Decorator for methods that require dbt to be installed."""

def inner() -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

We can use https://docs.python.org/3/library/functools.html#functools.wraps

to preserve docstrings, names etc of the original function 👌

@jochemvandooren jochemvandooren merged commit 437a603 into master Oct 31, 2024
3 checks passed
@jochemvandooren jochemvandooren deleted the jvandooren/remove-dbt-core-dependency branch October 31, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants