Skip to content

Commit

Permalink
Merge pull request #15 from fishtown-analytics/bump-utils-0.5.0
Browse files Browse the repository at this point in the history
Bump utils to v 0.5.0
  • Loading branch information
Claire Carroll authored Jul 31, 2020
2 parents 1a83e20 + b28bb53 commit 309b069
Show file tree
Hide file tree
Showing 8 changed files with 161 additions and 56 deletions.
62 changes: 33 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- run:
run: setup_creds
command: |
echo $GCLOUD_SERVICE_KEY | base64 --decode --ignore-garbage > ${HOME}/gcloud-service-key.json
echo $BIGQUERY_SERVICE_ACCOUNT_JSON > ${HOME}/bigquery-service-key.json
- restore_cache:
key: deps1-{{ .Branch }}

Expand All @@ -22,62 +22,66 @@ jobs:
command: |
python3 -m venv venv
. venv/bin/activate
pip install dbt
pip install --upgrade pip setuptools
pip install dbt --upgrade
mkdir -p ~/.dbt
cp integration_tests/ci/sample.profiles.yml ~/.dbt/profiles.yml
- run:
name: "Run Tests - Postgres"
environment:
CI_DBT_USER: root
CI_DBT_PASS: ''
CI_DBT_PORT: 5432
CI_DBT_DBNAME: circle_test
POSTGRES_TEST_HOST: localhost
POSTGRES_TEST_USER: root
POSTGRES_TEST_PASS: ''
POSTGRES_TEST_PORT: 5432
POSTGRES_TEST_DBNAME: circle_test
command: |
. venv/bin/activate
cd integration_tests
dbt deps --target postgres
dbt seed --target postgres --full-refresh
dbt run --target postgres
dbt test --target postgres
dbt --warn-error deps --target postgres
dbt --warn-error seed --target postgres --full-refresh
dbt --warn-error run --target postgres
dbt --warn-error test --target postgres
- run:
name: "Run Tests - Redshift"
command: |
. venv/bin/activate
echo `pwd`
cd integration_tests
dbt deps --target redshift
dbt seed --target redshift --full-refresh
dbt run --target redshift
dbt test --target redshift
dbt --warn-error deps --target redshift
dbt --warn-error seed --target redshift --full-refresh
dbt --warn-error run --target redshift
dbt --warn-error test --target redshift
- run:
name: "Run Tests - Snowflake"
command: |
. venv/bin/activate
echo `pwd`
cd integration_tests
dbt deps --target snowflake
dbt seed --target snowflake --full-refresh
dbt run --target snowflake
dbt test --target snowflake
dbt --warn-error deps --target snowflake
dbt --warn-error seed --target snowflake --full-refresh
dbt --warn-error run --target snowflake
dbt --warn-error test --target snowflake
- run:
name: "Run Tests - BigQuery"
environment:
GCLOUD_SERVICE_KEY_PATH: "/home/circleci/gcloud-service-key.json"
BIGQUERY_SERVICE_KEY_PATH: "/home/circleci/bigquery-service-key.json"

command: |
. venv/bin/activate
echo `pwd`
cd integration_tests
dbt deps --target bigquery
dbt seed --target bigquery --full-refresh
dbt run --target bigquery
dbt test --target bigquery
dbt --warn-error deps --target bigquery
dbt --warn-error seed --target bigquery --full-refresh
dbt --warn-error run --target bigquery
dbt --warn-error test --target bigquery
- save_cache:
key: deps1-{{ .Branch }}
paths:
- "venv"
- "venv"
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @jtcohen6
63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
name: Bug report
about: Report a bug or an issue you've found with this package
title: ''
labels: bug, triage
assignees: ''

---

### Describe the bug
<!---
A clear and concise description of what the bug is. You can also use the issue title to do this
--->

### Steps to reproduce
<!---
In as much detail as possible, please provide steps to reproduce the issue. Sample data that triggers the issue, example model code, etc is all very helpful here.
--->

### Expected results
<!---
A clear and concise description of what you expected to happen.
--->

### Actual results
<!---
A clear and concise description of what you expected to happen.
--->

### Screenshots and log output
<!---
If applicable, add screenshots or log output to help explain your problem.
--->

### System information
**The contents of your `packages.yml` file:**

**Which database are you using dbt with?**
- [ ] postgres
- [ ] redshift
- [ ] bigquery
- [ ] snowflake
- [ ] other (specify: ____________)


**The output of `dbt --version`:**
```
<output goes here>
```

**The operating system you're using:**

**The output of `python --version`:**

### Additional context
<!---
Add any other context about the problem here. For example, if you think you know which line of code is causing the issue.
--->

### Are you interested in contributing the fix?
<!---
Let us know if you want to contribute the fix, and whether would need a hand getting started
--->
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Feature request
about: Suggest an idea for this package
title: ''
labels: enhancement, triage
assignees: ''

---

### Describe the feature
A clear and concise description of what you want to happen.

### Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

### Additional context
Is this feature database-specific? Which database(s) is/are relevant? Please include any other relevant context here.

### Who will this benefit?
What kind of use case will this feature be useful for? Please be specific and provide examples, this will help us prioritize properly.

### Are you interested in contributing this feature?
<!---
Let us know if you want to contribute the feature, and whether would need a hand getting started
--->
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Description & motivation
<!---
Describe your changes, and why you're making them.
-->

## Checklist
- [ ] I have verified that these changes work locally
- [ ] I have updated the README.md (if applicable)
- [ ] I have added tests & descriptions to my models (and macros if applicable)
50 changes: 25 additions & 25 deletions integration_tests/ci/sample.profiles.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# HEY! This file is used in the dbt-utils integrations tests with CircleCI.
# HEY! This file is used in the stitch-utils integrations tests with CircleCI.
# You should __NEVER__ check credentials into version control. Thanks for reading :)

config:
Expand All @@ -11,39 +11,39 @@ integration_tests:
outputs:
postgres:
type: postgres
host: localhost
user: "{{ env_var('CI_DBT_USER') }}"
pass: "{{ env_var('CI_DBT_PASS') }}"
port: "{{ env_var('CI_DBT_PORT') }}"
dbname: "{{ env_var('CI_DBT_DBNAME') }}"
schema: dbt_utils_integration_tests_postgres
host: "{{ env_var('POSTGRES_TEST_HOST') }}"
user: "{{ env_var('POSTGRES_TEST_USER') }}"
pass: "{{ env_var('POSTGRES_TEST_PASS') }}"
port: "{{ env_var('POSTGRES_TEST_PORT') | as_number }}"
dbname: "{{ env_var('POSTGRES_TEST_DBNAME') }}"
schema: stitch_utils_integration_tests_postgres
threads: 1

redshift:
type: redshift
host: "{{ env_var('CI_REDSHIFT_DBT_HOST') }}"
user: "{{ env_var('CI_REDSHIFT_DBT_USER') }}"
pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}"
dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}"
port: 5439
schema: dbt_utils_integration_tests_redshift
host: "{{ env_var('REDSHIFT_TEST_HOST') }}"
user: "{{ env_var('REDSHIFT_TEST_USER') }}"
pass: "{{ env_var('REDSHIFT_TEST_PASS') }}"
dbname: "{{ env_var('REDSHIFT_TEST_DBNAME') }}"
port: "{{ env_var('REDSHIFT_TEST_PORT') | as_number }}"
schema: stitch_utils_integration_tests_redshift
threads: 1

bigquery:
type: bigquery
method: service-account
keyfile: "{{ env_var('GCLOUD_SERVICE_KEY_PATH') }}"
project: 'dbt-integration-tests'
schema: dbt_utils_integration_tests_bigquery
keyfile: "{{ env_var('BIGQUERY_SERVICE_KEY_PATH') }}"
project: "{{ env_var('BIGQUERY_TEST_DATABASE') }}"
schema: stitch_utils_integration_tests_bigquery
threads: 1

snowflake:
type: snowflake
account: "{{ env_var('CI_SNOWFLAKE_DBT_ACCOUNT') }}"
user: "{{ env_var('CI_SNOWFLAKE_DBT_USER') }}"
password: "{{ env_var('CI_SNOWFLAKE_DBT_PASS') }}"
role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}"
database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}"
warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}"
schema: dbt_utils_integration_tests_snowflake
threads: 1
account: "{{ env_var('SNOWFLAKE_TEST_ACCOUNT') }}"
user: "{{ env_var('SNOWFLAKE_TEST_USER') }}"
password: "{{ env_var('SNOWFLAKE_TEST_PASSWORD') }}"
role: "{{ env_var('SNOWFLAKE_TEST_ROLE') }}"
database: "{{ env_var('SNOWFLAKE_TEST_DATABASE') }}"
warehouse: "{{ env_var('SNOWFLAKE_TEST_WAREHOUSE') }}"
schema: stitch_utils_integration_tests_snowflake
threads: 1
5 changes: 4 additions & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ config-version: 2
profile: 'integration_tests'

source-paths: ["models"]
analysis-paths: ["analysis"]
analysis-paths: ["analysis"]
test-paths: ["tests"]
data-paths: ["data"]
macro-paths: ["macros"]
Expand All @@ -15,3 +15,6 @@ target-path: "target"
clean-targets:
- "target"
- "dbt_modules"

seeds:
+quote_columns: false
2 changes: 1 addition & 1 deletion packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- package: fishtown-analytics/dbt_utils
version: ">=0.1.19"
version: [">=0.4.0", "<0.6.0"]

0 comments on commit 309b069

Please sign in to comment.