Skip to content

Commit b29d171

Browse files
authored
Update to 2.1.0 (#243)
* Add note in README about using Docker for Windows with --platform * Add CI to test generating docs. This will catch errors around doc build failures on PRs. This generates docs through a containerized environment, as opposed to the GitHub Action, which builds it's own environment. We may want to consider utilizing the dockerized environment for the action as well to reduce any sync issues * Add brotli_asgi to stac_fastapi.api * Add pull request template. * Update pypi shield in README * Fix alt text for license sheild * Refactor changelog This commit modifies the changelog to be more in line with changelogs of other stac-utils projects, and fit more to the 'keep a changelog' pattern. * Update CHANGELOG for 2.1.0 * Update versions to 2.1.0
1 parent 285e24f commit b29d171

File tree

13 files changed

+142
-21
lines changed

13 files changed

+142
-21
lines changed

.github/pull_request_template.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
**Related Issue(s):** #
2+
3+
4+
**Description:**
5+
6+
7+
**PR Checklist:**
8+
9+
- [ ] Code is formatted and linted (run `pre-commit run --all-files`)
10+
- [ ] Tests pass (run `make test`)
11+
- [ ] Documentation has been updated to reflect changes, if applicable, and docs build successfully (run `make docs`)
12+
- [ ] Changes are added to the [CHANGELOG](https://github.com/stac-utils/pystac/blob/master/CHANGES.md).

.github/workflows/cicd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,9 @@ jobs:
100100
POSTGRES_HOST_READER: localhost
101101
POSTGRES_HOST_WRITER: localhost
102102
POSTGRES_PORT: 5432
103+
test-docs:
104+
runs-on: ubuntu-latest
105+
steps:
106+
- uses: actions/checkout@v2
107+
- name: Test generating docs
108+
run: make docs

CHANGES.md

Lines changed: 61 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,69 @@
1-
## UNRELEASED
1+
# Changelog
22

3-
* remove shapely from stac_fastapi.pgstac requirements (https://github.com/stac-utils/stac-fastapi/pull/225)
3+
## [Unreleased]
44

5-
## 2.0.0 (2021-07)
5+
### Added
66

7-
* Refactor stac-fastapi into submodules (https://github.com/stac-utils/stac-fastapi/pull/106)
8-
* Add pgstac backend (https://github.com/stac-utils/stac-fastapi/pull/126)
9-
* Upgrade to stac-pydantic 2.0.0 and stac-spec 1.0.0 (https://github.com/stac-utils/stac-fastapi/pull/181)
7+
### Removed
108

11-
## 1.1.0 (2021-01-28)
9+
### Changed
1210

13-
* Improve how the library declares API extensions (https://github.com/stac-utils/arturo-stac-api/pull/54)
14-
* Add postgres bulk transactions client (https://github.com/stac-utils/arturo-stac-api/pull/59)
15-
* Update TiTiler version (https://github.com/stac-utils/arturo-stac-api/pull/61)
16-
* Use attrs instead of dataclasses (https://github.com/stac-utils/arturo-stac-api/pull/73)
17-
* Remove postgres database connection from API layer (https://github.com/stac-utils/arturo-stac-api/pull/74)
18-
* Fix `pre-commit` config (https://github.com/stac-utils/arturo-stac-api/pull/75)
11+
### Fixed
1912

20-
## 1.0.0 (2020-09-25)
13+
## [2.1.0]
14+
15+
### Added
16+
17+
* Added filter extension. ([#165](https://github.com/stac-utils/stac-fastapi/pull/165))
18+
* Add Support for CQL JSON to PGStac Backend ([#209](https://github.com/stac-utils/stac-fastapi/pull/209))
19+
* Added item_serializer and item_table to BulkTransactionsClient in sqlalchemy backend ([#210](https://github.com/stac-utils/stac-fastapi/pull/210))
20+
* Enable conformance class configuration ([#214](https://github.com/stac-utils/stac-fastapi/pull/214))
21+
* Add/fix landing page links ([#229](https://github.com/stac-utils/stac-fastapi/pull/229))
22+
* Correct response codes for bad/unusable bboxes ([#235](https://github.com/stac-utils/stac-fastapi/pull/235))
23+
* Add a "method" field for search links ([#236](https://github.com/stac-utils/stac-fastapi/pull/236))
24+
* Add extension schemas to landing ([#237](https://github.com/stac-utils/stac-fastapi/pull/237))
25+
26+
### Removed
27+
28+
* Remove shapely from stac_fastapi.pgstac requirements ([#225](https://github.com/stac-utils/stac-fastapi/pull/225))
29+
30+
### Changed
31+
32+
* Update to STAC API 1.0.0-beta.3 ([#239](https://github.com/stac-utils/stac-fastapi/pull/239))
33+
34+
### Fixed
35+
36+
* Make collection title is optional in landing page links ([#198](https://github.com/stac-utils/stac-fastapi/pull/198))
37+
* Preserve relative paths on link generation ([#199](https://github.com/stac-utils/stac-fastapi/pull/199))
38+
* Fix collection endpoint return value to match spec (fixes regression) ([#232](https://github.com/stac-utils/stac-fastapi/pull/232))
39+
* Return empty item collection instead of error when searching ([#233](https://github.com/stac-utils/stac-fastapi/pull/233))
40+
* Correct response codes for bad/unusable bboxes ([#235](https://github.com/stac-utils/stac-fastapi/pull/235))
41+
* Update pgstac to return 400 on invalid date parameter ([#240](https://github.com/stac-utils/stac-fastapi/pull/240))
42+
43+
## [2.0.0]
44+
_2021-07_
45+
46+
* Refactor stac-fastapi into submodules ([#106](https://github.com/)stac-utils/stac-fastapi/pull/106)
47+
* Add pgstac backend ([#126](https://github.com/stac-utils/stac-fastapi/pull/126))
48+
* Upgrade to stac-pydantic 2.0.0 and stac-spec 1.0.0 ([#181](https://github.com/stac-utils/stac-fastapi/pull/181))
49+
50+
## [1.1.0]
51+
_2021-01-28_
52+
53+
* Improve how the library declares API extensions ([#54](https://github.com/stac-utils/arturo-stac-api/pull/54))
54+
* Add postgres bulk transactions client ([#59](https://github.com/stac-utils/arturo-stac-api/pull/59))
55+
* Update TiTiler version ([#61](https://github.com/stac-utils/arturo-stac-api/pull/61))
56+
* Use attrs instead of dataclasses ([#73](https://github.com/stac-utils/arturo-stac-api/pull/73))
57+
* Remove postgres database connection from API layer ([#74](https://github.com/stac-utils/arturo-stac-api/pull/74))
58+
* Fix `pre-commit` config ([#75](https://github.com/stac-utils/arturo-stac-api/pull/75))
59+
60+
## [1.0.0]
61+
_2020-09-25_
2162

2263
* First PyPi release!
64+
65+
[Unreleased]: <https://github.com/stac-utils/stac-fastapi/compare/2.1.0..main>
66+
[2.1.0]: <https://github.com/stac-utils/stac-fastapi/compare/2.1.0..main>
67+
[2.0.0]: <https://github.com/stac-utils/stac-fastapi/compare/1.1.0..2.0.0>
68+
[1.1.0]: <https://github.com/stac-utils/stac-fastapi/compare/1.0.0..1.1.0>
69+
[1.0.0]: <https://github.com/stac-utils/stac-fastapi/tree/1.0.0>

Dockerfile.docs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM python:3.8-slim
2+
3+
RUN python -m pip install --upgrade pip
4+
RUN python -m pip install mkdocs mkdocs-material pdocs
5+
6+
COPY . /opt/src
7+
8+
WORKDIR /opt/src
9+
10+
RUN python -m pip install -e \
11+
stac_fastapi/api \
12+
stac_fastapi/types \
13+
stac_fastapi/extensions \
14+
stac_fastapi/sqlalchemy
15+
16+
17+
CMD ["pdocs", \
18+
"as_markdown", \
19+
"--output_dir", \
20+
"docs/api/", \
21+
"--exclude_source", \
22+
"--overwrite", \
23+
"stac_fastapi"]

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,13 @@ pgstac-install: pybase-install
6767
.PHONY: sqlalchemy-install
6868
sqlalchemy-install: pybase-install
6969
pip install -e ./stac_fastapi/sqlalchemy[dev,server]
70+
71+
.PHONY: docs-image
72+
docs-image:
73+
docker-compose -f docker-compose.docs.yml \
74+
build
75+
76+
.PHONY: docs
77+
docs: docs-image
78+
docker-compose -f docker-compose.docs.yml \
79+
run docs

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<img src="https://github.com/stac-utils/stac-fastapi/workflows/stac-fastapi/badge.svg" alt="Test">
88
</a>
99
<a href="https://pypi.org/project/stac-fastapi" target="_blank">
10-
<img src="https://img.shields.io/pypi/v/stac-fastapi?color=%2334D058&label=pypi%20package" alt="Package version">
10+
<img src="https://img.shields.io/pypi/v/stac-fastapi.api?color=%2334D058&label=pypi%20package" alt="Package version">
1111
</a>
1212
<a href="https://github.com/stac-utils/stac-fastapi/blob/master/LICENSE" target="_blank">
13-
<img src="https://img.shields.io/github/license/stac-utils/stac-fastapi.svg" alt="Downloads">
13+
<img src="https://img.shields.io/github/license/stac-utils/stac-fastapi.svg" alt="License">
1414
</a>
1515
</p>
1616

@@ -78,6 +78,10 @@ For local development it is often more convenient to run the application outside
7878
make docker-run
7979
```
8080

81+
#### Note to Docker for Windows users
82+
83+
You'll need to enable experimental features on Docker for Windows in order to run the docker-compose, due to the "--platform" flag that is required to allow the project to run on some Apple architectures. To do this, open Docker Desktop, go to settings, select "Docker Engine", and modify the configuration JSON to have `"experimental": true`.
84+
8185
### Testing
8286
The database container provided by the docker-compose stack must be running. Run all tests:
8387
```bash

docker-compose.docs.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: '3'
2+
3+
services:
4+
docs:
5+
container_name: stac-fastapi-docs-dev
6+
build:
7+
context: .
8+
dockerfile: Dockerfile.docs
9+
platform: linux/amd64
10+
environment:
11+
- POSTGRES_USER=username
12+
- POSTGRES_PASS=password
13+
- POSTGRES_DBNAME=postgis
14+
- POSTGRES_HOST_READER=database
15+
- POSTGRES_HOST_WRITER=database
16+
- POSTGRES_PORT=5432
17+
volumes:
18+
- .:/opt/src

stac_fastapi/api/setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"attrs",
1111
"pydantic[dotenv]",
1212
"stac_pydantic==2.0.*",
13+
"brotli_asgi",
1314
]
1415

1516
extra_reqs = {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""library version."""
2-
__version__ = "2.0.0"
2+
__version__ = "2.1.0"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""library version."""
2-
__version__ = "2.0.0"
2+
__version__ = "2.1.0"

0 commit comments

Comments
 (0)