Skip to content

Commit 0a22aa4

Browse files
committed
🔨 tighten typing and test readiness
1 parent 5932f80 commit 0a22aa4

8 files changed

Lines changed: 131 additions & 1 deletion

File tree

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "uv"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 5
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
open-pull-requests-limit: 5

.github/workflows/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
- name: Set up Python
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.12"
17+
- name: Set up uv
18+
uses: astral-sh/setup-uv@v3
19+
- name: Sync dependencies
20+
run: uv sync
21+
- name: Run tests
22+
run: uv run pytest -n auto --durations=10 tests/

SECURITY.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Security updates apply to the latest version on the main branch.
6+
7+
## Reporting a Vulnerability
8+
9+
If you discover a security issue, please use one of the following:
10+
11+
1) Open a private GitHub Security Advisory for this repository.
12+
2) If advisories are unavailable, open a regular issue with minimal details and request a private channel.
13+
14+
Please include a clear description, steps to reproduce, and any known impact.

docs/privacy.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Privacy and Data Handling
2+
3+
This repository is a template and does not include production data collection by default. If you add data handling to your implementation, follow these guidelines.
4+
5+
## Data Minimization
6+
7+
- Collect only what you need.
8+
- Avoid storing sensitive data unless required.
9+
10+
## Secrets and Credentials
11+
12+
- Store secrets in `.env` (or a secrets manager), never in code.
13+
- Do not log API keys, tokens, or user identifiers.
14+
15+
## Logging
16+
17+
- Treat logs as sensitive.
18+
- Redact or hash identifiers before logging.
19+
20+
## Third-Party Services
21+
22+
- Document any external processors and what data they receive.
23+
- Ensure their retention and deletion policies match your requirements.

docs/privacy/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Privacy and Data Handling
2+
3+
This repository is a template and does not include production data collection by default. If you add data handling to your implementation, follow these guidelines.
4+
5+
## Data Minimization
6+
7+
- Collect only what you need.
8+
- Avoid storing sensitive data unless required.
9+
10+
## Secrets and Credentials
11+
12+
- Store secrets in `.env` (or a secrets manager), never in code.
13+
- Do not log API keys, tokens, or user identifiers.
14+
15+
## Logging
16+
17+
- Treat logs as sensitive.
18+
- Redact or hash identifiers before logging.
19+
20+
## Third-Party Services
21+
22+
- Document any external processors and what data they receive.
23+
- Ensure their retention and deletion policies match your requirements.

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ dependencies = [
1111
"python-dotenv>=1.0.1",
1212
"human-id>=0.2.0",
1313
"pytest>=8.3.3",
14+
"pytest-xdist>=3.6.1",
1415
"termcolor>=2.4.0",
1516
"loguru>=0.7.3",
1617
"vulture>=2.14",
@@ -47,6 +48,17 @@ target-version = "py312"
4748
select = ["E", "F", "W", "I", "N", "UP", "B", "C4", "SIM"]
4849
ignore = ["E501", "UP015", "B008"]
4950

51+
[tool.ty]
52+
53+
[tool.ty.analysis]
54+
respect-type-ignore-comments = false
55+
56+
[tool.ty.rules]
57+
possibly-unresolved-reference = "error"
58+
59+
[tool.ty.terminal]
60+
error-on-warning = true
61+
5062
[tool.ty.environment]
5163
python-version = "3.12"
5264

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ markers =
33
slow: marks tests as slow
44
nondeterministic: marks tests as nondeterministic
55
slow_and_nondeterministic: marks tests as both slow and nondeterministic
6-
addopts = --cov=src --cov=common --cov=utils --cov-report=term-missing --cov-fail-under=20
6+
addopts = -n auto --durations=10 --cov=src --cov=common --cov=utils --cov-report=term-missing --cov-fail-under=20
77
env =
88
DEV_ENV = dev
99
OPENAI_API_KEY=test_api_key

uv.lock

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)