Skip to content

Commit c4a8331

Browse files
authored
Add Makefile for installing deps and running the tests (#8)
* Add development environment variables to dev.env which is included in Makefile * Update development instructions in README.md
1 parent 16d090a commit c4a8331

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

Diff for: Makefile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
include dev.env
2+
export
3+
4+
install_deps:
5+
pip install -r dev_requirements.txt
6+
pip install -r requirements.txt
7+
pip install -e .
8+
9+
run_tests:
10+
pytest test/integration/athena.dbtspec

Diff for: README.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,17 @@ The following features of dbt are not implemented on Athena:
8989

9090
### Running tests
9191

92-
#### `pytest-dbt-adapter`
93-
94-
* `pip install -r dev_requirements.txt`
95-
* Set required environmental variables
96-
* `DBT_TEST_ATHENA_S3_STAGING_DIR`
97-
* `DBT_TEST_ATHENA_REGION`
98-
* `DBT_TEST_ATHENA_DATABASE`
99-
* `DBT_TEST_ATHENA_SCHEMA`
100-
* `pytest test/integration/athena.dbtspec`
92+
First, install the adapter and its dependencies using `make` (see [Makefile](Makefile)):
93+
94+
```bash
95+
make install_deps
96+
```
97+
98+
Next, configure the environment variables in [dev.env](dev.env) to match your Athena development environment. Finally, run the tests using `make`:
99+
100+
```bash
101+
make run_tests
102+
```
101103

102104
### Community
103105

Diff for: dev.env

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
DBT_TEST_ATHENA_S3_STAGING_DIR=s3://athena-query-results/dbt/
2+
DBT_TEST_ATHENA_REGION=eu-west-1
3+
DBT_TEST_ATHENA_DATABASE=awsdatacatalog
4+
DBT_TEST_ATHENA_SCHEMA=dbt_athena_dev

0 commit comments

Comments
 (0)