Skip to content

Commit 70e37fc

Browse files
Merge pull request #108 from developmentseed/refactorDocs
✨ refactor docs
2 parents 0095d2a + 7e67f91 commit 70e37fc

File tree

13 files changed

+533
-140
lines changed

13 files changed

+533
-140
lines changed

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: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -33,40 +33,6 @@
3333

3434
- **OGC Features and Vector Tiles** API built on top of [https://github.com/developmentseed/tipg](https://github.com/developmentseed/tipg)
3535

36-
---
37-
38-
## Why should you use `eoAPI`
39-
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.
41-
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*.
68-
69-
---
7036

7137
## Getting started
7238

@@ -90,12 +56,9 @@ export DATABASE_URL=postgresql://username:password@0.0.0.0:5439/postgis # Conne
9056
.venv/bin/uvicorn eoapi.{SERVICE}.app:app --port 8000 --reload
9157
```
9258

93-
Note: services might have incompatible dependencies which you can resolve by using virtual environement per service
59+
Note: services might have incompatible dependencies which you can resolve by using virtual environnement per service
9460

9561
---
96-
## Deployment
97-
98-
See [DEPLOYMENT.md](https://github.com/developmentseed/eoAPI/blob/main/infrastructure/DEPLOYMENT.md)
9962

10063
## Contribution & Development
10164

docs/mkdocs.yml

Lines changed: 9 additions & 5 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'
@@ -17,20 +17,24 @@ extra:
1717
link: "https://medium.com/devseed"
1818

1919
nav:
20-
- Readme: "index.md"
20+
- Home: "index.md"
21+
- Intro: "intro.md"
22+
- Services: "services.md"
2123
- Development - Contributing: "contributing.md"
22-
- Release Notes: "release-notes.md"
23-
- Services Details: "services-details.md"
2424
- Deployment: "deployment.md"
2525

2626
plugins:
2727
- search
2828

2929
theme:
3030
name: material
31+
custom_dir: src/overrides/
3132
palette:
32-
primary: indigo
33+
primary: black
3334
scheme: default
35+
features:
36+
- navigation.tabs
37+
- navigation.tabs.sticky
3438
favicon: img/favicon.ico
3539
logo: img/logo.png
3640

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.

docs/src/deployment.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
hide:
3+
- navigation
4+
---
5+
6+
## AWS (Lambda)
7+
8+
An example of Cloud Stack is available for AWS (RDS for the database and Lambda for the APIs)
9+
10+
The stack is deployed by the [AWS CDK](https://aws.amazon.com/cdk/) utility. Under the hood, CDK will create the deployment packages required for AWS Lambda, upload it to AWS, and handle the creation of the Lambda and API Gateway resources.
11+
12+
The example commands here will deploy a CloudFormation stack called `eoAPI-staging`.
13+
14+
1. Clone the `eoapi` repo and install dependencies
15+
```bash
16+
# Download eoapi repo
17+
git clone https://github.com/developmentseed/eoapi.git
18+
19+
# Create a virtual environment
20+
python -m pip install --upgrade virtualenv
21+
virtualenv infrastructure/aws/.venv
22+
source infrastructure/aws/.venv/bin/activate
23+
24+
# install cdk dependencies
25+
python -m pip install -r infrastructure/aws/requirements-cdk.txt
26+
```
27+
28+
2. Install node dependency - requires node version 14+
29+
```bash
30+
npm --prefix infrastructure/aws install
31+
```
32+
33+
3. Update settings
34+
35+
Set environment variable or hard code in `infrastructure/aws/.env` file (e.g `CDK_EOAPI_DB_PGSTAC_VERSION=0.7.1`).
36+
37+
**Important**:
38+
39+
- `CDK_EOAPI_DB_PGSTAC_VERSION` is a required env (see https://github.com/stac-utils/pgstac/tags for the latest version)
40+
41+
- You can choose which functions to deploy by setting `CDK_EOAPI_FUNCTIONS` env (e.g `CDK_EOAPI_FUNCTIONS='["stac","raster","vector"]'`)
42+
43+
44+
4. Install CDK and connect to your AWS account. This step is only necessary once per AWS account. The environment variable `CDK_EOAPI_STAGE` determines the name of the stack
45+
(e.g. eoAPI-staging or eoAPI-production)
46+
```bash
47+
# Deploy the CDK toolkit stack into an AWS environment.
48+
CDK_EOAPI_STAGE=staging \
49+
CDK_EOAPI_DB_PGSTAC_VERSION=0.7.1 \
50+
npm --prefix infrastructure/aws run cdk -- bootstrap
51+
52+
# or to a specific region
53+
AWS_DEFAULT_REGION=us-west-2 \
54+
AWS_REGION=us-west-2 \
55+
CDK_EOAPI_STAGE=staging \
56+
CDK_EOAPI_DB_PGSTAC_VERSION=0.7.1 \
57+
npm --prefix infrastructure/aws run cdk -- bootstrap
58+
```
59+
60+
5. Pre-Generate CFN template
61+
62+
```bash
63+
CDK_EOAPI_STAGE=staging \
64+
CDK_EOAPI_DB_PGSTAC_VERSION=0.7.1 \
65+
npm --prefix infrastructure/aws run cdk -- synth # Synthesizes and prints the CloudFormation template for this stack
66+
```
67+
68+
6. Deploy
69+
70+
```bash
71+
CDK_EOAPI_STAGE=staging \
72+
CDK_EOAPI_DB_PGSTAC_VERSION=0.7.1 \
73+
npm --prefix infrastructure/aws run cdk -- deploy eoAPI-staging
74+
75+
# Deploy in specific region
76+
AWS_DEFAULT_REGION=eu-central-1 \
77+
AWS_REGION=eu-central-1 \
78+
CDK_EOAPI_STAGE=staging \
79+
CDK_EOAPI_DB_PGSTAC_VERSION=0.7.1 \
80+
npm --prefix infrastructure/aws run cdk -- deploy eoapi-staging --profile {my-aws-profile}
81+
```
82+
83+
If you get an error saying that the max VPC's has been reached, this means that you have hit the limit for the amount of VPCs per unique AWS account and region combination. You can change the AWS region to a region that has less VPCs and deploy again to fix this.
84+
85+
## K8S
86+
87+
A Kubernetes chart is currently being developed at https://github.com/developmentseed/k8s-eoapi

docs/src/img/earth.jpg

500 KB
Loading

docs/src/img/eoAPI.png

167 KB
Loading

docs/src/index.md

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

0 commit comments

Comments
 (0)