From ede7430126d551796a1d9b086d3cfe8d97503b3c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 20 May 2020 17:04:40 -0700 Subject: local/dev indexing command --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 7e6d820..5fb6a73 100644 --- a/Makefile +++ b/Makefile @@ -10,21 +10,21 @@ help: ## Print info about all commands .PHONY: test test: ## Run all tests and lints - pipenv run pytest + ENV_FOR_DYNACONF=test pipenv run pytest pipenv run mypy fatcat_scholar/*.py tests/ --ignore-missing-imports .PHONY: dev dev: ## Run web service locally, with reloading - pipenv run uvicorn fatcat_scholar.web:app --reload + ENV_FOR_DYNACONF=dev pipenv run uvicorn fatcat_scholar.web:app --reload --port 9819 .PHONY: run run: ## Run web service under gunicorn pipenv run gunicorn fatcat_scholar.web:app -w 4 -k uvicorn.workers.UvicornWorker -.PHONY: reset-index-dev -reset-index-dev: ## Delete/Create DEV elasticsearch fulltext index locally - http delete :9200/dev_scholar_fulltext_v01 && true - http put ":9200/qa_scholar_fulltext_v01?include_type_name=false" < schema/scholar_fulltext.v01.json - http delete :9200/dev_scholar_fulltext && true - http put :9200/dev_scholar_fulltext_v01/_alias/dev_scholar_fulltext +.PHONY: dev-index +dev-index: ## Delete/Create DEV elasticsearch fulltext index locally + http delete ":9200/dev_scholar_fulltext_v01" && true + http put ":9200/dev_scholar_fulltext_v01?include_type_name=true" < schema/scholar_fulltext.v01.json + http put ":9200/dev_scholar_fulltext_v01/_alias/dev_scholar_fulltext" + cat data/sim_intermediate.json data/work_intermediate.json | pipenv run python -m fatcat_scholar.transform run_transform | esbulk -verbose -size 200 -id key -w 4 -index dev_scholar_fulltext_v01 -type _doc -- cgit v1.2.3