diff --git a/README.md b/README.md index 620cf65..5f7cd02 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ POSTGRES_DB=rgraph Start database ```sh -docker-compose up +docker-compose -p recipe-dev up ``` Example `sites.json` @@ -41,6 +41,11 @@ python src/db.py python src/insert_sites.py data/sites.json ``` +Shutdown database +```sh +docker-compose -p recipe-dev down +``` + ## Usage ### Scrape import new recipes @@ -72,6 +77,31 @@ options: -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 > ☑ automate scraping\ > ☑ extracting quantity and name (via regex)\