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

add env DBT_PROJECT_DIR support #6078 #6659

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

leo-schick
Copy link
Contributor

@leo-schick leo-schick commented Jan 19, 2023

resolves #6078

Description

Adds support for DBT_PROJECT_DIR handy to skip having to write dbt <verb> --project-dir ....

Development test

image

Checklist

@leo-schick leo-schick requested a review from a team January 19, 2023 13:16
@leo-schick leo-schick requested review from a team as code owners January 19, 2023 13:16
@cla-bot
Copy link

cla-bot bot commented Jan 19, 2023

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @leo-schick

@leo-schick
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla:yes label Jan 19, 2023
@cla-bot
Copy link

cla-bot bot commented Jan 19, 2023

The cla-bot has been summoned, and re-checked this pull request!

@jtcohen6 jtcohen6 added cli Team:Execution ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering labels Jan 23, 2023
@dbeatty10
Copy link
Contributor

Thanks for submitting this PR @leo-schick !

I think we should wait for #6631 to be resolved before reviewing this PR.

Rationale

I suspect that flags.py will either go away entirely or may change substantially, so it would be best to hold off. Once #6631 is resolved, I think the PR to implement this feature will be even more simple (maybe even as easy as just adding envvar="DBT_PROJECT_DIR", + relevant tests).

Copy link
Contributor

@ChenyuLInx ChenyuLInx left a comment

Choose a reason for hiding this comment

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

Hey @leo-schick thanks for updating this PR, do you mind rebase the latest main and see what the diff looks like? I feel like the line I left a comment might be that the line we need to update for this PR. Let me know if I missed things.

core/dbt/cli/params.py Show resolved Hide resolved
@leo-schick
Copy link
Contributor Author

Done

@leo-schick leo-schick requested review from ChenyuLInx and removed request for emmyoop, leahwicz and VersusFacit February 18, 2023 09:21
Copy link
Contributor

@ChenyuLInx ChenyuLInx left a comment

Choose a reason for hiding this comment

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

@leo-schick Looks great!! Thanks for adding this!

peterallenwebb pushed a commit that referenced this pull request Mar 14, 2023
peterallenwebb added a commit that referenced this pull request Mar 22, 2023
* ct-2198: clean up some type names and uses

* CT-2198: Unify constraints and constraints_check properties on columns

* Make mypy version consistently 0.981 (#7134)

* CT 1808 diff based partial parsing (#6873)

* model contracts on models materialized as views (#7120)

* first pass

* rename tests

* fix failing test

* changelog

* fix functional test

* Update core/dbt/parser/base.py

* Update core/dbt/parser/schemas.py

* Create method for env var deprecation (#7086)

* update to allow adapters to change model name resolution in py models (#7115)

* update to allow adapters to change model name resolution in py models

* add changie

* fix newline adds

* move quoting into macro

* use single quotes

* add env DBT_PROJECT_DIR support #6078 (#6659)

Co-authored-by: Jeremy Cohen <[email protected]>

* Add new index.html and changelog yaml files from dbt-docs (#7141)

* Make version configs optional (#7060)

* [CT-1584] New top level commands: interactive compile (#7008)

Co-authored-by: Github Build Bot <[email protected]>

* CT-2198: Add changelog entry

* CT-2198: Fix tests which broke after merge

* CT-2198: Add explicit validation of constraint types w/ unit test

* CT-2198: Move access property, per code review

* CT-2198: Remove a redundant macro

* CT-1298: Rework constraints to be adapter-generated in Python code

* CT-2198: Clarify function name per review

---------

Co-authored-by: Gerda Shank <[email protected]>
Co-authored-by: Emily Rockman <[email protected]>
Co-authored-by: Stu Kilgore <[email protected]>
Co-authored-by: colin-rogers-dbt <[email protected]>
Co-authored-by: Leo Schick <[email protected]>
Co-authored-by: Jeremy Cohen <[email protected]>
Co-authored-by: FishtownBuildBot <[email protected]>
Co-authored-by: dave-connors-3 <[email protected]>
Co-authored-by: Kshitij Aranke <[email protected]>
Co-authored-by: Github Build Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes cli ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-1357] [Feature] DBT_PROJECT_DIR env var
4 participants