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: .github/copilot-instructions.md
+10-82Lines changed: 10 additions & 82 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,46 +4,18 @@ Berserk is a Python client library for the Lichess chess API. It handles JSON/PG
4
4
5
5
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
6
6
7
-
## Development Setup & Workflow
8
-
9
-
**For complete development setup and contribution guidelines, see [CONTRIBUTING.rst](../CONTRIBUTING.rst).**
10
-
11
-
Key points for Copilot agents:
12
-
- This is a **library**, not an application - there's no server to run or UI to interact with
13
-
- Setup takes 2-3 minutes initially but subsequent operations are very fast
14
-
- All development commands are very fast (under 6 seconds each after initial setup)
15
-
- No build step required - it's pure Python
16
-
17
-
## Validation Scenarios
7
+
## Code Standards
18
8
19
-
**ALWAYS validate your changes by running these scenarios after making any code modifications:**
9
+
### Required Before Each Commit
10
+
- Run `make format` before committing any changes to ensure proper code formatting
20
11
21
-
1.**Basic Library Import Test:**
22
-
```python
23
-
import berserk
24
-
client = berserk.Client()
25
-
print("✓ Client created:", [attr for attr indir(client) ifnot attr.startswith('_')][:5])
26
-
```
12
+
## Development Setup & Workflow
27
13
28
-
2.**Authentication Test:**
29
-
```python
30
-
import berserk
31
-
session = berserk.TokenSession('test_token')
32
-
client = berserk.Client(session=session)
33
-
print("✓ Authenticated client created")
34
-
```
14
+
**For complete development setup and contribution guidelines, see [CONTRIBUTING.rst](../CONTRIBUTING.rst).**
35
15
36
-
3.**Format Handler Test:**
37
-
```python
38
-
import berserk.formats as formats
39
-
print("✓ Available formats:", [attr for attr indir(formats) if attr.isupper()])
40
-
```
16
+
### Validation Scenarios
41
17
42
-
4.**Complete Validation Sequence:**
43
-
-`make test` - All tests must pass (~0.4s for 47 tests)
44
-
-`make typecheck` - Type checking must pass with 0 errors (~5s)
45
-
-`make format --check` - Code must be properly formatted (~1s)
46
-
- Run the basic import tests above manually
18
+
**For complete testing guidelines, see [CONTRIBUTING.rst](../CONTRIBUTING.rst) and [pull_request_template.md](pull_request_template.md)**
47
19
48
20
## Repository Overview
49
21
@@ -56,7 +28,7 @@ print("✓ Available formats:", [attr for attr in dir(formats) if attr.isupper()
56
28
├── formats.py # JSON/PGN format handlers
57
29
└── utils.py # Utility functions
58
30
59
-
/tests/ # Unit tests (47 tests, very fast)
31
+
/tests/ # Unit tests (very fast)
60
32
├── clients/ # Client-specific tests
61
33
└── test_*.py # Core functionality tests
62
34
@@ -66,16 +38,11 @@ print("✓ Available formats:", [attr for attr in dir(formats) if attr.isupper()
0 commit comments