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

chore: add dbt test and fixtures #2580

Merged
merged 13 commits into from
Feb 7, 2024
Merged

chore: add dbt test and fixtures #2580

merged 13 commits into from
Feb 7, 2024

Conversation

talagluck
Copy link
Contributor

This is messy, but works. I haven't updated dependencies or anything, but dbt is a dependency for this. Just want to get this shared before the weekend.

@CLAassistant
Copy link

CLAassistant commented Feb 2, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@tychoish tychoish left a comment

Choose a reason for hiding this comment

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

a bunch of nits/questions, but as long as CI passes this will be a big help.

tests/tests/test_dbt.py Outdated Show resolved Hide resolved
def test_dbt_glaredb(
glaredb_connection: psycopg2.extensions.connection,
):
dbt: dbtRunner = dbtRunner()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if you can just add this as an argument to the test to see if the magic pytest fixture thing works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you say more here? Are you suggesting I create a separate dbtRunner fixture?

project_directory: str = "../fixtures/dbt_project/" # TODO
dbt_profiles_directory: str = "../fixtures/dbt_project/" # TODO

curr = glaredb_connection.cursor()
Copy link
Collaborator

Choose a reason for hiding this comment

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

context manager for cursors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. I followed the pattern here. Should we update that?

tests/tests/test_dbt.py Show resolved Hide resolved
tests/tests/test_dbt.py Outdated Show resolved Hide resolved
tests/tests/test_dbt.py Outdated Show resolved Hide resolved
@talagluck talagluck merged commit a44f3e2 into main Feb 7, 2024
22 checks passed
@talagluck talagluck deleted the tal/add_dbt_test branch February 7, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants