Skip to content

Commit 39d17c8

Browse files
committed
Merge branch 'main' of https://github.com/developmentseed/eoapi into NewVpc
2 parents a106e4b + f76a5b4 commit 39d17c8

32 files changed

+4091
-261
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ on:
77
- main
88
tags:
99
- '*'
10+
paths:
11+
# Only rebuild website when docs have changed
12+
- 'runtime/**'
13+
- 'dockerfiles/**'
14+
- 'docker-compose.*'
15+
- '.github/workflows/ci.yml'
16+
- '.isort.cfg'
17+
- '.mypy.ini'
18+
- 'ruff.toml'
19+
- '.pre-commit-config.yaml'
1020
pull_request:
1121

1222
jobs:
@@ -28,7 +38,7 @@ jobs:
2838
pre-commit run --all-files
2939
3040
- name: Launch services
31-
run: docker-compose up -d stac raster vector
41+
run: docker compose up -d stac raster vector
3242

3343
- name: install lib postgres
3444
run: |
@@ -57,8 +67,8 @@ jobs:
5767
# see https://github.com/developmentseed/tipg/issues/37
5868
- name: Restart the Vector service
5969
run: |
60-
docker-compose stop vector
61-
docker-compose up -d vector
70+
docker compose stop vector
71+
docker compose up -d vector
6272
6373
- name: Sleep for 10 seconds
6474
run: sleep 10s
@@ -68,7 +78,7 @@ jobs:
6878
run: python -m pytest .github/workflows/tests/
6979

7080
- name: Stop services
71-
run: docker-compose stop
81+
run: docker compose stop
7282

7383

7484
publish-docker:

.github/workflows/tests/test_raster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_mosaic_api():
3030
assert list(resp.json()[0]) == ["id", "bbox", "assets", "collection"]
3131
assert resp.json()[0]["id"] == "20200307aC0853900w361030"
3232

33-
resp = httpx.get(f"{raster_endpoint}/mosaic/{searchid}/15/8589/12849/assets")
33+
resp = httpx.get(f"{raster_endpoint}/mosaic/{searchid}/tiles/15/8589/12849/assets")
3434
assert resp.status_code == 200
3535
assert len(resp.json()) == 1
3636
assert list(resp.json()[0]) == ["id", "bbox", "assets", "collection"]

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ python -m pip install --upgrade virtualenv
1414
virtualenv .venv
1515
source .venv/bin/activate
1616

17-
# Install eoapi modules
17+
# Install eoapi module
1818
python -m pip install "psycopg[binary,pool]"
19-
python -m pip install -e runtime/eoapi/raster["test"] -e runtime/eoapi/stac["test"] -e runtime/eoapi/vector["test"]
19+
python -m pip install -e runtime/eoapi/raster["test"] # or -e runtime/eoapi/stac["test"] | -e runtime/eoapi/vector["test"]
2020
```
2121

22+
Note: services might have incompatible dependencies which you can resolve by using virtual environnement per service
23+
2224
**pre-commit**
2325

2426
This repo is set to use `pre-commit` to run *isort*, *ruff*, *pydocstring*, *black* ("uncompromising Python code formatter") and mypy when committing new code.

README.md

Lines changed: 27 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
<p align="center">
3-
<img width="700" src="https://github.com/developmentseed/eoAPI/assets/10407788/2a12d3ea-2fff-4f15-979b-7d1f0be795f7"/>
3+
<img width="700" src="docs/logos/eoAPI.png"/>
44
<p align="center">Create a full Earth Observation API with Metadata, Raster and Vector services.</p>
55
</p>
66

@@ -15,7 +15,7 @@
1515

1616
---
1717

18-
**Documentation**: <a href="https://developmentseed.org/eoAPI/" target="_blank">https://developmentseed.org/eoAPI/</a>
18+
**Documentation**: <a href="https://eoapi.dev" target="_blank">https://eoapi.dev</a>
1919

2020
**Source Code**: <a href="https://github.com/developmentseed/eoAPI" target="_blank">https://github.com/developmentseed/eoAPI</a>
2121

@@ -35,46 +35,20 @@
3535

3636
---
3737

38-
## Why should you use `eoAPI`
38+
## 🌍 eoAPI: An Open-Source Community Project
3939

40-
- **Focus on your use case:** `eoAPI` is used for large-scale data processing, building geographic information systems (GIS), creating real-time data applications, climate research and environmental monitoring, machine learning model training, and more.
40+
`eoAPI` is proudly open-source and driven by a dedicated community of contributors. We believe in the power of open collaboration and welcome anyone to contribute, discuss, and grow this tool with us. Join the conversations on [GitHub Discussions](https://github.com/developmentseed/eoAPI/discussions) and make a difference in the Earth Observation realm.
4141

42-
- **Unified Repository:** `eoAPI` provides a single, unified repository to several state-of-the-art Earth Observation (EO) data services, including Metadata search (STAC), Raster, and Vector services. This can simplify the process of accessing and working with these services.
43-
44-
- **Interoperability:** `eoAPI` is designed to enable interoperability among its included services. This can make building complex applications that leverage different types of EO data easier.
45-
46-
- **Open Source and Community Support:** As an open-source project, `eoAPI` allows developers to inspect its code, contribute to its development, and use it as a base for custom solutions. It also benefits from the support and innovation of a community of developers and EO data users.
47-
48-
- **Scalability and Flexibility:** Each service in `eoAPI` can be used or deployed independently, which provides a lot of flexibility. If a developer's application only requires one or two of eoAPI's services, they don't need to deploy the entire suite.
49-
50-
- **Facilitate Earth Observation Tasks:** `eoAPI` includes specialized tools for working with EO data, such as dynamic tiling, metadata searching, and features/vector tiles API. These can significantly facilitate EO data processing, analysis, and visualization.
51-
52-
- **Ease of Deployment:** `eoAPI` supports containerized deployment using Docker, making it easier to set up, scale, and maintain applications built on it. Spin up the demo locally and start experimenting in minutes.
53-
54-
---
55-
56-
## Services Overview
57-
58-
59-
- **STAC Metadata**: Built with [stac-fastapi.pgstac](https://github.com/stac-utils/stac-fastapi) and extended with a custom extension to connect it to **`TiTiler`** and a **[Search Viewer](http://localhost:8081/index.html)**. See [docs](http://localhost:8081/docs) for API details.
60-
61-
- **Raster Tiles**: Built with [titiler-pgstac](https://github.com/stac-utils/titiler-pgstac) and [pgstac](https://github.com/stac-utils/pgstac) to enable large scale mosaic based on results of STAC searches queries. See [docs](http://localhost:8082/docs) for API details.
62-
63-
- **OGC Features & Vector Tiles**: Built with [tipg](https://github.com/developmentseed/tipg) to create a lightweight OGC Features and Tiles API with a PostGIS database. See [docs](http://localhost:8083/api.html) for API details.
64-
65-
See [service details](./docs/src/services-details.md) for more information.
66-
67-
*Note: The documentation links referenced require lauching the application with `docker-compose` or another deployment*.
6842

6943
---
7044

7145
## Getting started
7246

7347
- Clone the repository: `git clone https://github.com/developmentseed/eoAPI.git`
7448
- Navigate to the project: `cd eoAPI`
75-
- Run services with `docker-compose up`
49+
- Run services with `docker compose up`
7650
- Follow the [MAXAR open data demo](https://github.com/vincentsarago/MAXAR_opendata_to_pgstac) (or get inspired by the other [demos](./demo/)) to load some data into eoAPI
77-
- Checkout the [Search Viewer](http://localhost:8081/index.html), and the API documentation ([STAC Metadata](http://localhost:8081/docs), [Raster Tiles](http://localhost:8082/docs), [Vector Tiles](http://localhost:8083/api.html))
51+
- Check out the [Search Viewer](http://localhost:8081/index.html), and the API documentation ([STAC Metadata](http://localhost:8081/docs), [Raster Tiles](http://localhost:8082/docs), [Vector Tiles](http://localhost:8083/api.html))
7852

7953
Alternatively, you may launch the application locally:
8054
```bash
@@ -90,24 +64,40 @@ export DATABASE_URL=postgresql://username:password@0.0.0.0:5439/postgis # Conne
9064
.venv/bin/uvicorn eoapi.{SERVICE}.app:app --port 8000 --reload
9165
```
9266

93-
Note: services might have incompatible dependencies which you can resolve by using virtual environement per service
67+
Note: services might have incompatible dependencies which you can resolve by using a virtual environment for each service
9468

9569
---
70+
9671
## Deployment
9772

98-
See [DEPLOYMENT.md](https://github.com/developmentseed/eoAPI/blob/main/infrastructure/DEPLOYMENT.md)
73+
This repository has current runtimes that are consistently updated with new functionality.
74+
75+
The services can be deployed locally via docker with `docker-compose up`. The official runtimes can be launched with `docker-compose -f docker-compose.yml -f docker-compose.official.yml up stac-fastapi titiler-pgstac tipg`.
76+
77+
Two Infrastructure as Code (IaC) repositories are available:
78+
- [eoapi-cdk](https://github.com/developmentseed/eoapi-cdk): A set of AWS CDK constructs to deploy eoAPI services
79+
- [eoapi-k8s](https://github.com/developmentseed/eoapi-k8s): IaC and Helm charts for deploying eoAPI services on AWS and GCP
80+
81+
Finally, [eoapi-template](https://github.com/developmentseed/eoapi-template) is an AWS CDK app that shows how to configure the eoapi-cdk constructs.
9982

10083
## Contribution & Development
10184

102-
See [CONTRIBUTING.md](https://github.com/developmentseed/eoAPI/blob/main/CONTRIBUTING.md)
85+
We highly value and rely on our community! Whether you're an expert or just getting started, you can make a difference. Here's how:
86+
87+
- **Contribute**: Check out our [CONTRIBUTING.md](https://github.com/developmentseed/eoAPI/blob/main/CONTRIBUTING.md) guide to understand how you can contribute.
88+
- **Engage in Discussions**: Share your ideas, ask questions, or provide feedback through [GitHub Discussions](https://github.com/developmentseed/eoAPI/discussions). This is where most of our project conversations take place.
89+
- **Report Issues**: Found a bug or have a feature request? Raise it on our [issues page](https://github.com/developmentseed/eoAPI/issues).
10390

91+
---
10492
## License
10593

106-
See [LICENSE](https://github.com/developmentseed/eoAPI/blob/main/LICENSE)
94+
At Development Seed, we believe in open collaboration and making tools and data more accessible. In line with this ethos, we've explicitly chosen a MIT license for `eoAPI`.
95+
96+
For full license details, see [LICENSE](https://github.com/developmentseed/eoAPI/blob/main/LICENSE).
10797

10898
## Authors
10999

110-
Created by [Development Seed](<http://developmentseed.org>)
100+
Nurtured by [Development Seed](<http://developmentseed.org>)
111101

112102
See [contributors](https://github.com/developmentseed/eoAPI/graphs/contributors) for a listing of individual contributors.
113103

docker-compose.official.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@ version: '3'
22

33
services:
44
stac-fastapi:
5-
image: ghcr.io/stac-utils/stac-fastapi-pgstac:latest
5+
build:
6+
context: .
7+
dockerfile: dockerfiles/Dockerfile.stac
68
ports:
79
- "${MY_DOCKER_IP:-127.0.0.1}:8081:8081"
810
environment:
9-
- APP_HOST=0.0.0.0
10-
- APP_PORT=8081
11-
- ENVIRONMENT=local
11+
# Application
12+
- HOST=0.0.0.0
13+
- PORT=8081
14+
- MODULE_NAME=stac_fastapi.pgstac.app
15+
- VARIABLE_NAME=app
16+
# gunicorn
17+
# https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency
18+
- WEB_CONCURRENCY=10
19+
# https://github.com/tiangolo/uvicorn-gunicorn-docker#workers_per_core
20+
# - WORKERS_PER_CORE=1
21+
# https://github.com/tiangolo/uvicorn-gunicorn-docker#max_workers
22+
# - MAX_WORKERS=10
1223
# Postgres connection
1324
- POSTGRES_USER=username
1425
- POSTGRES_PASS=password
@@ -21,7 +32,7 @@ services:
2132
depends_on:
2233
- database
2334
command:
24-
bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && python -m stac_fastapi.pgstac.app"
35+
bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start.sh"
2536
volumes:
2637
- ./dockerfiles/scripts:/tmp/scripts
2738

docs/mkdocs.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
site_name: eoAPI
1+
site_name: The Earth Observation API
22
site_description: Create a full Earth Observation API with Metadata, Raster and Vector services.
33

44
docs_dir: 'src'
@@ -13,24 +13,31 @@ extra:
1313
link: "https://github.com/developmentseed"
1414
- icon: "fontawesome/brands/twitter"
1515
link: "https://twitter.com/developmentseed"
16-
- icon: "fontawesome/brands/medium"
17-
link: "https://medium.com/devseed"
16+
- icon: "fontawesome/brands/linkedin"
17+
link: "https://www.linkedin.com/company/development-seed"
18+
- icon: "fontawesome/solid/rss"
19+
link: "https://developmentseed.org/blog"
1820

1921
nav:
20-
- Readme: "index.md"
21-
- Development - Contributing: "contributing.md"
22-
- Release Notes: "release-notes.md"
23-
- Services Details: "services-details.md"
22+
- Home: "index.md"
23+
- Intro: "intro.md"
24+
- Services: "services.md"
2425
- Deployment: "deployment.md"
26+
- Development - Contributing: "contributing.md"
27+
2528

2629
plugins:
2730
- search
2831

2932
theme:
3033
name: material
34+
custom_dir: src/overrides/
3135
palette:
32-
primary: indigo
36+
primary: black
3337
scheme: default
38+
features:
39+
- navigation.tabs
40+
- navigation.tabs.sticky
3441
favicon: img/favicon.ico
3542
logo: img/logo.png
3643

docs/src/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
eoapi.dev

docs/src/contributing.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/src/contributing.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
hide:
3+
- navigation
4+
- toc
5+
---
6+
7+
Issues and pull requests are more than welcome: https://github.com/developmentseed/eoAPI/issues
8+
9+
**dev install**
10+
11+
```bash
12+
# Download the code
13+
git clone https://github.com/developmentseed/eoAPI.git
14+
cd eoAPI
15+
16+
# Create a virtual environment
17+
python -m pip install --upgrade virtualenv
18+
virtualenv .venv
19+
source .venv/bin/activate
20+
21+
# Install eoapi module
22+
python -m pip install "psycopg[binary,pool]"
23+
python -m pip install -e runtime/eoapi/raster["test"] # or -e runtime/eoapi/stac["test"] | -e runtime/eoapi/vector["test"]
24+
```
25+
26+
Note: services might have incompatible dependencies which you can resolve by using virtual environnement per service
27+
28+
**pre-commit**
29+
30+
This repo is set to use `pre-commit` to run *isort*, *ruff*, *pydocstring*, *black* ("uncompromising Python code formatter") and mypy when committing new code.
31+
32+
```bash
33+
$ pre-commit install
34+
```

docs/src/deployment.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)