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

More options to build pex faster #38

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,46 @@ Configure and enforce conventions for your dbt project.
<img src="./images/logo.webp" alt="dbt-bouncer logo" width="500"/>
</p>

# How to use

Generate a `manifest.json` by running `dbt parse`. Once completed, run `dbt-bouncer` to validate that your conventions are being maintained.

## GitHub Actions

```yaml
steps:
...

- uses: godatadriven/dbt-bouncer@v0
with:
dbt-artifacts-dir: ./<PATH_TO_DBT_PROJECT>/target

...
```

## Docker

Don't use GitHub Actions? You can still use dbt-bouncer via Docker:

```bash
docker pull ghcr.io/godatadriven/dbt-bouncer:v0

docker run --rm \
--volume "$PWD/<PATH_TO_DBT_PROJECT>/target":/<PATH_TO_DBT_PROJECT>/target \
ghcr.io/godatadriven/dbt-bouncer:v0 \
/dbt-bouncer.pex --dbt-artifacts-dir <PATH_TO_DBT_PROJECT>/target
```

## Pex

You can also run the `.pex` artifact directly once you have a python executable installed:

```bash
wget https://github.com/godatadriven/dbt-bouncer/blob/v0/dist/dbt-bouncer.pex -O dbt-bouncer.pex

dbt-bouncer.pex --dbt-artifacts-dir <PATH_TO_DBT_PROJECT>/target
```

# Development

To setup your development environment, fork this repository and run:
Expand Down
Binary file modified dist/dbt-bouncer.pex
Binary file not shown.
12 changes: 8 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
build-pex:
poetry run pex . \
-c dbt-bouncer \
-o ./dist/dbt-bouncer.pex \
--python-shebang='/usr/bin/env python' \
--interpreter-constraint ">=3.8,<3.13" \
--jobs 128 \
--max-install-jobs 0 \
--output-file ./dist/dbt-bouncer.pex \
--pip-version 23.2 \
--platform macosx_11_0_x86_64-cp-38-cp38 \
--platform macosx_11_0_x86_64-cp-39-cp39 \
--platform macosx_11_0_x86_64-cp-310-cp310 \
Expand All @@ -12,7 +14,9 @@ build-pex:
--platform manylinux2014_x86_64-cp-39-cp39 \
--platform manylinux2014_x86_64-cp-310-cp310 \
--platform manylinux2014_x86_64-cp-311-cp311 \
--platform manylinux2014_x86_64-cp-312-cp312
--platform manylinux2014_x86_64-cp-312-cp312 \
--python-shebang='/usr/bin/env python' \
--script dbt-bouncer

test:
poetry run pytest \
Expand Down