Skip to content

rename a few targets, and fix references to them #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**Related Issue(s):** #
**Related Issue(s):**

- #

**Description:**

Expand All @@ -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).
- [ ] Changes are added to the [CHANGELOG](https://github.com/stac-utils/pystac/blob/master/CHANGES.md), if applicable
File renamed without changes.
29 changes: 13 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,35 @@ 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 && \
pip install -e ./stac_fastapi/api[dev] && \
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
Expand Down
30 changes: 24 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```