diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f402d368..9459f2df 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,5 +1,6 @@ -**Related Issue(s):** # +**Related Issue(s):** +- # **Description:** @@ -9,4 +10,4 @@ - [ ] Code is formatted and linted (run `pre-commit run --all-files`) - [ ] Tests pass (run `make test`) - [ ] Documentation has been updated to reflect changes, if applicable, and docs build successfully (run `make docs`) -- [ ] Changes are added to the [CHANGELOG](https://github.com/stac-utils/pystac/blob/master/CHANGES.md). \ No newline at end of file +- [ ] Changes are added to the [CHANGELOG](https://github.com/stac-utils/pystac/blob/master/CHANGES.md), if applicable \ No newline at end of file diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yml similarity index 100% rename from .github/workflows/cicd.yaml rename to .github/workflows/cicd.yml diff --git a/Makefile b/Makefile index f3bae461..18eed377 100644 --- a/Makefile +++ b/Makefile @@ -11,29 +11,26 @@ run_es = docker-compose \ -e APP_PORT=${APP_PORT} \ app-elasticsearch -.PHONY: es-image -es-image: +.PHONY: image +image: docker-compose build -.PHONY: docker-run-es -docker-run-es: es-image +.PHONY: docker-run +docker-run: image $(run_es) -.PHONY: docker-shell-es -docker-shell-es: +.PHONY: docker-shell +docker-shell: $(run_es) /bin/bash -.PHONY: test-es -test-es: - $(run_es) /bin/bash -c 'export && ./scripts/wait-for-it.sh elasticsearch:9200 && cd /app/stac_fastapi/elasticsearch/tests/ && pytest' +.PHONY: test +test: + $(run_es) /bin/bash -c 'export && ./scripts/wait-for-it-es.sh elasticsearch:9200 && cd /app/stac_fastapi/elasticsearch/tests/ && pytest' -.PHONY: run-es-database -run-es-database: +.PHONY: run-database +run-database: docker-compose run --rm elasticsearch -.PHONY: test -test: test-elasticsearch - .PHONY: pybase-install pybase-install: pip install wheel && \ @@ -41,8 +38,8 @@ pybase-install: pip install -e ./stac_fastapi/types[dev] && \ pip install -e ./stac_fastapi/extensions[dev] -.PHONY: es-install -es-install: pybase-install +.PHONY: install +install: pybase-install pip install -e ./stac_fastapi/elasticsearch[dev,server] .PHONY: docs-image diff --git a/README.md b/README.md index e6f3ef5b..6c6c6747 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,30 @@ Elasticsearch backend for stac-fastapi. **WIP** This backend is not yet stable (notice no releases yet), so use the pgstac backend instead. ------- -#### Running API on localhost:8083 +## Development Environment Setup -```docker-compose up``` +Install [pre-commit](https://pre-commit.com/#install). ------- -#### Testing +Prior to commit, run: -```make test-es``` +``` +pre-commit run --all-files` +``` + +## Building + +``` +docker-compose build +``` + +## Running API on localhost:8083 + +``` +docker-compose up +``` + +## Testing + +``` +make test +```