Skip to content

Commit 8445b04

Browse files
committed
chore: init project
0 parents  commit 8445b04

14 files changed

Lines changed: 471 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: CI
2+
3+
# NOTE: keep UV_VERSION in sync with uv-version in s2-lite-integration-tests sdks JSON below.
4+
env:
5+
UV_VERSION: "0.11.3"
6+
7+
on:
8+
pull_request:
9+
types:
10+
[
11+
opened,
12+
synchronize,
13+
ready_for_review,
14+
reopened,
15+
]
16+
jobs:
17+
local-checks:
18+
name: Local Checks (code quality, unit tests, docs build)
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v7
25+
with:
26+
version: ${{ env.UV_VERSION }}
27+
- name: Sync dependencies
28+
run: |
29+
uv sync --all-groups
30+
- name: Static code check
31+
run: uv run poe ci_checker
32+
- name: Unit tests
33+
run: uv run pytest tests/ -v -m 'not (account or basin or stream or metrics)'
34+
- name: Check docs build
35+
working-directory: ./docs
36+
run: |
37+
make html
38+
s2-cloud-integration-tests:
39+
name: s2-cloud integration tests
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v4
44+
- name: Install uv
45+
uses: astral-sh/setup-uv@v7
46+
with:
47+
version: ${{ env.UV_VERSION }}
48+
- name: Sync dependencies
49+
run: uv sync --group test
50+
- name: Run integration tests
51+
env:
52+
S2_ACCESS_TOKEN: ${{ secrets.S2_ACCESS_TOKEN }}
53+
run: uv run pytest tests/ -v -s -m 'account or basin or stream or metrics'
54+
55+
build-s2-lite:
56+
name: Build s2-lite
57+
uses: s2-streamstore/s2/.github/workflows/build-s2-lite.yml@main
58+
59+
s2-lite-integration-tests:
60+
name: s2-lite integration tests
61+
needs: build-s2-lite
62+
uses: s2-streamstore/s2/.github/workflows/sdk-tests.yml@main
63+
with:
64+
server-binary: server
65+
server-args: "--port 8080"
66+
server-port: 8080
67+
sdks: |
68+
[
69+
{
70+
"name": "python",
71+
"repo": "${{ github.repository }}",
72+
"ref": "${{ github.ref }}",
73+
"lang": "python",
74+
"uv-version": "0.11.3",
75+
"test_cmd": "uv run pytest tests/ -v -s -m '(account or basin or stream) and not cloud_only'"
76+
}
77+
]

.github/workflows/pr-title.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: PR Title
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize, reopened]
6+
7+
jobs:
8+
validate:
9+
name: Validate PR Title
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: amannn/action-semantic-pull-request@v5
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
with:
16+
types: |
17+
feat
18+
fix
19+
docs
20+
perf
21+
refactor
22+
style
23+
test
24+
chore
25+
ci
26+
revert
27+
requireScope: false
28+
subjectPattern: ^.+$
29+
subjectPatternError: |
30+
The subject "{subject}" is not valid.
31+
Please use a non-empty subject after the type/scope.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
release_created: ${{ steps.release.outputs.release_created }}
17+
tag_name: ${{ steps.release.outputs.tag_name }}
18+
steps:
19+
- uses: googleapis/release-please-action@v4
20+
id: release
21+
with:
22+
config-file: release-please-config.json
23+
manifest-file: .release-please-manifest.json

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ["v[0-9]+.[0-9]+.[0-9]+*"]
6+
7+
jobs:
8+
pypi-publish:
9+
name: Build and publish to PyPI
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v7
18+
- name: Build package
19+
run: uv build
20+
- name: Publish package to PyPI
21+
uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Python-generated files
2+
__pycache__/
3+
*.py[oc]
4+
build/
5+
dist/
6+
wheels/
7+
*.egg-info
8+
9+
# Virtual environments
10+
.venv
11+
12+
# Sphinx
13+
docs/build
14+
15+
# Claude Code
16+
.claude/

.python-version

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

.readthedocs.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
version: 2
5+
6+
build:
7+
os: ubuntu-24.04
8+
tools:
9+
python: "3.11"
10+
jobs:
11+
create_environment:
12+
- asdf plugin add uv
13+
- asdf install uv 0.8.2
14+
- asdf global uv 0.8.2
15+
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --group docs
16+
install:
17+
- "true"
18+
19+
sphinx:
20+
configuration: docs/source/conf.py

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.0"
3+
}

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @s2-streamstore/dev

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Bandar Systems Inc. and contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)