Skip to content

Commit

Permalink
Merge branch 'main' into pagination-for-recent-pgstac-versions
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago authored Aug 21, 2024
2 parents d7cc219 + c7b17e6 commit f3ae681
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
images: ghcr.io/stac-utils/stac-fastapi-pgstac
- name: Build and push Docker image
uses: docker/build-push-action@v6.5.0
uses: docker/build-push-action@v6.7.0
with:
context: .
file: Dockerfile
Expand Down
25 changes: 13 additions & 12 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,35 @@

## [Unreleased]

- Fix Docker compose file, so example data can be loaded into database (author @zstatmanweil, https://github.com/stac-utils/stac-fastapi-pgstac/pull/142)
- Handle `next` and `dev` tokens now returned as links from pgstac>=0.9.0

## [3.0.0] - 2024-08-02

- Enable filter extension for `GET /items` requests and add `Queryables` links in `/collections` and `/collections/{collection_id}` responses ([#89](https://github.com/stac-utils/stac-fastapi-pgstac/pull/89))
- Allow to omit `collection` in bulk item insertions. Same identifier checks as with single insertions ([#113](https://github.com/stac-utils/stac-fastapi-pgstac/pull/113))
- Handle `next` and `dev` tokens now returned as links from pgstac>=0.9.0
- Set `stac-fastapi-*` requirements to **~=3.0**

## [3.0.0a4] - 2024-07-10
## 3.0.0a4 - 2024-07-10

- Update stac-fastapi libraries to `~=3.0.0b2`

## [3.0.0a3] - 2024-07-01
## 3.0.0a3 - 2024-07-01

- Use `quote_plus` instead of `quote` to encode database's password ([#122](https://github.com/stac-utils/stac-fastapi-pgstac/pull/122))
- Update stac-fastapi libraries to `~=3.0.0a4`

## [3.0.0a2] - 2024-06-18
## 3.0.0a2 - 2024-06-18

- Update stac-fastapi libraries to `~=3.0.0a3`
- make sure the application can work without any extension

## [3.0.0a1] - 2024-05-22
## 3.0.0a1 - 2024-05-22

- Update stac-fastapi libraries to `~=3.0.0a1`
- Update stac-pydantic dependency to `==3.1.*`

## [3.0.0a0] - 2024-05-10
## 3.0.0a0 - 2024-05-10

### Changed

Expand Down Expand Up @@ -331,12 +336,8 @@ As a part of this release, this repository was extracted from the main

- First PyPi release!

[Unreleased]: <https://github.com/stac-utils/stac-fastapi-pgstac/compare/3.0.0a4..main>
[3.0.0a4]: <https://github.com/stac-utils/stac-fastapi-pgstac/compare/3.0.0a3..3.0.0a4>
[3.0.0a3]: <https://github.com/stac-utils/stac-fastapi-pgstac/compare/3.0.0a2..3.0.0a3>
[3.0.0a2]: <https://github.com/stac-utils/stac-fastapi-pgstac/compare/3.0.0a1..3.0.0a2>
[3.0.0a1]: <https://github.com/stac-utils/stac-fastapi-pgstac/compare/3.0.0a0..3.0.0a1>
[3.0.0a0]: <https://github.com/stac-utils/stac-fastapi-pgstac/compare/2.5.0..3.0.0a0>
[Unreleased]: <https://github.com/stac-utils/stac-fastapi-pgstac/compare/3.0.0..main>
[3.0.0]: <https://github.com/stac-utils/stac-fastapi-pgstac/compare/2.5.0..3.0.0>
[2.5.0]: <https://github.com/stac-utils/stac-fastapi-pgstac/compare/2.4.11..2.5.0>
[2.4.11]: <https://github.com/stac-utils/stac-fastapi-pgstac/compare/2.4.10..2.4.11>
[2.4.10]: <https://github.com/stac-utils/stac-fastapi-pgstac/compare/2.4.9..2.4.10>
Expand Down
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ This repo is set to use `pre-commit` to run *isort*, *flake8*, *pydocstring*, *b
pre-commit install
```

To run the service on 0.0.0.0:8082 and ingest example data into the database (the "joplin" collection):

```shell
make run-joplin
```

You can connect to the database with a database tool on port 5439 to inspect and see the data.

To run the tests:

```shell
make test
```

## Docs

```bash
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ APP_PORT ?= 8080
EXTERNAL_APP_PORT ?= ${APP_PORT}
LOG_LEVEL ?= warning

run = docker-compose run --rm \
run = docker compose run --rm \
-p ${EXTERNAL_APP_PORT}:${APP_PORT} \
-e APP_HOST=${APP_HOST} \
-e APP_PORT=${APP_PORT} \
app

runtests = docker-compose run --rm tests
runtests = docker compose run --rm tests

.PHONY: image
image:
docker-compose build
docker compose build

.PHONY: docker-run
docker-run: image
docker-compose up
docker compose up

.PHONY: docker-run-nginx-proxy
docker-run-nginx-proxy:
docker-compose -f docker-compose.yml -f docker-compose.nginx.yml up
docker compose -f docker-compose.yml -f docker-compose.nginx.yml up

.PHONY: docker-shell
docker-shell:
Expand All @@ -34,22 +34,22 @@ test:

.PHONY: run-database
run-database:
docker-compose run --rm database
docker compose run --rm database

.PHONY: run-joplin
run-joplin:
docker-compose run --rm loadjoplin
docker compose run --rm loadjoplin

.PHONY: install
install:
pip install -e .[dev,server]

.PHONY: docs-image
docs-image:
docker-compose -f docker-compose.docs.yml \
docker compose -f docker-compose.docs.yml \
build

.PHONY: docs
docs: docs-image
docker-compose -f docker-compose.docs.yml \
docker compose -f docker-compose.docs.yml \
run docs
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ It validates requests and data sent to a [PgSTAC](https://github.com/stac-utils/
All other processing and search is provided directly using PgSTAC procedural sql / plpgsql functions on the database.
PgSTAC stores all collection and item records as jsonb fields exactly as they come in allowing for any custom fields to be stored and retrieved transparently.

## `PgSTAC` version

`stac-fastapi-pgstac` depends on [`pgstac`](https://stac-utils.github.io/pgstac/pgstac/) database schema and [`pypgstac`](https://stac-utils.github.io/pgstac/pypgstac/) python package.

| stac-fastapi-pgstac Version | pgstac |
| --| --|
| 2.5 | >=0.7,<0.8 |
| 3.0 | >=0.8,<0.9 |

## Usage

PgSTAC is an external project and may be used by multiple front ends.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0a4
3.0.0
15 changes: 6 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,12 @@ services:
volumes:
- ./stac_fastapi:/app/stac_fastapi
- ./scripts:/app/scripts
command:
- "./scripts/wait-for-it.sh"
- "-t"
- "60"
- "app:8082"
- "--"
- "python"
- "/app/scripts/ingest_joplin.py"
- "http://app:8082"
command: >
/bin/sh -c "
./scripts/wait-for-it.sh -t 60 app:8082 &&
python -m pip install requests &&
python /app/scripts/ingest_joplin.py http://app:8082
"
depends_on:
- database
- app
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"orjson",
"pydantic",
"stac_pydantic==3.1.*",
"stac-fastapi.api~=3.0.0b2",
"stac-fastapi.extensions~=3.0.0b2",
"stac-fastapi.types~=3.0.0b2",
"stac-fastapi.api~=3.0",
"stac-fastapi.extensions~=3.0",
"stac-fastapi.types~=3.0",
"asyncpg",
"buildpg",
"brotli_asgi",
Expand Down
2 changes: 1 addition & 1 deletion stac_fastapi/pgstac/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""library version."""

__version__ = "3.0.0a4"
__version__ = "3.0.0"

0 comments on commit f3ae681

Please sign in to comment.