Skip to content

Commit e147a74

Browse files
ci: initial setup (#1)
Sets up the initial project structure and GitHub Actions CI for the Python SDK.
1 parent 613fd52 commit e147a74

6 files changed

Lines changed: 91 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Lint & Typecheck
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install poetry
16+
run: pipx install poetry
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.11"
21+
cache: "poetry"
22+
- name: Install dependencies
23+
run: poetry install
24+
- name: Run Ruff
25+
run: poetry run ruff check src tests
26+
- name: Run Mypy
27+
run: poetry run mypy src tests
28+
29+
test:
30+
runs-on: ubuntu-latest
31+
strategy:
32+
matrix:
33+
python-version: ["3.9", "3.10", "3.11", "3.12"]
34+
35+
services:
36+
altertable:
37+
image: ghcr.io/altertable-ai/altertable-mock:latest
38+
ports:
39+
- 15001:15001
40+
env:
41+
ALTERTABLE_MOCK_API_KEYS: test_pk_abc123
42+
options: >-
43+
--health-cmd "exit 0"
44+
--health-interval 5s
45+
--health-timeout 3s
46+
--health-retries 3
47+
--health-start-period 10s
48+
49+
steps:
50+
- uses: actions/checkout@v4
51+
with:
52+
submodules: recursive
53+
54+
- name: Install poetry
55+
run: pipx install poetry
56+
57+
- name: Set up Python
58+
uses: actions/setup-python@v5
59+
with:
60+
python-version: ${{ matrix.python-version }}
61+
cache: "poetry"
62+
63+
- name: Install dependencies
64+
run: poetry install
65+
66+
- name: Run tests
67+
run: poetry run pytest

README.md

Whitespace-only changes.

mise.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
python = "3.11"

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[tool.poetry]
2+
name = "altertable"
3+
version = "0.1.0"
4+
description = "Official Python SDK for Altertable Product Analytics"
5+
authors = ["Altertable <hello@altertable.ai>"]
6+
readme = "README.md"
7+
packages = [{include = "altertable", from = "src"}]
8+
9+
[tool.poetry.dependencies]
10+
python = "^3.9"
11+
12+
[tool.poetry.group.dev.dependencies]
13+
pytest = "^8.0.0"
14+
ruff = "^0.3.0"
15+
mypy = "^1.8.0"
16+
17+
[build-system]
18+
requires = ["poetry-core"]
19+
build-backend = "poetry.core.masonry.api"

src/altertable/__init__.py

Whitespace-only changes.

tests/test_basic.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def test_import():
2+
import altertable
3+
assert True

0 commit comments

Comments
 (0)