Skip to content

Commit bfbda12

Browse files
author
Matt Carey
committed
feat: flat structure
1 parent 7c876d1 commit bfbda12

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+95
-379
lines changed

.cursor-rules/examples-standards.mdc

Lines changed: 0 additions & 104 deletions
This file was deleted.

.cursor/rules/examples-standards.mdc

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: Standards for creating and maintaining examples for all functionality
3+
globs: examples/*
4+
---
15
# Examples Standards
26

37
Standards for creating and maintaining examples in the StackOne repository.
@@ -9,8 +13,6 @@ description: Standards for creating and maintaining examples for all functionali
913
filters:
1014
- type: path
1115
pattern: "^examples/.*"
12-
- type: path
13-
pattern: "^packages/.*/.*"
1416

1517
actions:
1618
- type: suggest
@@ -36,8 +38,6 @@ actions:
3638
- Load credentials from .env
3739
- Include type hints
3840
- Follow the same code style as the main codebase
39-
- Always use "gpt-4o-mini" as the model name in LLM examples
40-
- Keep examples minimal and focused on demonstrating specific functionality
4141

4242
3. Documentation:
4343
- Each example file should start with a docstring explaining its purpose
@@ -55,21 +55,14 @@ examples:
5555
import os
5656
from dotenv import load_dotenv
5757
from stackone_ai import StackOneToolSet
58-
from openai import OpenAI
5958

6059
def main():
61-
"""Example showing basic usage of StackOneToolSet with OpenAI."""
60+
"""Example showing basic usage of StackOneToolSet."""
6261
load_dotenv()
6362

6463
api_key = os.getenv("STACKONE_API_KEY")
6564
if not api_key:
6665
raise ValueError("STACKONE_API_KEY not found")
67-
68-
client = OpenAI()
69-
response = client.chat.completions.create(
70-
model="gpt-4o-mini", # Always use gpt-4o-mini in examples
71-
messages=[{"role": "user", "content": "Hello"}]
72-
)
7366

7467
# Example code...
7568

@@ -78,16 +71,12 @@ examples:
7871
output: "Correctly structured example"
7972

8073
- input: |
81-
# Bad example - missing error handling, docs, types, wrong model name
74+
# Bad example - missing error handling, docs, types
8275
from stackone_ai import StackOneToolSet
83-
from openai import OpenAI
8476

8577
toolset = StackOneToolSet("hardcoded_key")
86-
client = OpenAI()
87-
response = client.chat.completions.create(
88-
model="gpt-4", # Wrong - should use gpt-4o-mini
89-
messages=[{"role": "user", "content": "Hello"}]
90-
)
78+
tools = toolset.get_tools("crm")
79+
result = tools["some_tool"].execute()
9180
output: "Incorrectly structured example"
9281

9382
metadata:

.cursor/rules/new-stackone-package.mdc

Lines changed: 0 additions & 69 deletions
This file was deleted.

.cursor/rules/package-installation.mdc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ actions:
2929

3030
2. Package Level Dependencies:
3131
```bash
32-
# Navigate to package directory
33-
cd packages/stackone-core
34-
3532
# Install package dependencies
3633
uv add pydantic
3734
uv add requests
@@ -52,7 +49,10 @@ actions:
5249
uv run pytest
5350

5451
# Run specific package tests
55-
uv run pytest packages/stackone-core/tests/
52+
uv run pytest stackone_ai
53+
54+
#Run tests on examples
55+
uv run pytest examples
5656
```
5757

5858
5. Package Dependencies:
@@ -72,7 +72,6 @@ examples:
7272
uv add --dev black
7373

7474
# Good: Installing package dependencies
75-
cd packages/stackone-core
7675
uv add pydantic
7776

7877
# Bad: Using pip install

.cursor/rules/test-standards.mdc

Lines changed: 0 additions & 81 deletions
This file was deleted.

.cursor/rules/uv-scripts.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ filters:
1414
- type: path
1515
pattern: "^scripts/.*"
1616
- type: exclude_path
17-
pattern: "^(packages|examples)/.*" # Exclude packages and examples
17+
pattern: "^(stackone_ai|examples)/.*" # Exclude package and examples
1818

1919
actions:
2020
- type: suggest

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
args: check .
2727

2828
- name: Run Mypy
29-
run: uv run mypy packages/stackone-ai/stackone_ai
29+
run: uv run mypy stackone_ai

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,5 @@ jobs:
3535
env:
3636
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
3737
run: |
38-
cd packages/stackone-ai
3938
uv build --no-sources
4039
uv publish

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ __pycache__
1111
# Documentation build
1212
.docs/
1313
site/
14+
15+
*.egg-info
16+
dist/
17+
build/

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
rev: v1.8.0
1111
hooks:
1212
- id: mypy
13-
files: ^packages/stackone-ai/stackone_ai/
13+
files: ^stackone_ai/
1414
additional_dependencies:
1515
- types-requests
1616
- types-PyYAML

0 commit comments

Comments
 (0)