added blurb about testing
This commit is contained in:
parent
b9e754c984
commit
51d631daf6
32
README.md
32
README.md
|
|
@ -20,7 +20,7 @@ POSTGRES_DB=rgraph
|
||||||
|
|
||||||
Start database
|
Start database
|
||||||
```sh
|
```sh
|
||||||
docker-compose up
|
docker-compose -p recipe-dev up
|
||||||
```
|
```
|
||||||
|
|
||||||
Example `sites.json`
|
Example `sites.json`
|
||||||
|
|
@ -41,6 +41,11 @@ python src/db.py
|
||||||
python src/insert_sites.py data/sites.json
|
python src/insert_sites.py data/sites.json
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Shutdown database
|
||||||
|
```sh
|
||||||
|
docker-compose -p recipe-dev down
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
### Scrape
|
### Scrape
|
||||||
import new recipes
|
import new recipes
|
||||||
|
|
@ -72,6 +77,31 @@ options:
|
||||||
-v, --verbose
|
-v, --verbose
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
For testing create a new set up docker containers. Tests will fail if
|
||||||
|
the database is already initiated.
|
||||||
|
|
||||||
|
Starting testing db
|
||||||
|
```sh
|
||||||
|
docker-compose -p recipe-test up
|
||||||
|
```
|
||||||
|
|
||||||
|
running tests
|
||||||
|
```sh
|
||||||
|
pytest
|
||||||
|
```
|
||||||
|
|
||||||
|
**WARNINING**: If you get `ERROR at setup of test_db_connection` and
|
||||||
|
`ERROR at setup of test_db_class_creation`, please check if testing database is
|
||||||
|
already initiated. Testing is destructive and should be done on a fresh database.
|
||||||
|
|
||||||
|
|
||||||
|
Shutting down testing db
|
||||||
|
```sh
|
||||||
|
docker-compose -p recipe-test down
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
> ☑ automate scraping\
|
> ☑ automate scraping\
|
||||||
> ☑ extracting quantity and name (via regex)\
|
> ☑ extracting quantity and name (via regex)\
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue