Skip to content

Commit 8650632

Browse files
committed
scaffolding
1 parent 6b76761 commit 8650632

File tree

14 files changed

+921
-0
lines changed

14 files changed

+921
-0
lines changed

.coveragerc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[run]
2+
omit =
3+
examples/*
4+
tests/*
5+
concurrency = multiprocessing
6+
parallel = true
7+
sigterm = true
8+
data_file = .coverage
9+
source = tadata_sdk
10+
11+
[report]
12+
show_missing = true
13+
14+
[paths]
15+
source =
16+
tadata_sdk/

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 10
8+
labels:
9+
- "dependencies"
10+
- "github-actions"
11+
12+
- package-ecosystem: "pip"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
open-pull-requests-limit: 10
17+
labels:
18+
- "dependencies"
19+
- "python"

.github/workflows/ci.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
ruff:
11+
name: Ruff
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v5
18+
with:
19+
version: "0.6.12"
20+
enable-cache: true
21+
cache-dependency-glob: "uv.lock"
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version-file: ".python-version"
27+
28+
- name: Install dependencies
29+
run: uv sync --all-extras --dev
30+
31+
- name: Lint with Ruff
32+
run: uv run ruff check .
33+
34+
mypy:
35+
name: MyPy
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Install uv
41+
uses: astral-sh/setup-uv@v5
42+
with:
43+
version: "0.6.12"
44+
enable-cache: true
45+
cache-dependency-glob: "uv.lock"
46+
47+
- name: Set up Python
48+
uses: actions/setup-python@v5
49+
with:
50+
python-version-file: ".python-version"
51+
52+
- name: Install dependencies
53+
run: uv sync --all-extras --dev
54+
55+
- name: Type check with MyPy
56+
run: uv run mypy .
57+
58+
test:
59+
name: Test Python ${{ matrix.python-version }}
60+
runs-on: ubuntu-latest
61+
strategy:
62+
fail-fast: false
63+
matrix:
64+
python-version: ["3.10", "3.11", "3.12", "3.13"]
65+
66+
steps:
67+
- uses: actions/checkout@v4
68+
69+
- name: Install uv
70+
uses: astral-sh/setup-uv@v5
71+
with:
72+
version: "0.6.12"
73+
python-version: ${{ matrix.python-version }}
74+
enable-cache: true
75+
cache-dependency-glob: "uv.lock"
76+
77+
- name: Install dependencies
78+
run: uv sync --all-extras --dev
79+
80+
- name: Run tests
81+
run: uv run pytest --cov=tadata_python_sdk --cov-report=xml
82+
83+
- name: Upload coverage to Codecov
84+
uses: codecov/codecov-action@v5
85+
with:
86+
token: ${{ secrets.CODECOV_TOKEN }}
87+
fail_ci_if_error: false

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v5
17+
with:
18+
version: "0.6.12"
19+
enable-cache: true
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version-file: ".python-version"
25+
26+
- name: Install build dependencies
27+
run: |
28+
uv sync --all-extras --dev
29+
uv pip install build twine
30+
31+
- name: Build and publish
32+
env:
33+
TWINE_USERNAME: __token__
34+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
35+
run: |
36+
uv run python -m build
37+
uv run twine check dist/*
38+
uv run twine upload dist/*

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
exclude: \.md$
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
10+
- repo: https://github.com/astral-sh/ruff-pre-commit
11+
rev: v0.9.10
12+
hooks:
13+
- id: ruff
14+
args: [--fix]
15+
- id: ruff-format

.python-version

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

examples/__init__.py

Whitespace-only changes.

instuctions.txt

Whitespace-only changes.

mypy.ini

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

pyproject.toml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
[build-system]
2+
requires = ["hatchling", "tomli"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "tadata-sdk"
7+
version = "0.1.0"
8+
description = "Tadata Python SDK"
9+
readme = "README.md"
10+
requires-python = ">=3.10"
11+
authors = [
12+
{name = "Tadata Inc."},
13+
]
14+
classifiers = [
15+
"Programming Language :: Python :: 3",
16+
"Programming Language :: Python :: 3.10",
17+
"Programming Language :: Python :: 3.11",
18+
"Programming Language :: Python :: 3.12",
19+
"Programming Language :: Python :: 3.13",
20+
]
21+
keywords = ["openapi", "mcp", "llm", "modelcontextprotocol", "tadata"]
22+
dependencies = [
23+
"pydantic>=2.0.0",
24+
"pydantic-settings>=2.5.2",
25+
"httpx>=0.24.0",
26+
"tomli>=2.2.1",
27+
]
28+
29+
[dependency-groups]
30+
dev = [
31+
"mypy>=1.15.0",
32+
"ruff>=0.9.10",
33+
"types-setuptools>=75.8.2.20250305",
34+
"pytest>=8.3.5",
35+
"pytest-asyncio>=0.26.0",
36+
"pytest-cov>=6.1.1",
37+
"pre-commit>=4.2.0",
38+
]
39+
40+
[project.urls]
41+
Homepage = "https://github.com/tadata-org/tadata-python-sdk"
42+
Documentation = "https://github.com/tadata-org/tadata-python-sdk#readme"
43+
"Bug Tracker" = "https://github.com/tadata-org/tadata-python-sdk/issues"
44+
"PyPI" = "https://pypi.org/project/tadata-python-sdk/"
45+
"Source Code" = "https://github.com/tadata-org/tadata-python-sdk"
46+
"Changelog" = "https://github.com/tadata-org/tadata-python-sdk/blob/main/CHANGELOG.md"
47+
48+
[tool.hatch.build.targets.wheel]
49+
packages = ["tadata_python_sdk"]
50+
51+
[tool.ruff]
52+
line-length = 120
53+
target-version = "py313"
54+
55+
[tool.pytest.ini_options]
56+
asyncio_mode = "auto"
57+
testpaths = ["tests"]
58+
python_files = "test_*.py"

0 commit comments

Comments
 (0)