Skip to content

Commit 0690f99

Browse files
committed
docs, ci: fixup README and CI
1 parent 6f1b87e commit 0690f99

File tree

4 files changed

+93
-33
lines changed

4 files changed

+93
-33
lines changed

.github/workflows/cicd.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ jobs:
4646
uses: actions/setup-python@v4
4747
with:
4848
python-version: ${{ matrix.python-version }}
49+
cache: pip
50+
cache-dependency-path: setup.py
4951

5052
- name: Lint code
5153
if: ${{ matrix.python-version == 3.8 }}
@@ -136,5 +138,15 @@ jobs:
136138
runs-on: ubuntu-latest
137139
steps:
138140
- uses: actions/checkout@v3
139-
- name: Test generating docs
141+
- name: Setup Python
142+
uses: actions/setup-python@v3
143+
with:
144+
python-version: "3.10"
145+
cache: pip
146+
cache-dependency-path: setup.py
147+
- name: Install with documentation dependencies
148+
run: pip install .[docs,dev,server]
149+
- name: Generate API docs
140150
run: make docs
151+
- name: Build documentation
152+
run: mkdocs build --strict

.github/workflows/packages.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ jobs:
1212
permissions:
1313
contents: read
1414
packages: write
15-
strategy:
16-
fail-fast: true
17-
matrix:
18-
backend: ["sqlalchemy", "pgstac"]
1915
steps:
2016
- name: Checkout repository
2117
uses: actions/checkout@v3
@@ -29,17 +25,12 @@ jobs:
2925
id: meta
3026
uses: docker/metadata-action@v4.3.0
3127
with:
32-
images: ghcr.io/stac-utils/stac-fastapi
33-
tags: |
34-
type=schedule,suffix=-${{ matrix.backend }}
35-
type=ref,event=branch,suffix=-${{ matrix.backend }}
36-
type=ref,event=tag,suffix=-${{ matrix.backend }}
37-
type=ref,event=pr,suffix=-${{ matrix.backend }}
28+
images: ghcr.io/stac-utils/stac-fastapi-sqlalchemy
3829
- name: Build and push Docker image
3930
uses: docker/build-push-action@v4.0.0
4031
with:
4132
context: .
42-
file: docker/Dockerfile.${{ matrix.backend }}
33+
file: Dockerfile
4334
push: true
4435
tags: ${{ steps.meta.outputs.tags }}
4536
labels: ${{ steps.meta.outputs.labels }}
Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,34 @@
1-
name: Publish docs via GitHub Pages
2-
1+
name: Deploy static content to Pages
32
on:
43
push:
54
branches:
65
- main
7-
paths:
8-
# Rebuild website when docs have changed or code has changed
9-
- "README.md"
10-
- "docs/**"
11-
- "mkdocs.yml"
12-
- "**.py"
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
10+
concurrency:
11+
group: "pages"
12+
cancel-in-progress: false
1313

1414
jobs:
1515
build:
1616
name: Deploy docs
1717
runs-on: ubuntu-latest
18-
1918
steps:
2019
- name: Checkout main
2120
uses: actions/checkout@v3
22-
23-
- name: Set up Python 3.8
21+
- name: Set up Python 3.10
2422
uses: actions/setup-python@v4
2523
with:
26-
python-version: 3.8
27-
24+
python-version: "3.10"
25+
cache: pip
26+
cache-dependency-path: setup.py
2827
- name: Install dependencies
2928
run: |
3029
python -m pip install --upgrade pip
31-
python -m pip install -e .
32-
python -m pip install mkdocs mkdocs-material pdocs
33-
34-
- name: update API docs
30+
python -m pip install .[docs]
31+
- name: Update API docs
3532
run: |
3633
pdocs as_markdown \
3734
--output_dir docs/api/ \
@@ -46,6 +43,12 @@ jobs:
4643
POSTGRES_PORT: 5432
4744
POSTGRES_HOST_READER: localhost
4845
POSTGRES_HOST_WRITER: localhost
49-
50-
- name: Deploy docs
51-
run: mkdocs gh-deploy --force
46+
- name: Build docs
47+
run: mkdocs build --site-dir site
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v1
50+
with:
51+
path: site
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v2

README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
1-
# Requirements
1+
# stac-fastapi-sqlalchemy
22

3+
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/stac-utils/stac-fastapi-sqlalchemy/cicd.yaml?style=for-the-badge)](https://github.com/stac-utils/stac-fastapi-sqlalchemy/actions/workflows/cicd.yaml)
4+
[![PyPI](https://img.shields.io/pypi/v/stac-fastapi.sqlalchemy?style=for-the-badge)](https://pypi.org/project/stac-fastapi.sqlalchemy)
5+
[![Documentation](https://img.shields.io/github/actions/workflow/status/stac-utils/stac-fastapi-sqlalchemy/pages.yml?label=Docs&style=for-the-badge)](https://stac-utils.github.io/stac-fastapi-sqlalchemy/)
6+
[![License](https://img.shields.io/github/license/stac-utils/stac-fastapi-sqlalchemy?style=for-the-badge)](https://github.com/stac-utils/stac-fastapi-sqlalchemy/blob/main/LICENSE)
7+
8+
[SQLAlchemy](https://www.sqlalchemy.org/) backend for [stac-fastapi](https://github.com/stac-utils/stac-fastapi), the [FastAPI](https://fastapi.tiangolo.com/) implementation of the [STAC API spec](https://github.com/radiantearth/stac-api-spec)
39
The SQLAlchemy backend requires **PostGIS>=3**.
10+
11+
## Overview
12+
13+
**stac-fastapi-sqlalchemy** is an HTTP interface built in FastAPI.
14+
15+
## Contributing
16+
17+
See [CONTRIBUTING](https://github.com/stac-utils/stac-fastapi-sqlalchemy/blob/main/CONTRIBUTING.md) for detailed contribution instructions.
18+
19+
To install:
20+
21+
```shell
22+
git clone https://github.com/stac-utils/stac-fastapi-sqlalchemy
23+
cd stac-fastapi-sqlalchemy
24+
pip install -e ".[dev,server,docs]"
25+
```
26+
27+
To test:
28+
29+
```shell
30+
make test
31+
```
32+
33+
Use Github [Pull Requests](https://github.com/stac-utils/stac-fastapi-sqlalchemy/pulls) to provide new features or to request review of draft code, and use [Issues](https://github.com/stac-utils/stac-fastapi-sqlalchemy/issues) to report bugs or request new features.
34+
35+
### Documentation
36+
37+
To build the docs:
38+
39+
```shell
40+
make docs
41+
```
42+
43+
Then, serve the docs via a local HTTP server:
44+
45+
```shell
46+
mkdocs serve
47+
```
48+
49+
## History
50+
51+
In April of 2023, it was removed from the core **stac-fastapi** repository and moved to its current location (<http://github.com/stac-util/stac-fastapi-sqlalchemy>).
52+
53+
## License
54+
55+
[MIT](https://github.com/stac-utils/stac-fastapi-sqlalchemy/blob/main/LICENSE)
56+
57+
<!-- markdownlint-disable-file MD033 -->

0 commit comments

Comments
 (0)