Skip to content

Commit

Permalink
📝 Add local setup section in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauralicja committed Aug 16, 2021
1 parent f13fdde commit d6858f2
Showing 1 changed file with 37 additions and 12 deletions.
49 changes: 37 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,51 @@ insert_task = SQLiteInsert()
insert_task.run(table_name=TABLE_NAME, dtypes=dtypes, db_path=database_path, df=df, if_exists="replace")
```

## Local Setup

Before testing or running flows setup the enviroment by following these steps:

Clone repository, enter it and checkout release branch
```
git clone git@github.com:dyvenia/viadot.git
cd viadot {X.X.X}
```

Enter docker subdirectory, setup docker enviroment

```
cd docker
./update.sh
```

__Note__: you may need to grant executable privilege to the update and run scripts

Run the enviroment

```
./run.sh
```

Enter the enviroment and install dependencies

```
docker exec -it viadot_testing bash
pip install -e --user .
```

## Running tests

To run tests, log into the container and run pytest:
```
cd viadot/docker
run.sh
docker exec -it viadot_testing bash
pytest
```

## Running flows locally

You can run the example flows from the terminal:
```
run.sh
docker exec -it viadot_testing bash
FLOW_NAME=hello_world; python -m viadot.examples.$FLOW_NAME
```
Expand All @@ -65,16 +96,10 @@ However, when developing, the easiest way is to use the provided Jupyter Lab con


## How to contribute
1. Clone the release branch
2. Pull the docker env by running `viadot/docker/update.sh -t dev`
3. Run the env with `viadot/docker/run.sh`
4. Log into the dev container and install in development mode so that viadot will auto-install at each code change:
```
docker exec -it viadot_testing bash
pip install -e .
```
5. Edit and test your changes with `pytest`
6. Submit a PR. The PR should contain the following:

1. Setup locally
2. Test your changes with `pytest`
3. Submit a PR. The PR should contain the following:
- new/changed functionality
- tests for the changes
- changes added to `CHANGELOG.md`
Expand Down

0 comments on commit d6858f2

Please sign in to comment.