Skip to content

Commit cc55027

Browse files
committed
Merge branch 'main' into add-schema-generator
2 parents 209b034 + 0f36066 commit cc55027

38 files changed

Lines changed: 693 additions & 402 deletions

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
## Checklist
1010

1111
- [ ] Tests pass: `uv run pytest`
12-
- [ ] Checks pass: `uv run pre-commit --all-files`
12+
- [ ] Checks pass: `uv run pre-commit run --all-files`
1313
- [ ] CHANGELOG is updated (if necessary)

.github/workflows/release.yaml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -44,30 +44,3 @@ jobs:
4444
- uses: pypa/gh-action-pypi-publish@release/v1
4545
with:
4646
packages-dir: ${{ needs.package_name.outputs.package_name}}/dist
47-
48-
docker:
49-
name: Build Docker Image
50-
runs-on: ubuntu-latest
51-
needs: package_name
52-
if: ${{ needs.package_name.outputs.package_name }} == 'stapi-fastapi'
53-
54-
permissions:
55-
contents: read
56-
packages: write
57-
id-token: write
58-
59-
steps:
60-
- name: Log in to the Container Registry
61-
uses: docker/login-action@v3
62-
with:
63-
registry: ghcr.io
64-
username: ${{ github.actor }}
65-
password: ${{ secrets.GITHUB_TOKEN }}
66-
- name: Set up Docker Buildx
67-
uses: docker/setup-buildx-action@v3
68-
- name: Build and Push Docker Image
69-
uses: docker/build-push-action@v6
70-
with:
71-
push: true
72-
tags: stapi-spec/stapi-fastapi:${{ github.ref_name }}
73-
build-args: PYTHON_VERSION='3.12'

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Contributing
22

33
First, thanks for contributing to **pystapi**!
4-
The [README](./README.md#development) as instructions on setting up your development environment, which is a great place to start.
4+
The [README](./README.md#development) has instructions on setting up your development environment, which is a great place to start.
55

66
## Repository organization
77

README.md

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,54 @@
11
# pystapi
22

33
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/stapi-spec/pystapi/ci.yaml?style=for-the-badge)](https://github.com/stapi-spec/pystapi/actions/workflows/ci.yaml)
4+
[![stapi-pydantic PyPI](https://img.shields.io/pypi/v/stapi-pydantic?style=for-the-badge&label=stapi-pydantic)](https://pypi.org/project/stapi-pydantic/)
5+
[![stapi-fastapi PyPI](https://img.shields.io/pypi/v/stapi-fastapi?style=for-the-badge&label=stapi-fastapi)](https://pypi.org/project/stapi-fastapi/)
46

57
Monorepo for Python Satellite Tasking API (STAPI) Specification packages.
68
For more, see our [docs](https://stapi-spec.github.io/pystapi/).
79

10+
> [!WARNING]
11+
> The STAPI spec, and these packages, are in their early stages of development.
12+
> There may be large shifts in the spec or these packages' APIs as we work towards a v1.0 release of the spec.
13+
14+
## Packages
15+
16+
There are several related packages in this monorepo:
17+
18+
```mermaid
19+
graph
20+
stapi-pydantic --> pystapi-client --> pystapi-validator
21+
stapi-pydantic --> stapi-fastapi
22+
```
23+
24+
### [stapi-pydantic](./stapi-pydantic/)
25+
26+
[Pydantic](https://docs.pydantic.dev) models for STAPI.
27+
These models are used to generate the STAPI OpenAPI specification, and so can be considered the source-of-truth for STAPI data structures.
28+
29+
### [stapi-fastapi](./stapi-fastapi/)
30+
31+
A backend-agnostic [FastAPI](https://fastapi.tiangolo.com/) application for serving STAPI endpoints.
32+
A minimal test implementation is provided in [stapi-fastapi/tests/application.py](stapi-fastapi/tests/application.py).
33+
Run it like so:
34+
35+
```commandline
36+
uv run fastapi dev stapi-fastapi/tests/application.py
37+
```
38+
39+
The app should be accessible at `http://localhost:8000`.
40+
41+
For implementations of **stapi-fastapi** with vendor-specific backends, see repos in the [stapi-fastapi Github organization](https://github.com/stapi-spec?q=stapi-fastapi-&type=all&language=&sort=).
42+
43+
### [pystapi-client](./pystapi-client/)
44+
45+
A Python API and command-line interface (CLI) for working with STAPI servers.
46+
47+
### [pystapi-validator](./pystapi-validator/)
48+
49+
A work-in-progress validator for STAPI APIs.
50+
Currently not very useful.
51+
852
## Development
953

1054
Get [uv](https://docs.astral.sh/uv/), then:
@@ -24,7 +68,7 @@ uv run pytest
2468
Check formatting and other lints:
2569

2670
```shell
27-
uv run pre-commit --all-files
71+
uv run pre-commit run --all-files
2872
```
2973

3074
If you don't want to type `uv run` all the time:
@@ -34,28 +78,3 @@ source .venv/bin/activate
3478
```
3579

3680
See our [contribution guidelines](./CONTRIBUTING.md) for information on contributing any changes, fixes, or features.
37-
38-
## Packages
39-
40-
```mermaid
41-
graph
42-
stapi-pydantic --> pystapi-client --> pystapi-validator
43-
stapi-pydantic --> stapi-fastapi
44-
```
45-
46-
### stapi-fastapi server
47-
48-
A minimal test implementation is provided in [stapi-fastapi/tests/application.py](stapi-fastapi/tests/application.py).
49-
Run it like so:
50-
51-
```commandline
52-
uv run fastapi dev stapi-fastapi/tests/application.py
53-
```
54-
55-
The app should be accessible at `http://localhost:8000`.
56-
57-
### stapi-client
58-
59-
The `stapi-client` package is a Python client (CLI tool) focused on interfacing with the STAPI specification, specifically with a STAPI server. This is a work in progress.
60-
61-
For more information, see the [README](pystapi-client/README.md).

RELEASING.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
1. Determine which package you're releasing
44
2. Determine the next version, following [semantic versioning](https://semver.org/)
55
3. Create a release branch: `git checkout -b release/{package}-v{version}`
6-
4. Update that package's CHANGELOG with:
6+
4. Update that package's `pyproject.toml` with the new version
7+
5. Update that package's CHANGELOG with:
78
- A new header with the new version
89
- A new link at the bottom of the CHANGELOG for that header
9-
5. `git push -u origin`
10-
6. Once approved, merge the PR
11-
7. `git checkout main && git pull && scripts/release {package}`
12-
8. Go to the draft release href provided by the script, update that Github release with information from the CHANGELOG, and publish it
13-
9. Github actions will automatically publish a new PyPI release
10+
6. `git push -u origin`
11+
7. Once approved, merge the PR
12+
8. `git checkout main && git pull && scripts/release {package}`
13+
9. Go to the draft release href provided by the script, update that Github release with information from the CHANGELOG, and publish it
14+
10. Github actions will automatically publish a new PyPI release
1415

1516
> [!IMPORTANT]
1617
> You'll need to set up [.netrc authentication](https://pygithub.readthedocs.io/en/stable/examples/Authentication.html#netrc-authentication) to use `scripts/release`.

docs/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
# pystapi
2+
3+
**pystapi** is the Python [monorepo](https://en.wikipedia.org/wiki/Monorepo) for the Satellite Tasking API (STAPI) specification.
4+
It contains three Python packages:
5+
6+
- [stapi-pydantic](./stapi-pydantic.md): [Pydantic](https://docs.pydantic.dev) models that define the data structures in the STAPI specification
7+
- [stapi-fastapi](./stapi-fastapi.md): [FastAPI](https://fastapi.tiangolo.com/) routes and functions for building a STAPI server
8+
- [pystapi-client](./pystapi-client.md): a Python package and command-line interface (CLI) for interacting with a STAPI server

docs/pystapi-client.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# pystapi-client
2+
3+
A Python client for working with [STAPI](https://stapi-spec.github.io/pystapi/) servers.
4+
5+
## API
6+
7+
::: pystapi_client

docs/pystapi-client/api.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/pystapi-client/index.md

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

docs/stapi-fastapi.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# stapi-fastapi
2+
3+
[FastAPI](https://fastapi.tiangolo.com/) routes and functions for building a STAPI server.
4+
5+
## API
6+
7+
::: stapi_fastapi

0 commit comments

Comments
 (0)