Skip to content
Open
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
9 changes: 0 additions & 9 deletions Dockerfile

This file was deleted.

15 changes: 0 additions & 15 deletions Jenkinsfile

This file was deleted.

4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include dbt_unit_test/templates/**/*
include dbt_unit_test/templates/*
include src/dbt_unit_test/assets/**/*
include src/dbt_unit_test/assets/*
47 changes: 47 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

help:
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "%-30s %s\n", $$1, $$2}'

# Local installation
.PHONY: init clean lock update install

install: ## Initalise the virtual env installing deps
pipenv install --dev

clean: ## Remove all the unwanted clutter
find src -type d -name __pycache__ | xargs rm -rf
find src -type d -name '*.egg-info' | xargs rm -rf
pipenv clean
rm -rf build
rm -rf dist

lock: ## Lock dependencies
pipenv lock

update: ## Update dependencies (whole tree)
pipenv update --dev

sync: ## Install dependencies as per the lock file
pipenv sync --dev

# Linting and formatting
.PHONY: lint format

lint: ## Lint files with flake and mypy
pipenv run flake8 src tests functional
pipenv run mypy src tests functional
pipenv run black --check src tests functional
pipenv run isort --check-only src tests functional

format: ## Run black and isort
pipenv run black src tests functional
pipenv run isort src tests functional

# Testing

.PHONY: test functional
test: ## Run unit tests
TZ=UTC pipenv run pytest tests

functional: ## Run functional tests
TZ=UTC pipenv run pytest functional
21 changes: 21 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
click = "*"
dbt-core = "*"

[dev-packages]
black = "*"
flake8 = "*"
isort = "*"
mypy = "*"
pytest = "*"
pytest-cov = "*"
pytest-mock = "*"
dbt-unit-test = { path = ".", editable = true }

[requires]
python_version = "3.8"
836 changes: 836 additions & 0 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,4 @@ The generic version of this code is not so easy on the eyes, but what is importa
)
}}
```
Now we can write many tests for this reusable code, and use it with confidence because we have tested it thoroughly!
Now we can write many tests for this reusable code, and use it with confidence because we have tested it thoroughly!
8 changes: 0 additions & 8 deletions codecov.yml

This file was deleted.

81 changes: 0 additions & 81 deletions dbt_unit_test/app.py

This file was deleted.

28 changes: 0 additions & 28 deletions dbt_unit_test/log_setup.py

This file was deleted.

104 changes: 0 additions & 104 deletions dbt_unit_test/operations.py

This file was deleted.

9 changes: 0 additions & 9 deletions dbt_unit_test/templates/batch.sql

This file was deleted.

10 changes: 0 additions & 10 deletions dbt_unit_test/templates/diff_macro.sql

This file was deleted.

6 changes: 0 additions & 6 deletions dbt_unit_test/templates/drop_schema_macro.sql

This file was deleted.

6 changes: 0 additions & 6 deletions dbt_unit_test/templates/model.yml

This file was deleted.

23 changes: 0 additions & 23 deletions docker-compose.yml

This file was deleted.

Loading