Skip to content

Commit 1cbb777

Browse files
authored
Merge branch 'main' into support-auth
2 parents c9d028e + c553683 commit 1cbb777

29 files changed

+479
-0
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Datastrato, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
name: CI
216

317
on:
@@ -26,6 +40,9 @@ jobs:
2640
- name: Install dependencies
2741
run: uv sync --all-extras
2842

43+
- name: Check license headers
44+
run: uv run python scripts/check-license.py
45+
2946
- name: Run ruff check
3047
run: uv run ruff check src tests
3148

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Contributing to ADP Python SDK
2+
3+
Thank you for your interest in contributing to the ADP Python SDK!
4+
5+
## How to Contribute
6+
7+
1. Fork the repository and create your branch from `main`.
8+
2. Make your changes and ensure any new code is covered by tests.
9+
3. Submit a pull request with a clear description of the change.
10+
11+
## License
12+
13+
By contributing, you agree that your contributions will be licensed under the [Apache License 2.0](LICENSE).
14+
15+
## License Header
16+
17+
Every source file must include the following header:
18+
19+
```
20+
# Copyright 2026 Datastrato, Inc.
21+
#
22+
# Licensed under the Apache License, Version 2.0 (the "License");
23+
# you may not use this file except in compliance with the License.
24+
# You may obtain a copy of the License at
25+
#
26+
# http://www.apache.org/licenses/LICENSE-2.0
27+
#
28+
# Unless required by applicable law or agreed to in writing, software
29+
# distributed under the License is distributed on an "AS IS" BASIS,
30+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31+
# See the License for the specific language governing permissions and
32+
# limitations under the License.
33+
```

LICENSE

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
Copyright 2026 Datastrato, Inc.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
15+
---
16+
117
Apache License
218
Version 2.0, January 2004
319
http://www.apache.org/licenses/

NOTICE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ADP Python SDK
2+
Copyright 2026 Datastrato, Inc.

scripts/check-license.py

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Copyright 2026 Datastrato, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""Check that all source files contain the required license header."""
16+
17+
import os
18+
import sys
19+
20+
COPYRIGHT_MARKER = "Copyright 2026 Datastrato, Inc."
21+
22+
SCAN_RULES = [
23+
{"dirs": ["src", "tests"], "ext": ".py"},
24+
{"dirs": [os.path.join(".github", "workflows")], "ext": ".yml"},
25+
]
26+
27+
SKIP_DIRS = {".venv", "dist", "__pycache__", ".mypy_cache", ".pytest_cache", ".ruff_cache"}
28+
SKIP_FILES = {os.path.join("src", "adp_sdk", "py.typed")}
29+
30+
31+
def should_skip_dir(dirname: str) -> bool:
32+
return dirname in SKIP_DIRS
33+
34+
35+
def collect_files() -> list[str]:
36+
files: list[str] = []
37+
for rule in SCAN_RULES:
38+
for base_dir in rule["dirs"]:
39+
for root, dirs, filenames in os.walk(base_dir):
40+
dirs[:] = [d for d in dirs if not should_skip_dir(d)]
41+
for filename in filenames:
42+
if filename.endswith(rule["ext"]):
43+
filepath = os.path.join(root, filename)
44+
if filepath not in SKIP_FILES:
45+
files.append(filepath)
46+
return sorted(files)
47+
48+
49+
def check_header(filepath: str) -> bool:
50+
with open(filepath, encoding="utf-8") as f:
51+
content = f.read()
52+
return COPYRIGHT_MARKER in content
53+
54+
55+
def main() -> int:
56+
files = collect_files()
57+
missing: list[str] = []
58+
59+
for filepath in files:
60+
if not check_header(filepath):
61+
missing.append(filepath)
62+
63+
if missing:
64+
print("Files missing license header:")
65+
for f in missing:
66+
print(f" {f}")
67+
print(f"\n{len(missing)} file(s) missing the required license header.")
68+
return 1
69+
70+
print(f"All {len(files)} file(s) have the required license header.")
71+
return 0
72+
73+
74+
if __name__ == "__main__":
75+
sys.exit(main())

src/adp_sdk/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Datastrato, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
"""ADP SDK - Python SDK for the Agentic Data Protocol."""
216

317
from collections.abc import AsyncIterator

src/adp_sdk/client/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Datastrato, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
"""ADP client session."""
216

317
from .session import ClientSession, basic_auth

src/adp_sdk/client/session.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Datastrato, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
"""High-level ADP client session.
216
317
Manages the lifecycle of a connection to an ADP server, including

src/adp_sdk/shared/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Datastrato, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
"""Shared utilities for the ADP SDK."""
216

317
from .exceptions import (

src/adp_sdk/shared/exceptions.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Datastrato, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
"""ADP-specific exceptions."""
216

317
from typing import Any

0 commit comments

Comments
 (0)