generated from dbt-labs/dbt-oss-template
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/github_actions/actions/checkout-4
- Loading branch information
Showing
9 changed files
with
122 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Short description | ||
|
||
<!-- Describe the scope of the ticket, a high-level implementation approach and any tradeoffs to consider --> | ||
|
||
## Acceptance criteria | ||
|
||
<!-- What is the definition of done for this ticket? Include any relevant edge cases and/or test cases --> | ||
|
||
## Suggested Tests | ||
|
||
<!-- Provide scenarios to test. Link to existing similar tests if appropriate. --> | ||
|
||
## Impact to Other Teams | ||
|
||
<!-- Will this change impact other teams? Include details of the kinds of changes required (new tests, code changes, related tickets) and _add the relevant `Impact:[team]` label_. --> | ||
|
||
## Will backports be required? | ||
|
||
<!-- Will this change need to be backported to previous versions? Add details, possible blockers to backporting and _add the relevant backport labels `backport 1.x.latest`_ --> | ||
|
||
## Context | ||
|
||
<!-- Provide the "why", motivation, and alternative approaches considered -- linking to previous refinement issues, spikes, docs as appropriate --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version = "0.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Build Tool | ||
|
||
|
||
## Context | ||
|
||
We need to select a build tool for managing dependencies for, building, and distributing `dbt-common`. While tooling can vary, this repo can serve as an OSS template for other OSS at dbt Labs and beyond. | ||
|
||
|
||
## Options | ||
|
||
- `setuptools` (`twine`, `build`) | ||
- `hatch` | ||
- `poetry` | ||
|
||
|
||
### setuptools | ||
|
||
#### Pro's | ||
|
||
- most popular option | ||
- supported by Python Packaging Authority | ||
- build tool of record for dbt-core & existing internal adapters | ||
|
||
#### Con's | ||
|
||
- less flexible; forced to support backwards compatibility more so than other options | ||
- no dependency management (manually add to `pyproject.toml`) | ||
|
||
|
||
### hatch | ||
|
||
#### Pro's | ||
|
||
- supported by Python Packaging Authority | ||
- already used by `dbt-semantic-layer` and `internal-actions` | ||
- supports running tests against multiple versions of python locally (same functionality as `tox`) | ||
- supports configuring workflows in `pyproject.toml` (same functionality as `make`) | ||
- incorporates new PEP's quickly | ||
- Manages python distributions itself without need of pyenv. This allows Windows and non-Windows users to both work locally in the same way. | ||
- used by black, tox, pipx, Jupyter Notebook, Datadog | ||
|
||
#### Con's | ||
|
||
- far less popular than other options | ||
- no dependency management (manually add to `pyproject.toml`) | ||
- only one maintainer (but is officially part of the larger PyPA working group) | ||
- Hatch does not allow for the installation of specific patch release versions of itself but rather only uses minor release granularity that tracks the latest patch release | ||
|
||
|
||
### poetry | ||
|
||
#### Pro's | ||
|
||
- second most popular option, similar in popularity to `setuptools` | ||
- dependency management (`poetry add "my-dependency"`) | ||
- provides a lock file | ||
- more than one maintainer | ||
|
||
#### Con's | ||
|
||
- incorporates new PEP's slowly | ||
|
||
|
||
## Decision | ||
|
||
#### Selected: `hatch` | ||
|
||
This option aligns with `dbt-adapter` and `dbt-semantic-layer`, which minimizes confusion | ||
for anyone working in multiple repositories. | ||
`hatch` also replaces `tox` and `make`, which consolidates our toolset to make working locally and with CI more consistant. | ||
|
||
|
||
## Consequences | ||
|
||
- [+] retire `tox` | ||
- [+] retire `make` | ||
- [+] rewriting the release workflows will create a more intuitive release for hatch projects | ||
- [-] we cannot reuse the existing release workflows | ||
- [-] write more detailed docs given lower familiarity | ||
- [-] learning curve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters