You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .grok/GROK.md
+283-6Lines changed: 283 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,30 @@ This is a Python SDK/client library for the ProjectX Trading Platform Gateway AP
7
7
8
8
**Note**: Focus on toolkit development, not on creating trading strategies.
9
9
10
+
## Project Status: v2.0.4 - Async Architecture
11
+
12
+
**IMPORTANT**: This project has migrated to a fully asynchronous architecture as of v2.0.0. All APIs are now async-only with no backward compatibility to synchronous versions.
13
+
14
+
## Development Phase Guidelines
15
+
16
+
**IMPORTANT**: This project is in active development. When making changes:
17
+
18
+
1.**No Backward Compatibility**: Do not maintain old implementations for compatibility
19
+
2.**Clean Code Priority**: Always refactor to the cleanest, most modern approach
20
+
3.**Remove Legacy Code**: Delete old logic when implementing improvements
21
+
4.**Breaking Changes Allowed**: Make breaking changes freely to improve architecture
22
+
5.**Modern Patterns**: Use the latest Python patterns and best practices
23
+
6.**Simplify Aggressively**: Remove complexity rather than adding compatibility layers
24
+
7.**Async-First**: All new code must use async/await patterns
25
+
26
+
Example approach:
27
+
- ❌ DON'T: Keep old method signatures with deprecation warnings
28
+
- ✅ DO: Replace methods entirely with better implementations
29
+
- ❌ DON'T: Add compatibility shims or adapters
30
+
- ✅ DO: Update all callers to use new patterns
31
+
- ❌ DON'T: Create synchronous wrappers for async methods
32
+
- ✅ DO: Use async/await throughout the entire call stack
33
+
10
34
## Tool Usage Guidelines
11
35
As Grok CLI, you have access to tools like view_file, create_file, str_replace_editor, bash, search, and todo lists. Use them efficiently for tasks.
12
36
@@ -27,18 +51,272 @@ uv run [command] # Run command in virtual environment
27
51
### Testing
28
52
uv run pytest # Run all tests
29
53
uv run pytest tests/test_client.py # Run specific test file
54
+
uv run pytest -m "not slow" # Run tests excluding slow ones
55
+
uv run pytest --cov=project_x_py --cov-report=html # Generate coverage report
56
+
uv run pytest -k "async" # Run only async tests
57
+
58
+
### Async Testing Patterns
59
+
```python
60
+
# Test async methods with pytest-asyncio
61
+
import pytest
62
+
63
+
@pytest.mark.asyncio
64
+
asyncdeftest_async_method():
65
+
asyncwith ProjectX.from_env() as client:
66
+
await client.authenticate()
67
+
result =await client.get_bars("MNQ", days=1)
68
+
assert result isnotNone
69
+
```
30
70
31
71
### Code Quality
32
72
uv run ruff check . # Lint code
33
73
uv run ruff check . --fix # Auto-fix linting issues
34
74
uv run ruff format . # Format code
35
75
uv run mypy src/ # Type checking
36
76
77
+
### Building and Distribution
78
+
uv build # Build wheel and source distribution
79
+
uv run python -m build # Alternative build command
80
+
37
81
## Project Architecture
38
-
Refer to CLAUDE.md for details, but when editing:
39
-
- Use dependency injection in clients and managers.
0 commit comments