stackone-ai 0.3.3__tar.gz → 2.0.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 (115) hide show
  1. stackone_ai-2.0.0/.claude/rules/development-workflow.md +63 -0
  2. stackone_ai-2.0.0/.claude/rules/examples-standards.md +75 -0
  3. stackone_ai-2.0.0/.claude/rules/git-workflow.md +97 -0
  4. stackone_ai-2.0.0/.claude/rules/no-relative-imports.md +27 -0
  5. stackone_ai-2.0.0/.claude/rules/package-installation.md +59 -0
  6. stackone_ai-2.0.0/.claude/rules/release-please-standards.md +63 -0
  7. stackone_ai-2.0.0/.claude/rules/uv-scripts.md +66 -0
  8. stackone_ai-2.0.0/.cursor/rules/development-workflow.mdc +1 -0
  9. stackone_ai-2.0.0/.cursor/rules/examples-standards.mdc +1 -0
  10. stackone_ai-2.0.0/.cursor/rules/git-workflow.mdc +1 -0
  11. stackone_ai-2.0.0/.cursor/rules/no-relative-imports.mdc +1 -0
  12. stackone_ai-2.0.0/.cursor/rules/package-installation.mdc +1 -0
  13. stackone_ai-2.0.0/.cursor/rules/release-please-standards.mdc +1 -0
  14. stackone_ai-2.0.0/.cursor/rules/uv-scripts.mdc +1 -0
  15. stackone_ai-2.0.0/.envrc +1 -0
  16. stackone_ai-2.0.0/.github/actions/setup-nix/action.yaml +19 -0
  17. stackone_ai-2.0.0/.github/dependabot.yaml +58 -0
  18. stackone_ai-2.0.0/.github/workflows/ci.yaml +106 -0
  19. stackone_ai-2.0.0/.github/workflows/nix-flake-update.yaml +63 -0
  20. stackone_ai-2.0.0/.github/workflows/nix-flake.yaml +33 -0
  21. stackone_ai-0.3.3/.github/workflows/release.yml → stackone_ai-2.0.0/.github/workflows/release.yaml +7 -10
  22. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/.gitignore +5 -3
  23. stackone_ai-2.0.0/.gitleaks.toml +14 -0
  24. stackone_ai-2.0.0/.release-please-manifest.json +3 -0
  25. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/CHANGELOG.md +52 -0
  26. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/CLAUDE.md +34 -33
  27. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/PKG-INFO +96 -48
  28. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/README.md +91 -36
  29. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/examples/crewai_integration.py +1 -1
  30. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/examples/file_uploads.py +5 -5
  31. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/examples/index.py +4 -4
  32. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/examples/langchain_integration.py +1 -1
  33. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/examples/meta_tools_example.py +16 -49
  34. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/examples/openai_integration.py +6 -6
  35. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/examples/stackone_account_ids.py +4 -4
  36. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/examples/test_examples.py +9 -32
  37. stackone_ai-2.0.0/flake.lock +170 -0
  38. stackone_ai-2.0.0/flake.nix +118 -0
  39. stackone_ai-2.0.0/justfile +47 -0
  40. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/pyproject.toml +27 -45
  41. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/scripts/update_version.py +7 -1
  42. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/stackone_ai/__init__.py +1 -1
  43. stackone_ai-2.0.0/stackone_ai/constants.py +5 -0
  44. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/stackone_ai/feedback/tool.py +5 -18
  45. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/stackone_ai/integrations/langgraph.py +6 -14
  46. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/stackone_ai/meta_tools.py +89 -24
  47. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/stackone_ai/models.py +44 -27
  48. stackone_ai-2.0.0/stackone_ai/toolset.py +415 -0
  49. stackone_ai-2.0.0/stackone_ai/utils/__init__.py +1 -0
  50. stackone_ai-2.0.0/stackone_ai/utils/tfidf_index.py +242 -0
  51. stackone_ai-2.0.0/tests/test_feedback.py +395 -0
  52. stackone_ai-2.0.0/tests/test_integrations_langgraph.py +217 -0
  53. stackone_ai-2.0.0/tests/test_meta_tools.py +494 -0
  54. stackone_ai-2.0.0/tests/test_models.py +962 -0
  55. stackone_ai-2.0.0/tests/test_tfidf_index.py +452 -0
  56. stackone_ai-2.0.0/tests/test_tool_calling.py +333 -0
  57. stackone_ai-2.0.0/tests/test_toolset.py +355 -0
  58. stackone_ai-2.0.0/tests/test_toolset_mcp.py +414 -0
  59. stackone_ai-2.0.0/uv.lock +4403 -0
  60. stackone_ai-0.3.3/.cursor/rules/cursor-rules-location.mdc +0 -75
  61. stackone_ai-0.3.3/.cursor/rules/examples-standards.mdc +0 -89
  62. stackone_ai-0.3.3/.cursor/rules/no-relative-imports.mdc +0 -54
  63. stackone_ai-0.3.3/.cursor/rules/package-installation.mdc +0 -88
  64. stackone_ai-0.3.3/.cursor/rules/release-please-standards.mdc +0 -77
  65. stackone_ai-0.3.3/.cursor/rules/uv-scripts.mdc +0 -83
  66. stackone_ai-0.3.3/.env_example +0 -2
  67. stackone_ai-0.3.3/.github/workflows/docs.yml +0 -36
  68. stackone_ai-0.3.3/.github/workflows/lint.yml +0 -42
  69. stackone_ai-0.3.3/.github/workflows/test.yml +0 -37
  70. stackone_ai-0.3.3/.pre-commit-config.yaml +0 -16
  71. stackone_ai-0.3.3/.release-please-manifest.json +0 -3
  72. stackone_ai-0.3.3/.vscode/settings.json +0 -4
  73. stackone_ai-0.3.3/Makefile +0 -33
  74. stackone_ai-0.3.3/examples/available_tools.py +0 -95
  75. stackone_ai-0.3.3/examples/custom_base_url.py +0 -42
  76. stackone_ai-0.3.3/examples/error_handling.py +0 -72
  77. stackone_ai-0.3.3/examples/mcp_server.py +0 -15
  78. stackone_ai-0.3.3/mkdocs.yml +0 -51
  79. stackone_ai-0.3.3/scripts/build_docs.py +0 -82
  80. stackone_ai-0.3.3/scripts/pull_oas.py +0 -89
  81. stackone_ai-0.3.3/stackone_ai/constants.py +0 -5
  82. stackone_ai-0.3.3/stackone_ai/oas/ats.json +0 -18632
  83. stackone_ai-0.3.3/stackone_ai/oas/core.json +0 -1479
  84. stackone_ai-0.3.3/stackone_ai/oas/crm.json +0 -2602
  85. stackone_ai-0.3.3/stackone_ai/oas/documents.json +0 -2870
  86. stackone_ai-0.3.3/stackone_ai/oas/hris.json +0 -19947
  87. stackone_ai-0.3.3/stackone_ai/oas/iam.json +0 -3441
  88. stackone_ai-0.3.3/stackone_ai/oas/lms.json +0 -6319
  89. stackone_ai-0.3.3/stackone_ai/oas/marketing.json +0 -4521
  90. stackone_ai-0.3.3/stackone_ai/server.py +0 -240
  91. stackone_ai-0.3.3/stackone_ai/specs/loader.py +0 -20
  92. stackone_ai-0.3.3/stackone_ai/specs/parser.py +0 -231
  93. stackone_ai-0.3.3/stackone_ai/toolset.py +0 -189
  94. stackone_ai-0.3.3/tests/snapshots/test_parser/test_parse_all_oas_specs/ats_tools.json +0 -8634
  95. stackone_ai-0.3.3/tests/snapshots/test_parser/test_parse_all_oas_specs/core_tools.json +0 -452
  96. stackone_ai-0.3.3/tests/snapshots/test_parser/test_parse_all_oas_specs/crm_tools.json +0 -899
  97. stackone_ai-0.3.3/tests/snapshots/test_parser/test_parse_all_oas_specs/documents_tools.json +0 -1778
  98. stackone_ai-0.3.3/tests/snapshots/test_parser/test_parse_all_oas_specs/hris_tools.json +0 -33327
  99. stackone_ai-0.3.3/tests/snapshots/test_parser/test_parse_all_oas_specs/iam_tools.json +0 -558
  100. stackone_ai-0.3.3/tests/snapshots/test_parser/test_parse_all_oas_specs/lms_tools.json +0 -11046
  101. stackone_ai-0.3.3/tests/snapshots/test_parser/test_parse_all_oas_specs/marketing_tools.json +0 -2571
  102. stackone_ai-0.3.3/tests/test_feedback.py +0 -269
  103. stackone_ai-0.3.3/tests/test_meta_tools.py +0 -268
  104. stackone_ai-0.3.3/tests/test_models.py +0 -188
  105. stackone_ai-0.3.3/tests/test_parser.py +0 -731
  106. stackone_ai-0.3.3/tests/test_tool_calling.py +0 -143
  107. stackone_ai-0.3.3/tests/test_toolset.py +0 -229
  108. stackone_ai-0.3.3/uv.lock +0 -5969
  109. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/.mcp.json +0 -0
  110. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/.release-please-config.json +0 -0
  111. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/LICENSE +0 -0
  112. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/py.typed +0 -0
  113. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/stackone_ai/feedback/__init__.py +0 -0
  114. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/stackone_ai/integrations/__init__.py +0 -0
  115. {stackone_ai-0.3.3 → stackone_ai-2.0.0}/stackone_ai/py.typed +0 -0
@@ -0,0 +1,63 @@
1
+ ---
2
+ description: Code style, file naming, and project conventions. (project)
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Development Workflow
7
+
8
+ This rule provides code style guidelines and project conventions for the StackOne AI Python SDK.
9
+
10
+ ## Code Style
11
+
12
+ - Use [ruff](https://docs.astral.sh/ruff/) for linting and formatting
13
+ - Follow PEP 8 style guidelines
14
+ - Maximum line length: 88 characters (ruff default)
15
+ - Run `just lint` to check, `just lint-fix` to auto-fix
16
+
17
+ ## Type Annotations
18
+
19
+ - Full type annotations required for all public APIs
20
+ - Use Python 3.11+ typing features
21
+ - Run `just ty` to verify type correctness
22
+ - Strict ty configuration is enforced
23
+
24
+ ## Pre-commit Hooks
25
+
26
+ Pre-commit hooks are configured for:
27
+
28
+ - ruff linting
29
+ - ty type checking
30
+
31
+ Run `just install` to set up hooks.
32
+
33
+ ## Essential Commands
34
+
35
+ ```bash
36
+ just install # Install dependencies and pre-commit hooks
37
+ just lint # Run ruff linting
38
+ just lint-fix # Auto-fix linting issues
39
+ just ty # Run type checking
40
+ just test # Run all tests
41
+ just test-tools # Run tool-specific tests
42
+ just test-examples # Run example tests
43
+ ```
44
+
45
+ ## File Naming
46
+
47
+ - Use snake_case for Python files
48
+ - Use `.yaml` extension instead of `.yml` for YAML files
49
+ - Keep file names concise but meaningful
50
+
51
+ ## Import Organization
52
+
53
+ - Standard library imports first
54
+ - Third-party imports second
55
+ - Local imports last
56
+ - Use absolute imports (see no-relative-imports rule)
57
+
58
+ ## Working with Tools
59
+
60
+ - Use semantic tools for code exploration (avoid full file reads when possible)
61
+ - Leverage symbol indexing for fast navigation
62
+ - Use grep/ripgrep for pattern matching
63
+ - Read only necessary code sections
@@ -0,0 +1,75 @@
1
+ ---
2
+ description: Standards for creating and maintaining examples for all functionality. (project)
3
+ globs: examples/**/*
4
+ paths: examples/**/*
5
+ ---
6
+
7
+ # Examples Standards
8
+
9
+ Standards for creating and maintaining examples in the StackOne repository.
10
+
11
+ ## Location Requirements
12
+
13
+ ```
14
+ examples/
15
+ ├── basic_usage/
16
+ │ ├── basic_tool_usage.py # Basic usage examples
17
+ │ └── error_handling.py # Error handling examples
18
+ ├── integrations/ # Integration examples
19
+ │ ├── openai_integration.py
20
+ │ └── other_integration.py
21
+ └── README.md # Examples documentation
22
+ ```
23
+
24
+ ## Example Requirements
25
+
26
+ - Every public function/class needs at least one example
27
+ - Examples should be runnable Python scripts
28
+ - Include error handling cases
29
+ - Load credentials from .env
30
+ - Include type hints
31
+ - Follow the same code style as the main codebase
32
+
33
+ ## Documentation
34
+
35
+ - Each example file should start with a docstring explaining its purpose
36
+ - Include expected output in comments
37
+ - Document any prerequisites (environment variables, etc)
38
+
39
+ ## Testing
40
+
41
+ - Examples should be tested as part of CI
42
+ - Examples should work with the latest package version
43
+ - Include sample responses in comments
44
+
45
+ ## Good Example Structure
46
+
47
+ ```python
48
+ import os
49
+ from dotenv import load_dotenv
50
+ from stackone_ai import StackOneToolSet
51
+
52
+ def main():
53
+ """Example showing basic usage of StackOneToolSet."""
54
+ load_dotenv()
55
+
56
+ api_key = os.getenv("STACKONE_API_KEY")
57
+ if not api_key:
58
+ raise ValueError("STACKONE_API_KEY not found")
59
+
60
+ # Example code...
61
+
62
+ if __name__ == "__main__":
63
+ main()
64
+ ```
65
+
66
+ ## Bad Example (avoid)
67
+
68
+ ```python
69
+ # Missing error handling, docs, types
70
+ from stackone_ai import StackOneToolSet
71
+
72
+ toolset = StackOneToolSet("hardcoded_key")
73
+ tools = toolset.get_tools("crm")
74
+ result = tools["some_tool"].execute()
75
+ ```
@@ -0,0 +1,97 @@
1
+ ---
2
+ description: Git workflow, commit conventions, and pull request guidelines. (project)
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Git Workflow
7
+
8
+ This rule provides guidance on git workflow, commit conventions, and pull request guidelines.
9
+
10
+ ## Branch Strategy
11
+
12
+ - **Never push directly to main** without permission
13
+ - Create a new branch for changes
14
+ - Create a pull request to merge into main
15
+ - Use `git switch -c feature-name` to start
16
+
17
+ ## Development Flow
18
+
19
+ 1. Create feature branch: `git switch -c feature-name`
20
+ 2. Make changes to source files
21
+ 3. Run linter: `just lint`
22
+ 4. Run tests: `just test`
23
+ 5. Fix linting issues: `just lint-fix`
24
+ 6. Commit with detailed messages
25
+ 7. Push and create PR: `gh pr create`
26
+
27
+ ## Commit Strategy
28
+
29
+ Keep commits tiny but meaningful:
30
+
31
+ - Use git hunks (`-p` flag) to selectively commit changes
32
+ - Write detailed commit messages
33
+ - Ensure each commit is logically complete
34
+ - Use English for all commit messages
35
+
36
+ ## Commit Message Format
37
+
38
+ Format: `type(scope): description`
39
+
40
+ Types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `ci`, `perf`
41
+
42
+ Example:
43
+
44
+ ```
45
+ feat(parser): add support for custom parameter transformers
46
+
47
+ - Add new transformer hooks to OpenAPI parser
48
+ - Enable pre-processing of tool parameters
49
+ - Implement docs for custom transformers
50
+ ```
51
+
52
+ ### Guidelines
53
+
54
+ - Keep each commit as tiny as possible
55
+ - Write detailed commit messages explaining the "why"
56
+ - Each commit should be meaningful (not just a single line change)
57
+ - Use git hunks (`-p` flag) to selectively commit related changes
58
+ - **Always use English** for commit messages
59
+ - Reference issues and PRs when relevant
60
+
61
+ ### When Committing
62
+
63
+ 1. Run `git diff` to review all changes
64
+ 2. Use `git add -p` to review and stage hunks selectively
65
+ 3. Write comprehensive message explaining the purpose
66
+ 4. Verify with `git status` before committing
67
+
68
+ ### File Moves for History Preservation
69
+
70
+ When moving files (e.g., migrating from skills to rules), combine the deletion and creation in a single commit so git treats it as a rename. This preserves file history.
71
+
72
+ ```bash
73
+ # Instead of separate add/delete commits:
74
+ git add .claude/rules/new-file.md
75
+ git rm .claude/skills/old-file/SKILL.md
76
+ git commit -m "refactor(rules): migrate old-file to rules directory"
77
+ ```
78
+
79
+ ## Pull Request Guidelines
80
+
81
+ ### PR Title Format
82
+
83
+ Use the same format as commit messages: `type(scope): description`
84
+
85
+ Examples:
86
+
87
+ - `feat(tools): add support for custom OpenAPI specs`
88
+ - `fix(parser): handle empty response bodies`
89
+ - `refactor(rules): unify cursor rules and claude rules`
90
+
91
+ ### PR Body
92
+
93
+ Include:
94
+
95
+ - **Summary**: 1-3 bullet points describing changes
96
+ - **Test plan**: How to verify the changes work
97
+ - Reference related issues with `Closes #123` or `Fixes #123`
@@ -0,0 +1,27 @@
1
+ ---
2
+ description: Enforce the use of absolute imports instead of relative imports in Python files. (project)
3
+ globs: "**/*.py"
4
+ paths: "**/*.py"
5
+ ---
6
+
7
+ # No Relative Imports
8
+
9
+ Standards for using absolute imports instead of relative imports in Python files.
10
+
11
+ ## Guidelines
12
+
13
+ - Always use absolute imports starting with the full package name (`stackone_ai`)
14
+ - Never use relative imports (`.` or `..`)
15
+ - Keep imports organized and grouped
16
+
17
+ ## Examples
18
+
19
+ ```python
20
+ # Good - absolute imports
21
+ from stackone_ai.tools import ToolDefinition
22
+ from stackone_ai.constants import OAS_DIR
23
+
24
+ # Bad - relative imports (don't use)
25
+ from .tools import ToolDefinition
26
+ from ..constants import OAS_DIR
27
+ ```
@@ -0,0 +1,59 @@
1
+ ---
2
+ description: Standards for installing packages with UV in StackOne. (project)
3
+ globs: "**/pyproject.toml"
4
+ paths: "**/pyproject.toml"
5
+ ---
6
+
7
+ # Package Installation Standards
8
+
9
+ Standards for installing packages with UV in the StackOne repository.
10
+
11
+ ## Root Level Dev Dependencies
12
+
13
+ ```bash
14
+ # Install dev dependencies at root level
15
+ uv add --dev pytest
16
+ uv add --dev pytest-cov
17
+ uv add --dev black
18
+ ```
19
+
20
+ ## Package Level Dependencies
21
+
22
+ ```bash
23
+ # Install package dependencies
24
+ uv add pydantic
25
+ uv add requests
26
+ ```
27
+
28
+ ## Never Use
29
+
30
+ ```bash
31
+ # ❌ Don't use pip install
32
+ uv pip install package-name
33
+
34
+ # ❌ Don't use -e or editable installs
35
+ uv pip install -e .
36
+ ```
37
+
38
+ ## Running Tests
39
+
40
+ ```bash
41
+ # Run from root directory
42
+ uv run pytest
43
+
44
+ # Run specific package tests
45
+ uv run pytest stackone_ai
46
+
47
+ # Run tests on examples
48
+ uv run pytest examples
49
+ ```
50
+
51
+ ## Package Dependencies in pyproject.toml
52
+
53
+ ```toml
54
+ [project]
55
+ dependencies = [
56
+ "pydantic>=2.10.6",
57
+ "requests>=2.32.3",
58
+ ]
59
+ ```
@@ -0,0 +1,63 @@
1
+ ---
2
+ description: Standards for using release-please in the repository. (project)
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Release Please Standards
7
+
8
+ Standards for managing releases with release-please in the repository.
9
+
10
+ ## Configuration Files
11
+
12
+ ```
13
+ .release-please-config.json # Release configuration
14
+ .release-please-manifest.json # Version tracking
15
+ .github/workflows/release.yml # Release workflow
16
+ ```
17
+
18
+ ## Commit Message Format
19
+
20
+ ```bash
21
+ # Features (0.1.0 -> 0.2.0)
22
+ feat: add new feature
23
+ feat!: breaking change feature
24
+
25
+ # Bug Fixes (0.1.0 -> 0.1.1)
26
+ fix: bug fix description
27
+
28
+ # No Version Change
29
+ docs: update readme
30
+ chore: update dependencies
31
+ test: add new tests
32
+ ```
33
+
34
+ ## Release Process
35
+
36
+ 1. Push to main branch triggers release-please
37
+ 2. Release-please creates/updates release PR
38
+ 3. Merging release PR:
39
+ - Updates CHANGELOG.md
40
+ - Creates GitHub release
41
+ - Publishes to PyPI using UV
42
+
43
+ ## Required Secrets
44
+
45
+ ```
46
+ PYPI_API_TOKEN # For publishing to PyPI
47
+ ```
48
+
49
+ ## Good Commit Messages
50
+
51
+ ```bash
52
+ docs: update installation guide
53
+ fix: handle API timeout errors
54
+ feat: add new CRM integration
55
+ ```
56
+
57
+ ## Bad Commit Messages (avoid)
58
+
59
+ ```bash
60
+ updated readme
61
+ fixed bug in api
62
+ added feature
63
+ ```
@@ -0,0 +1,66 @@
1
+ ---
2
+ description: Standards for creating and managing utility scripts with UV. (project)
3
+ globs: scripts/**/*.py
4
+ paths: scripts/**/*.py
5
+ ---
6
+
7
+ # UV Scripts Standards
8
+
9
+ Standards for creating and managing utility scripts with UV.
10
+
11
+ ## Location
12
+
13
+ - Place all utility scripts in the `scripts/` directory
14
+ - NOT for examples (use `examples/` directory instead)
15
+
16
+ ## UV Script Dependencies Header
17
+
18
+ ```python
19
+ # /// script
20
+ # requires-python = ">=3.8"
21
+ # dependencies = [
22
+ # "package1",
23
+ # "package2>=1.0.0"
24
+ # ]
25
+ # ///
26
+ ```
27
+
28
+ ## Script Structure
29
+
30
+ - Type hints are required
31
+ - Use async/await when doing I/O operations
32
+ - Include main guard: `if __name__ == "__main__":`
33
+ - Add return types to functions
34
+
35
+ ## Running Scripts
36
+
37
+ ```bash
38
+ uv run scripts/your_script.py
39
+ ```
40
+
41
+ ## Error Handling
42
+
43
+ - Use try/except blocks for external calls
44
+ - Print meaningful error messages
45
+ - Exit with appropriate status codes
46
+
47
+ ## Example Script
48
+
49
+ ```python
50
+ # /// script
51
+ # requires-python = ">=3.8"
52
+ # dependencies = ["httpx"]
53
+ # ///
54
+
55
+ from typing import Dict
56
+ import asyncio
57
+ import httpx
58
+
59
+ async def fetch_data() -> Dict:
60
+ async with httpx.AsyncClient() as client:
61
+ response = await client.get("https://api.example.com")
62
+ return response.json()
63
+
64
+ if __name__ == "__main__":
65
+ asyncio.run(fetch_data())
66
+ ```
@@ -0,0 +1 @@
1
+ ../../.claude/rules/development-workflow.md
@@ -0,0 +1 @@
1
+ ../../.claude/rules/examples-standards.md
@@ -0,0 +1 @@
1
+ ../../.claude/rules/git-workflow.md
@@ -0,0 +1 @@
1
+ ../../.claude/rules/no-relative-imports.md
@@ -0,0 +1 @@
1
+ ../../.claude/rules/package-installation.md
@@ -0,0 +1 @@
1
+ ../../.claude/rules/release-please-standards.md
@@ -0,0 +1 @@
1
+ ../../.claude/rules/uv-scripts.md
@@ -0,0 +1 @@
1
+ use flake
@@ -0,0 +1,19 @@
1
+ name: "Setup Nix"
2
+ description: "Install Nix and configure Cachix"
3
+ runs:
4
+ using: "composite"
5
+ steps:
6
+ - name: Install Nix
7
+ uses: cachix/install-nix-action@0b0e072294b088b73964f1d72dfdac0951439dbd # v31.8.4
8
+ with:
9
+ github_access_token: ${{ github.token }}
10
+
11
+ - name: Setup Cachix (numtide)
12
+ uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
13
+ with:
14
+ name: numtide
15
+ authToken: ""
16
+
17
+ - name: Load Nix development environment
18
+ shell: bash
19
+ run: nix develop --command true
@@ -0,0 +1,58 @@
1
+ # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2
+ version: 2
3
+ updates:
4
+ # Python dependencies (uv/pip)
5
+ - package-ecosystem: pip
6
+ directory: /
7
+ schedule:
8
+ interval: weekly
9
+ day: monday
10
+ time: "09:00"
11
+ timezone: Europe/London
12
+ open-pull-requests-limit: 10
13
+ commit-message:
14
+ prefix: "chore(deps)"
15
+ labels:
16
+ - dependencies
17
+ - python
18
+ groups:
19
+ dev-dependencies:
20
+ patterns:
21
+ - "pytest*"
22
+ - "ruff"
23
+ - "ty"
24
+ - "pre-commit"
25
+ update-types:
26
+ - minor
27
+ - patch
28
+ ai-frameworks:
29
+ patterns:
30
+ - "openai*"
31
+ - "langchain*"
32
+ - "crewai*"
33
+ - "mcp*"
34
+ update-types:
35
+ - minor
36
+ - patch
37
+
38
+ # GitHub Actions
39
+ - package-ecosystem: github-actions
40
+ directory: /
41
+ schedule:
42
+ interval: weekly
43
+ day: monday
44
+ time: "09:00"
45
+ timezone: Europe/London
46
+ open-pull-requests-limit: 5
47
+ commit-message:
48
+ prefix: "chore(deps)"
49
+ labels:
50
+ - dependencies
51
+ - github-actions
52
+ groups:
53
+ actions:
54
+ patterns:
55
+ - "*"
56
+ update-types:
57
+ - minor
58
+ - patch
@@ -0,0 +1,106 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ branches:
7
+ - main
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ permissions:
14
+ contents: read
15
+ pages: write
16
+ id-token: write
17
+
18
+ jobs:
19
+ gitleaks:
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - name: Checkout repository
23
+ uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
24
+ with:
25
+ fetch-depth: 0
26
+
27
+ - name: Setup Nix
28
+ uses: ./.github/actions/setup-nix
29
+
30
+ - name: Run Gitleaks
31
+ run: nix develop --command just gitleaks
32
+
33
+ ci:
34
+ runs-on: ubuntu-latest
35
+ strategy:
36
+ matrix:
37
+ python-version: ["3.11", "3.13"]
38
+ include:
39
+ - python-version: "3.11"
40
+ sync-extras: "--all-extras"
41
+ - python-version: "3.13"
42
+ sync-extras: "--all-extras"
43
+ env:
44
+ STACKONE_API_KEY: ${{ secrets.STACKONE_API_KEY }}
45
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
46
+ steps:
47
+ - name: Checkout repository
48
+ uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
49
+
50
+ - name: Setup Nix
51
+ uses: ./.github/actions/setup-nix
52
+
53
+ - name: Install dependencies
54
+ run: nix develop --command just install ${{ matrix.sync-extras }}
55
+
56
+ - name: Run Lint
57
+ run: nix develop --command just lint
58
+
59
+ - name: Run Ty
60
+ run: nix develop --command just ty
61
+
62
+ - name: Run Tests
63
+ run: nix develop --command just test
64
+
65
+ coverage:
66
+ runs-on: ubuntu-latest
67
+ if: github.ref == 'refs/heads/main'
68
+ env:
69
+ STACKONE_API_KEY: ${{ secrets.STACKONE_API_KEY }}
70
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
71
+ steps:
72
+ - name: Checkout repository
73
+ uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
74
+
75
+ - name: Setup Nix
76
+ uses: ./.github/actions/setup-nix
77
+
78
+ - name: Install dependencies
79
+ run: nix develop --command just install --all-extras
80
+
81
+ - name: Run Tests with Coverage
82
+ run: nix develop --command just coverage
83
+
84
+ - name: Create Coverage Badge
85
+ uses: jaywcjlove/coverage-badges-cli@4e8975aa2628e3329126e7eee36724d07ed86fda # v2.2.0
86
+ with:
87
+ source: coverage/coverage.json
88
+ output: coverage/badges.svg
89
+ jsonPath: totals.percent_covered
90
+
91
+ - name: Upload coverage artifact
92
+ uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v3.0.2
93
+ with:
94
+ path: coverage/
95
+
96
+ deploy-coverage:
97
+ needs: coverage
98
+ runs-on: ubuntu-latest
99
+ if: github.ref == 'refs/heads/main'
100
+ environment:
101
+ name: github-pages
102
+ url: ${{ steps.deployment.outputs.page_url }}
103
+ steps:
104
+ - name: Deploy to GitHub Pages
105
+ id: deployment
106
+ uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5