Skip to content

Commit 267059e

Browse files
authored
Release 2.2.0 (#33)
1 parent caba493 commit 267059e

File tree

9 files changed

+126
-101
lines changed

9 files changed

+126
-101
lines changed

.github/workflows/publish_dbtenv_dbt_alias_release_to_pypi.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/publish_dbtenv_release_to_pypi.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Publish dbtenv and dbtenv-dbt-alias releases to PyPI
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish_dbtenv_package:
11+
defaults:
12+
run:
13+
working-directory: dbtenv
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.9'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install poetry
26+
27+
- name: Build package
28+
run: python -m poetry build
29+
30+
- name: Publish package
31+
uses: pypa/[email protected]
32+
with:
33+
password: ${{ secrets.PYPI_API_TOKEN }}
34+
packages_dir: dbtenv/dist
35+
publish_dbtenv_dbt_alias_package:
36+
defaults:
37+
run:
38+
working-directory: dbtenv-dbt-alias
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v2
42+
43+
- uses: actions/setup-python@v2
44+
with:
45+
python-version: '3.9'
46+
47+
- name: Install dependencies
48+
run: |
49+
python -m pip install --upgrade pip
50+
pip install poetry
51+
52+
- name: Build package
53+
run: python -m poetry build
54+
55+
- name: ls
56+
run: ls
57+
58+
- name: Publish package
59+
uses: pypa/[email protected]
60+
with:
61+
password: ${{ secrets.PYPI_API_TOKEN }}
62+
packages_dir: dbtenv-dbt-alias/dist
63+

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,24 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased](https://github.com/brooklyn-data/dbtenv/compare/v2.1.0...HEAD)
8+
## [Unreleased](https://github.com/brooklyn-data/dbtenv/compare/v2.2.0...HEAD)
99

1010
### Added
1111

1212
### Changed
1313

1414
### Fixed
1515

16+
## [2.2.0](https://github.com/brooklyn-data/dbtenv/compare/v2.1.0...v2.2.0)
17+
18+
### Added
19+
20+
### Changed
21+
- Removed `dbtenv[dbt-alias]` extra. Instead, install `dbtenv-dbt-alias` directly. `dbtenv-dbt-alias` is identical to `dbtenv`, with the exception of adding a `dbt` entry point. The `dbt` command then acts as a direct shortcut to `dbtenv execute --`, and means that dbtenv can used as a drop-in replacement to installing dbt normally.
22+
- `dbtenv-dbt-alias` package is now versioned identically to `dbtenv`.
23+
24+
### Fixed
25+
1626
## [2.1.0](https://github.com/brooklyn-data/dbtenv/compare/v2.0.0...v2.1.0)
1727

1828
### Added

README.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,31 @@ dbtenv is a version manager for dbt, automatically installing and switching to t
66
### Installation
77

88
1. Install [pipx](https://pypa.github.io/pipx/) ([What is pipx?](https://www.google.com/search?q=pipx&rlz=1C5GCEM_enGB953GB953&oq=Pipx&aqs=chrome.0.69i59i512j0i512l2j69i59j0i512l2j69i60l2.1010j0j7&sourceid=chrome&ie=UTF-8)).
9-
2. Run `pipx install dbtenv[dbt-alias]`.
9+
2. Run `pipx install dbtenv-dbt-alias`
1010

1111
### Usage
12-
If the `dbt-alias` extra is used (`dbtenv[dbt-alias]`), dbt commands can be used as normal and will be routed through dbtenv. dbtenv will automatically determine, install and use the required dbt adapter and version.
12+
If `dbtenv-dbt-alias` is installed per the above, dbt commands can be used as normal and will be routed through dbtenv. dbtenv will automatically determine, install and use the required dbt adapter and version.
1313

1414
Illustrative example
1515
```
16-
dbt --version
16+
➜ dev/dbt_project ✗ dbt compile
1717
dbtenv info: Using dbt-bigquery==1.0.0 (set by dbt_project.yml).
18-
installed version: 1.0.4
19-
latest version: 1.0.4
18+
10:48:43 Running with dbt=1.0.4
2019
21-
Up to date!
22-
23-
Plugins:
24-
- bigquery: 1.0.0 - Up to date!
20+
10:48:45 Found 73 models, 142 tests, 2 snapshots, 0 analyses, 383 macros, 0 operations, 0 seed files, 44 sources, 0 exposures, 0 metrics
21+
10:48:45
22+
10:49:14 Concurrency: 1 threads (target='dev')
23+
10:49:14
24+
10:49:20 Done.
2525
```
2626

27+
## Installation Options
28+
29+
There are two packages available for installation:
30+
- `dbtenv`
31+
- `dbtenv-dbt-alias`
32+
33+
`dbtenv-dbt-alias` is identical to `dbtenv`, with the exception of adding a `dbt` entry point. The `dbt` command then acts as a direct shortcut to `dbtenv execute --`, and means that dbtenv can used as a drop-in replacement to installing dbt normally.
2734

2835
## Available Commands
2936

@@ -35,6 +42,10 @@ Plugins:
3542
- `dbtenv which` - Print the full path to the executable of the dbt version dbtenv determines automatically for the current environment.
3643
- `dbtenv execute` - Execute a dbt command.
3744

45+
If `dbtenv-dbt-alias` is installed:
46+
- All the above plus:
47+
- `dbt <args>` - The dbt CLI.
48+
3849

3950
## dbt Version Management
4051
dbtenv will automatically install the required version of dbt for the current project by default. To disable this behaviour, set the environment variable `DBTENV_AUTO_INSTALL` to `false`.
@@ -69,9 +80,9 @@ You can:
6980

7081
## Running dbt through dbtenv
7182

72-
### dbt-alias
83+
### If dbtenv-dbt-alias installed
7384

74-
The `dbtenv-dbt-alias` package creates an entrypoint for the `dbt` command to route through dbtenv. The package is installable using the `[dbt-alias]` extra when installing dbtenv. The `dbt` command then acts as a direct shortcut to `dbtenv execute --`, and means that dbtenv can used as a drop-in replacement to installing dbt normally.
85+
The `dbt` command then acts as a direct shortcut to `dbtenv execute --`, and means that dbtenv can used as a drop-in replacement to installing dbt normally. dbtenv will automatically identify which package and version of dbt to use. If you need to manually specify a dbt package version to run with, use the `dbtenv execute` command.
7586

7687
### dbtenv execute
7788

@@ -81,7 +92,7 @@ For example:
8192
- `dbtenv execute -- run` will execute `dbt run` using the version determined automatically from the current environment.
8293
- `dbtenv execute --dbt 1.0.0 -- run` will execute `dbt run` using dbt 1.0.0, automatically detecting the required adapter from the default target in `profiles.yml`.
8394
- `dbtenv execute --dbt 1.0.0 -- run --target prod` will execute `dbt run` using dbt 1.0.0, using the required adapter for the 'prod' target in `profiles.yml`.
84-
- `dbtenv execute --dbt 1.0.0==dbt-bigquery -- run` will execute `dbt run` using dbt-bigquery==1.0.0.
95+
- `dbtenv execute --dbt dbt-bigquery==1.0.0 -- run` will execute `dbt run` using dbt-bigquery==1.0.0.
8596

8697

8798
## Development

dbtenv-dbt-alias/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# dbtenv-dbt-alias
22

3-
Installs a 'dbt' executable that is functionally equivalent to aliasing the dbt command to `dbtenv execute --`.
3+
dbtenv, but additionally installs a 'dbt' executable that is functionally equivalent to aliasing the dbt command to 'dbtenv execute --'.

dbtenv-dbt-alias/pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22
name = "dbtenv-dbt-alias"
3-
version = "1.0.0"
4-
description = "Routes dbt commands through dbtenv."
3+
version = "2.2.0"
4+
description = "dbtenv, but additionally installs a 'dbt' executable that is functionally equivalent to aliasing the dbt command to 'dbtenv execute --'."
55
authors = ["Brooklyn Data Co. <[email protected]>"]
66
keywords = ["dbt"]
77
license = "Apache 2.0"
@@ -19,7 +19,7 @@ classifiers = [
1919

2020
[tool.poetry.dependencies]
2121
python = ">=3.8"
22-
dbtenv = ">=2.1.0"
22+
dbtenv = "==2.1.0"
2323

2424
[tool.poetry.dev-dependencies]
2525

@@ -29,4 +29,5 @@ build-backend = "poetry.core.masonry.api"
2929

3030
[tool.poetry.scripts]
3131
# CLI declaration
32+
dbtenv = "dbtenv.main:main"
3233
dbt = "dbtenv.main:main"

dbtenv/README.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,31 @@ dbtenv is a version manager for dbt, automatically installing and switching to t
66
### Installation
77

88
1. Install [pipx](https://pypa.github.io/pipx/) ([What is pipx?](https://www.google.com/search?q=pipx&rlz=1C5GCEM_enGB953GB953&oq=Pipx&aqs=chrome.0.69i59i512j0i512l2j69i59j0i512l2j69i60l2.1010j0j7&sourceid=chrome&ie=UTF-8)).
9-
2. Run `pipx install dbtenv[dbt-alias]`.
9+
2. Run `pipx install dbtenv-dbt-alias`
1010

1111
### Usage
12-
If the `dbt-alias` extra is used (`dbtenv[dbt-alias]`), dbt commands can be used as normal and will be routed through dbtenv. dbtenv will automatically determine, install and use the required dbt adapter and version.
12+
If `dbtenv-dbt-alias` is installed per the above, dbt commands can be used as normal and will be routed through dbtenv. dbtenv will automatically determine, install and use the required dbt adapter and version.
1313

1414
Illustrative example
1515
```
16-
dbt --version
16+
➜ dev/dbt_project ✗ dbt compile
1717
dbtenv info: Using dbt-bigquery==1.0.0 (set by dbt_project.yml).
18-
installed version: 1.0.4
19-
latest version: 1.0.4
18+
10:48:43 Running with dbt=1.0.4
2019
21-
Up to date!
22-
23-
Plugins:
24-
- bigquery: 1.0.0 - Up to date!
20+
10:48:45 Found 73 models, 142 tests, 2 snapshots, 0 analyses, 383 macros, 0 operations, 0 seed files, 44 sources, 0 exposures, 0 metrics
21+
10:48:45
22+
10:49:14 Concurrency: 1 threads (target='dev')
23+
10:49:14
24+
10:49:20 Done.
2525
```
2626

27+
## Installation Options
28+
29+
There are two packages available for installation:
30+
- `dbtenv`
31+
- `dbtenv-dbt-alias`
32+
33+
`dbtenv-dbt-alias` is identical to `dbtenv`, with the exception of adding a `dbt` entry point. The `dbt` command then acts as a direct shortcut to `dbtenv execute --`, and means that dbtenv can used as a drop-in replacement to installing dbt normally.
2734

2835
## Available Commands
2936

@@ -35,6 +42,10 @@ Plugins:
3542
- `dbtenv which` - Print the full path to the executable of the dbt version dbtenv determines automatically for the current environment.
3643
- `dbtenv execute` - Execute a dbt command.
3744

45+
If `dbtenv-dbt-alias` is installed:
46+
- All the above plus:
47+
- `dbt <args>` - The dbt CLI.
48+
3849

3950
## dbt Version Management
4051
dbtenv will automatically install the required version of dbt for the current project by default. To disable this behaviour, set the environment variable `DBTENV_AUTO_INSTALL` to `false`.
@@ -69,9 +80,9 @@ You can:
6980

7081
## Running dbt through dbtenv
7182

72-
### dbt-alias
83+
### If dbtenv-dbt-alias installed
7384

74-
The `dbtenv-dbt-alias` package creates an entrypoint for the `dbt` command to route through dbtenv. The package is installable using the `[dbt-alias]` extra when installing dbtenv. The `dbt` command then acts as a direct shortcut to `dbtenv execute --`, and means that dbtenv can used as a drop-in replacement to installing dbt normally.
85+
The `dbt` command then acts as a direct shortcut to `dbtenv execute --`, and means that dbtenv can used as a drop-in replacement to installing dbt normally. dbtenv will automatically identify which package and version of dbt to use. If you need to manually specify a dbt package version to run with, use the `dbtenv execute` command.
7586

7687
### dbtenv execute
7788

@@ -81,7 +92,7 @@ For example:
8192
- `dbtenv execute -- run` will execute `dbt run` using the version determined automatically from the current environment.
8293
- `dbtenv execute --dbt 1.0.0 -- run` will execute `dbt run` using dbt 1.0.0, automatically detecting the required adapter from the default target in `profiles.yml`.
8394
- `dbtenv execute --dbt 1.0.0 -- run --target prod` will execute `dbt run` using dbt 1.0.0, using the required adapter for the 'prod' target in `profiles.yml`.
84-
- `dbtenv execute --dbt 1.0.0==dbt-bigquery -- run` will execute `dbt run` using dbt-bigquery==1.0.0.
95+
- `dbtenv execute --dbt dbt-bigquery==1.0.0 -- run` will execute `dbt run` using dbt-bigquery==1.0.0.
8596

8697

8798
## Development

dbtenv/pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "dbtenv"
3-
version = "2.1.0"
3+
version = "2.2.0"
44
description = "dbtenv is a version manager for dbt, automatically installing and switching to the needed adapter and version of dbt."
55
authors = ["Brooklyn Data Co. <[email protected]>"]
66
keywords = ["dbt"]
@@ -27,9 +27,6 @@ PyYAML = "^6.0"
2727
requires = ["poetry-core>=1.0.0"]
2828
build-backend = "poetry.core.masonry.api"
2929

30-
[tool.poetry.extras]
31-
dbt-alias = ["dbtenv-dbt-alias"]
32-
3330
[tool.poetry.scripts]
3431
# CLI declaration
3532
dbtenv = "dbtenv.main:main"

0 commit comments

Comments
 (0)