From 78f000750003312616ba667648cd15846b1d9712 Mon Sep 17 00:00:00 2001 From: winnie <91998347+gwenwindflower@users.noreply.github.com> Date: Thu, 28 Sep 2023 02:51:54 -0500 Subject: [PATCH] Add pre commit docs and setup script (#19) * Add setup script * Add .user.yml to .gitignore --- .gitignore | 2 ++ .user.yml | 1 - requirements.txt | 2 +- setup.sh | 25 +++++++++++++++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) delete mode 100644 .user.yml create mode 100644 setup.sh diff --git a/.gitignore b/.gitignore index d5b0068..b095cb2 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ env *.wal data/*.json.gz + +.user.yml diff --git a/.user.yml b/.user.yml deleted file mode 100644 index cf1b6a7..0000000 --- a/.user.yml +++ /dev/null @@ -1 +0,0 @@ -id: 6055b576-7a6c-480a-ba40-5ceb2cf42bce diff --git a/requirements.txt b/requirements.txt index eaf3c10..03d0056 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ black~=23.9.1 dbt-metricflow[duckdb]~=0.3.0 +duckdb~=0.8.1 halo~=0.0.31 isort~=5.12.0 pre-commit~=3.4.0 @@ -8,4 +9,3 @@ ruff~=0.0.291 sqlfluff-templater-dbt~=2.3.2 sqlfluff~=2.3.2 tqdm~=4.66.1 -duckdb~=0.8.1 diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..764f94d --- /dev/null +++ b/setup.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# This script will run all of the initial setup commands for the project +# That said, we encourage you to run the commands one by one in the terminal +# so that you can see what is happening and understand the process better + +# Set up a Python virtual environment +python3 -m venv .venv + +# Activate the virtual environment +source .venv/bin/activate + +# Upgrade pip +python3 -m pip install --upgrade pip + +# Install the Python dependencies +python3 -m pip install -r requirements.txt + +# Install the pre-commit hooks +pre-commit install + +# Install the Node dependencies +npm install --prefix ./reports + +# Install the dbt packages +dbt deps