Skip to content

Commit d78fc0e

Browse files
authored
Merge pull request #34 from Healy-Hyperspatial/update-readme
Update readme, add table of contents, clean up/ re-format, add logo
2 parents 154af04 + 41c253f commit d78fc0e

File tree

3 files changed

+85
-22
lines changed

3 files changed

+85
-22
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0/
1212
- Add support for python 3.12. [#22](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/pull/22)
1313
- Updated sfeos core to v3.0.0a0, fixed datetime functionality. [#23](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/pull/23)
1414
- Create indexes in MongoDB at startup only if environment variable MONGO_CREATE_INDEXES is set to "true" (default when the env variable is not set: "true"). [#31](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/pull/31)
15+
- Improved README with table of contents, better formatting, and added Contributing section. [#34](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/pull/34)
1516

1617
### Fixed
1718

1819
- Added a new index based on collection id and item id to ensure item IDs aren't required to be unique across all collections. [#26](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/pull/26)
19-
- Updated test fixtures to use ASGITransport with AsyncClient for compatibility with newer httpx versions.
20+
- Updated test fixtures to use ASGITransport with AsyncClient for compatibility with newer httpx versions. [#35](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/pull/35)
2021

2122
## [v3.2.1]
2223

README.md

Lines changed: 83 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,62 @@
11
# stac-fastapi-mongo
22

3-
## Mongo backend for the stac-fastapi project built on top of the [sfeos](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch) core api library.
3+
<!-- markdownlint-disable MD033 MD041 -->
4+
5+
<p align="left">
6+
<img src="assets/stac-fastapi-mongo.png" width=560>
7+
</p>
8+
9+
10+
MongoDB backend for the [stac-fastapi](https://github.com/stac-utils/stac-fastapi) project built on top of the [sfeos](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch) core API library.
411

512
[![Downloads](https://static.pepy.tech/badge/stac-fastapi-mongo?color=blue)](https://pepy.tech/project/stac-fastapi-mongo)
6-
[![GitHub contributors](https://img.shields.io/github/contributors/Healy-Hyperspatial/stac-fastapi-mongo?color=blue)](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/graphs/contributors)
7-
[![GitHub stars](https://img.shields.io/github/stars/Healy-Hyperspatial/stac-fastapi-mongo.svg?color=blue)](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/stargazers)
8-
[![GitHub forks](https://img.shields.io/github/forks/Healy-Hyperspatial/stac-fastapi-mongo.svg?color=blue)](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/network/members)
9-
[![PyPI version](https://img.shields.io/pypi/v/stac-fastapi-mongo.svg?color=blue)](https://pypi.org/project/stac-fastapi-mongo/)
10-
[![STAC](https://img.shields.io/badge/STAC-1.1.0-blue.svg)](https://github.com/radiantearth/stac-spec/tree/v1.1.0)
13+
[![GitHub contributors](https://img.shields.io/github/contributors/Healy-Hyperspatial/stac-fastapi-mongo?color=blue)](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/graphs/contributors)
14+
[![GitHub stars](https://img.shields.io/github/stars/Healy-Hyperspatial/stac-fastapi-mongo.svg?color=blue)](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/stargazers)
15+
[![GitHub forks](https://img.shields.io/github/forks/Healy-Hyperspatial/stac-fastapi-mongo.svg?color=blue)](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/network/members)
16+
[![PyPI version](https://img.shields.io/pypi/v/stac-fastapi-mongo.svg?color=blue)](https://pypi.org/project/stac-fastapi-mongo/)
17+
[![STAC](https://img.shields.io/badge/STAC-1.1.0-blue.svg)](https://github.com/radiantearth/stac-spec/tree/v1.1.0)
1118

1219
<!-- [![Join the chat at https://gitter.im/stac-fastapi-mongo/community](https://badges.gitter.im/stac-fastapi-mongo/community.svg)](https://gitter.im/stac-fastapi-mongo/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -->
1320

21+
## Table of Contents
22+
23+
- [Installation](#installation)
24+
- [Development](#development)
25+
- [Development Environment Setup](#development-environment-setup)
26+
- [Pre-commit](#pre-commit)
27+
- [Running the API](#running-the-api)
28+
- [Build and Run](#build-and-run)
29+
- [Creating Collections](#creating-collections)
30+
- [Collection Pagination](#collection-pagination)
31+
- [Testing](#testing)
32+
- [Sample Data](#sample-data)
33+
- [Authentication](#authentication)
34+
- [Environment Variable Configuration](#environment-variable-configuration)
35+
- [User Permissions Configuration](#user-permissions-configuration)
36+
- [Public Endpoints Configuration](#public-endpoints-configuration)
37+
- [Authentication Configurations](#authentication-configurations)
38+
- [Read-Only Databases](#note-for-read-only-databases)
39+
- [Contributing](#contributing)
40+
- [Changelog](#changelog)
41+
42+
## Installation
43+
1444
To install from PyPI:
1545

1646
```shell
1747
pip install stac_fastapi.mongo
1848
```
1949

20-
#### For changes, see the [Changelog](CHANGELOG.md)
21-
50+
## Development
2251

23-
## Development Environment Setup
52+
### Development Environment Setup
2453

2554
To install the classes in your local Python env, run:
2655

2756
```shell
2857
pip install -e .[dev]
2958
```
3059

31-
3260
### Pre-commit
3361

3462
Install [pre-commit](https://pre-commit.com/#install).
@@ -39,19 +67,25 @@ Prior to commit, run:
3967
pre-commit run --all-files
4068
```
4169

42-
## Build stac-fastapi.mongo backend
70+
## Running the API
71+
72+
### Build and Run
73+
74+
Build the MongoDB backend:
4375

4476
```shell
4577
docker-compose up mongo
4678
docker-compose build app-mongo
4779
```
4880

49-
## Running Mongo API on localhost:8084
81+
Run the MongoDB API on localhost:8084:
5082

5183
```shell
5284
docker-compose up app-mongo
5385
```
5486

87+
### Creating Collections
88+
5589
To create a new Collection:
5690

5791
```shell
@@ -64,8 +98,7 @@ curl -X "POST" "http://localhost:8084/collections" \
6498

6599
Note: this "Collections Transaction" behavior is not part of the STAC API, but may be soon.
66100

67-
68-
## Collection pagination
101+
### Collection Pagination
69102

70103
The collections route handles optional `limit` and `token` parameters. The `links` field that is
71104
returned from the `/collections` route contains a `next` link with the token that can be used to
@@ -77,20 +110,23 @@ curl -X "GET" "http://localhost:8084/collections?limit=1&token=example_token"
77110

78111
## Testing
79112

113+
Run the test suite:
114+
80115
```shell
81116
make test
82117
```
83118

119+
## Sample Data
84120

85-
## Ingest sample data
121+
Ingest sample data:
86122

87123
```shell
88124
make ingest
89125
```
90126

91-
## Basic Auth
127+
## Authentication
92128

93-
#### Environment Variable Configuration
129+
### Environment Variable Configuration
94130

95131
Basic authentication is an optional feature. You can enable it by setting the environment variable `BASIC_AUTH` as a JSON string.
96132

@@ -132,7 +168,6 @@ Example: This example illustrates the configuration for two users: an **admin**
132168
}
133169
```
134170

135-
136171
### Public Endpoints Configuration
137172

138173
In order to set endpoints with public access, you can configure the public_endpoints key with a list of endpoint objects. Each endpoint object should specify the path and method of the endpoint.
@@ -163,10 +198,37 @@ Example: This example demonstrates the configuration for public endpoints, allow
163198
}
164199
```
165200

166-
### Basic Authentication Configurations
201+
### Authentication Configurations
167202

168203
See `docker-compose.basic_auth_protected.yml` and `docker-compose.basic_auth_public.yml` for basic authentication configurations.
169204

170-
## Note for read-only databases
205+
## Note for Read-Only Databases
206+
207+
If you are using a read-only MongoDB user, the `MONGO_CREATE_INDEXES` environment variable should be set to "false" (as a string and not a boolean) to avoid creating indexes in the database. When this environment variable is not set, the default is to create indexes. See [GitHub issue #28](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/issues/28)
208+
209+
## Contributing
210+
211+
Contributions are welcome! Here's how you can help:
212+
213+
### How to Contribute
214+
215+
1. **Fork the repository** - Create your own fork of the project
216+
2. **Create a feature branch** - `git checkout -b feature/your-feature-name`
217+
3. **Commit your changes** - Make sure to write clear, concise commit messages
218+
4. **Push to your branch** - `git push origin feature/your-feature-name`
219+
5. **Open a Pull Request** - Describe your changes in detail
220+
221+
### Development Guidelines
222+
223+
- Follow the existing code style and conventions
224+
- Add tests for new features
225+
- Update documentation as needed
226+
- Make sure all tests pass before submitting a PR
227+
228+
### Reporting Issues
229+
230+
If you find a bug or have a feature request, please open an issue on the [GitHub repository](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/issues).
231+
232+
## Changelog
171233

172-
If you are using a read-only MongoDB user, the `MONGO_CREATE_INDEXES` environment variable should be set to "false" (as a string and not a boolean) to avoid creating indexes in the database. When this environment variable is not set, the default is to create indexes. See [Github issue #28](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo/issues/28)
234+
For changes, see the [Changelog](CHANGELOG.md)

assets/stac-fastapi-mongo.png

2.82 MB
Loading

0 commit comments

Comments
 (0)