Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# LaunchDarkly
LD_SDK_KEY=your-sdk-key-here

# AI providers (set the ones you use)
OPENAI_API_KEY=your-openai-key-here
ANTHROPIC_API_KEY=your-anthropic-key-here

# LaunchDarkly endpoints (leave blank to use production defaults)
LD_BASE_URI=
LD_STREAM_URI=
LD_EVENTS_URI=

# Observability
LD_ENVIRONMENT=production
LD_SERVICE_NAME=python-sdk-service
LD_OBSERVABILITY_BACKEND_URL=
OTEL_EXPORTER_OTLP_ENDPOINT=
OTEL_METRIC_EXPORT_INTERVAL=1000
OTEL_LOGS_EXPORT_INTERVAL=1000
OTEL_TRACES_EXPORT_INTERVAL=1000
22 changes: 22 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build
description: Build a workspace package

inputs:
workspace_path:
description: 'Path to the workspace package'
required: true

runs:
using: composite
steps:
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"

- name: Install dependencies
shell: bash
run: uv sync --all-packages

- name: Build
shell: bash
run: cd ${{ inputs.workspace_path }} && uv build --out-dir dist
34 changes: 34 additions & 0 deletions .github/actions/ci/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI
description: Install dependencies, lint, and test a workspace package

inputs:
workspace_path:
description: 'Path to the workspace package'
required: true

runs:
using: composite
steps:
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"

- name: Install dependencies
shell: bash
run: uv sync --all-packages

- name: Lint
shell: bash
run: uv run ruff check .

- name: Format check
shell: bash
run: uv run ruff format --check .

- name: Type check
shell: bash
run: uv run mypy ${{ inputs.workspace_path }}/src

- name: Test
shell: bash
run: uv run pytest ${{ inputs.workspace_path }}/tests
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
# ─── Lint & format ──────────────────────────────────────────────────────────
lint:
name: Lint & format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- run: uv sync --all-packages
- run: uv run ruff check .
- run: uv run ruff format --check .

# ─── Setup ──────────────────────────────────────────────────────────────────
setup:
name: Install & sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- run: uv sync --all-packages

# ─── Type check ─────────────────────────────────────────────────────────────
typecheck:
name: Type check
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- run: uv sync --all-packages
- run: uv run mypy packages/*/src

# ─── Test ───────────────────────────────────────────────────────────────────
test:
name: Tests
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- run: uv sync --all-packages
- run: uv run pytest packages/*/tests

# ─── Build ────────────────────────────────────────────────────────────────
build:
name: Build all packages
needs: [lint, typecheck, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- run: uv sync --all-packages
- name: Build all packages
run: |
for pkg in packages/*/; do
echo "Building $pkg..."
(cd "$pkg" && uv build --out-dir dist)
done
Loading
Loading