toolcallcheck 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. toolcallcheck-0.1.0/.github/workflows/ci.yml +43 -0
  2. toolcallcheck-0.1.0/.github/workflows/pypi_publish.yml +50 -0
  3. toolcallcheck-0.1.0/.gitignore +75 -0
  4. toolcallcheck-0.1.0/CITATION.cff +19 -0
  5. toolcallcheck-0.1.0/CONTRIBUTING.md +60 -0
  6. toolcallcheck-0.1.0/LICENSE +21 -0
  7. toolcallcheck-0.1.0/PKG-INFO +1019 -0
  8. toolcallcheck-0.1.0/README.md +979 -0
  9. toolcallcheck-0.1.0/SECURITY.md +24 -0
  10. toolcallcheck-0.1.0/pyproject.toml +126 -0
  11. toolcallcheck-0.1.0/src/toolcallcheck/__init__.py +71 -0
  12. toolcallcheck-0.1.0/src/toolcallcheck/adapters/__init__.py +130 -0
  13. toolcallcheck-0.1.0/src/toolcallcheck/assertions.py +232 -0
  14. toolcallcheck-0.1.0/src/toolcallcheck/builders.py +265 -0
  15. toolcallcheck-0.1.0/src/toolcallcheck/diff.py +108 -0
  16. toolcallcheck-0.1.0/src/toolcallcheck/fake_model.py +111 -0
  17. toolcallcheck-0.1.0/src/toolcallcheck/fixtures.py +58 -0
  18. toolcallcheck-0.1.0/src/toolcallcheck/markers.py +14 -0
  19. toolcallcheck-0.1.0/src/toolcallcheck/mock_server.py +191 -0
  20. toolcallcheck-0.1.0/src/toolcallcheck/multi_turn.py +104 -0
  21. toolcallcheck-0.1.0/src/toolcallcheck/offline.py +60 -0
  22. toolcallcheck-0.1.0/src/toolcallcheck/plugins.py +86 -0
  23. toolcallcheck-0.1.0/src/toolcallcheck/recording.py +118 -0
  24. toolcallcheck-0.1.0/src/toolcallcheck/result.py +85 -0
  25. toolcallcheck-0.1.0/src/toolcallcheck/runner.py +256 -0
  26. toolcallcheck-0.1.0/src/toolcallcheck/scenario.py +52 -0
  27. toolcallcheck-0.1.0/src/toolcallcheck/snapshot.py +88 -0
  28. toolcallcheck-0.1.0/src/toolcallcheck/trajectory.py +129 -0
  29. toolcallcheck-0.1.0/tests/__init__.py +1 -0
  30. toolcallcheck-0.1.0/tests/test_assertions.py +278 -0
  31. toolcallcheck-0.1.0/tests/test_builders.py +144 -0
  32. toolcallcheck-0.1.0/tests/test_diff.py +62 -0
  33. toolcallcheck-0.1.0/tests/test_fake_model.py +115 -0
  34. toolcallcheck-0.1.0/tests/test_fixtures.py +31 -0
  35. toolcallcheck-0.1.0/tests/test_mock_server.py +264 -0
  36. toolcallcheck-0.1.0/tests/test_multi_turn.py +100 -0
  37. toolcallcheck-0.1.0/tests/test_offline.py +49 -0
  38. toolcallcheck-0.1.0/tests/test_plugins.py +75 -0
  39. toolcallcheck-0.1.0/tests/test_recording.py +99 -0
  40. toolcallcheck-0.1.0/tests/test_result.py +118 -0
  41. toolcallcheck-0.1.0/tests/test_runner.py +169 -0
  42. toolcallcheck-0.1.0/tests/test_scenario.py +34 -0
  43. toolcallcheck-0.1.0/tests/test_snapshot.py +87 -0
  44. toolcallcheck-0.1.0/tests/test_trajectory.py +154 -0
@@ -0,0 +1,43 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ branches: ["main"]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+ cache: "pip"
24
+
25
+ - name: Install dependencies
26
+ run: |
27
+ python -m pip install --upgrade pip
28
+ pip install -e ".[dev]"
29
+
30
+ - name: Check formatting (Ruff)
31
+ run: ruff format --check .
32
+
33
+ - name: Run linter (Ruff)
34
+ run: ruff check .
35
+
36
+ - name: Run type hints (Mypy)
37
+ run: mypy src
38
+
39
+ - name: Run tests (Pytest)
40
+ run: pytest -v
41
+
42
+ - name: Run security audit (pip-audit)
43
+ run: pip-audit
@@ -0,0 +1,50 @@
1
+ # Author: Goutam Adwant
2
+ name: Publish to PyPI
3
+
4
+ on:
5
+ workflow_dispatch:
6
+ release:
7
+ types: [published]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: read
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.12"
21
+
22
+ - name: Build
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ pip install build twine
26
+ python -m build
27
+ python -m twine check dist/*
28
+
29
+ - name: Upload build artifacts
30
+ uses: actions/upload-artifact@v4
31
+ with:
32
+ name: dist
33
+ path: dist/*
34
+
35
+ publish:
36
+ runs-on: ubuntu-latest
37
+ needs: build
38
+ permissions:
39
+ id-token: write
40
+ environment:
41
+ name: pypi
42
+ steps:
43
+ - name: Download artifacts
44
+ uses: actions/download-artifact@v4
45
+ with:
46
+ name: dist
47
+ path: dist
48
+
49
+ - name: Publish to PyPI (trusted publishing)
50
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,75 @@
1
+ # Python bytecode
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Build artifacts
7
+ build/
8
+ dist/
9
+ *.egg-info/
10
+ .eggs/
11
+ *.egg
12
+ pip-wheel-metadata/
13
+
14
+ # Virtual environments
15
+ .venv/
16
+ venv/
17
+ env/
18
+ ENV/
19
+
20
+ # Tool caches
21
+ .pytest_cache/
22
+ .mypy_cache/
23
+ .ruff_cache/
24
+ .hypothesis/
25
+ .tox/
26
+ .nox/
27
+ .coverage
28
+ .coverage.*
29
+ htmlcov/
30
+
31
+ # Type checker / analyzer
32
+ .pyre/
33
+ .pytype/
34
+
35
+ # Packaging and dependency managers
36
+ .python-version
37
+ .poetry/
38
+ poetry.lock
39
+ Pipfile.lock
40
+ pdm.lock
41
+
42
+ # Editors / IDE
43
+ .vscode/
44
+ .idea/
45
+ *.swp
46
+ *.swo
47
+ *~
48
+
49
+ # OS files
50
+ .DS_Store
51
+ Thumbs.db
52
+ Desktop.ini
53
+
54
+ # Notebook
55
+ .ipynb_checkpoints/
56
+
57
+ # Logs and temp
58
+ *.log
59
+ tmp/
60
+ temp/
61
+ *.tmp
62
+
63
+ # Secrets
64
+ .env
65
+ .env.*
66
+ *.pem
67
+ *.key
68
+ *.p12
69
+
70
+ # Snapshots (managed by toolcallcheck)
71
+ .toolcallcheck_snapshots/
72
+
73
+ skills/*
74
+ document/*
75
+ release.sh
@@ -0,0 +1,19 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it as below."
3
+ authors:
4
+ - family-names: "Adwant"
5
+ given-names: "Goutam"
6
+ alias: "adwantg"
7
+ title: "toolcallcheck: Deterministic, pytest-native testing for tool-using AI agents"
8
+ version: "0.1.0"
9
+ date-released: "2026-04-04"
10
+ url: "https://github.com/adwantg/toolcallcheck"
11
+ repository-code: "https://github.com/adwantg/toolcallcheck"
12
+ license: MIT
13
+ keywords:
14
+ - python
15
+ - agent-testing
16
+ - mcp
17
+ - pytest
18
+ - deterministic-testing
19
+ - tool-calling
@@ -0,0 +1,60 @@
1
+ # Contributing to toolcallcheck
2
+
3
+ Thank you for contributing! We welcome bug reports, feature requests, and pull requests.
4
+
5
+ ## Developer Quick Start
6
+
7
+ ```bash
8
+ # Clone the repository
9
+ git clone https://github.com/adwantg/toolcallcheck.git
10
+ cd toolcallcheck
11
+
12
+ # Create a virtual environment using Python 3.10+
13
+ python3 -m venv .venv
14
+ source .venv/bin/activate
15
+
16
+ # Install editable package with dev dependencies
17
+ pip install -e ".[dev]"
18
+
19
+ # Install pre-commit hooks
20
+ pre-commit install
21
+ ```
22
+
23
+ ## Quality and Acceptance Gates
24
+
25
+ To get your PR merged, it must pass these local verification steps:
26
+
27
+ ```bash
28
+ # 1. Formatting
29
+ ruff format .
30
+
31
+ # 2. Linting
32
+ ruff check .
33
+
34
+ # 3. Type Checking
35
+ mypy src
36
+
37
+ # 4. Tests and Coverage (minimum 90% required)
38
+ python -m pytest
39
+
40
+ # 5. Security Audit
41
+ pip-audit
42
+ ```
43
+
44
+ ## Pull Request Requirements
45
+
46
+ By contributing, you agree to:
47
+
48
+ 1. **Maintain Quality**: All code must pass formatting, linting, type checking, and tests.
49
+ 2. **Keep Coverage High**: Do not reduce test coverage below 90%.
50
+ 3. **Update README & Docs**: Any behavior change must include an accompanying `README.md` update.
51
+ 4. **Write Tests**: Every new feature or bug fix must include corresponding tests.
52
+ 5. **Follow Conventions**: Adhere to the repository layout and coding standards.
53
+
54
+ ## Issue Reporting
55
+
56
+ When reporting an issue, please describe:
57
+ 1. Steps to reproduce the behavior.
58
+ 2. Expected vs actual behavior.
59
+ 3. Python version and OS.
60
+ 4. Relevant error messages or logs.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Goutam Adwant
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.