Skip to content

Commit 13b5dac

Browse files
committed
strongly simplify copilot-instructions.md by redirecting even more to contributing.md
1 parent 41f1212 commit 13b5dac

File tree

1 file changed

+10
-82
lines changed

1 file changed

+10
-82
lines changed

.github/copilot-instructions.md

Lines changed: 10 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,18 @@ Berserk is a Python client library for the Lichess chess API. It handles JSON/PG
44

55
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.
66

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
188

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
2011

21-
1. **Basic Library Import Test:**
22-
```python
23-
import berserk
24-
client = berserk.Client()
25-
print("✓ Client created:", [attr for attr in dir(client) if not attr.startswith('_')][:5])
26-
```
12+
## Development Setup & Workflow
2713

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).**
3515

36-
3. **Format Handler Test:**
37-
```python
38-
import berserk.formats as formats
39-
print("✓ Available formats:", [attr for attr in dir(formats) if attr.isupper()])
40-
```
16+
### Validation Scenarios
4117

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)**
4719

4820
## Repository Overview
4921

@@ -56,7 +28,7 @@ print("✓ Available formats:", [attr for attr in dir(formats) if attr.isupper()
5628
├── formats.py # JSON/PGN format handlers
5729
└── utils.py # Utility functions
5830
59-
/tests/ # Unit tests (47 tests, very fast)
31+
/tests/ # Unit tests (very fast)
6032
├── clients/ # Client-specific tests
6133
└── test_*.py # Core functionality tests
6234
@@ -66,16 +38,11 @@ print("✓ Available formats:", [attr for attr in dir(formats) if attr.isupper()
6638
```
6739

6840
**Key files:**
69-
- `pyproject.toml` - Poetry project configuration, dependencies, Python 3.8+ requirement
41+
- `pyproject.toml` - project configuration, dependencies
7042
- `Makefile` - Convenient commands for all development tasks
7143
- `CONTRIBUTING.rst` - **Complete contribution guidelines and setup instructions**
7244
- `check-endpoints.py` - Script to compare implemented vs. available API endpoints
7345

74-
**Technical Details:**
75-
- Requires Python 3.8+
76-
- Uses Poetry for dependency management (NOT pip directly)
77-
- Tested on Python 3.8, 3.9, 3.10, 3.11, 3.12
78-
7946
**API Client Modules:**
8047
The client provides these main modules:
8148
- `client.account` - Account management
@@ -86,43 +53,4 @@ The client provides these main modules:
8653
- `client.bots` - Bot API
8754
- `client.challenges` - Challenge management
8855
- `client.studies` - Study operations
89-
- And many more (see README.rst for complete list)
90-
91-
## Integration Testing
92-
93-
**For complete integration testing setup, see [CONTRIBUTING.rst](../CONTRIBUTING.rst).**
94-
95-
Docker-based integration tests:
96-
- Requires Docker and `ghcr.io/lichess-org/lila-docker:main` image
97-
- Use test tokens: `lip_bobby`, `lip_zerogames`
98-
- Run with: `./integration/local.sh`
99-
100-
Integration tests verify:
101-
- Account operations (get, email, preferences, kid mode, bot upgrade)
102-
- Real API interactions against local Lichess instance
103-
- Authentication token handling
104-
105-
## CI/CD Pipeline
106-
107-
**GitHub Actions workflows:**
108-
- `test.yml` - Runs tests on Python 3.8-3.12 across Ubuntu/macOS/Windows
109-
- `typing.yml` - Type checking with pyright on all Python versions
110-
- `format.yml` - Code formatting verification with black
111-
- `docs.yml` - Documentation building and deployment
112-
- `integration_test.yml` - Docker-based integration tests
113-
- `codeql.yml` - Security analysis
114-
115-
**Pre-release checklist (for maintainers - see [CONTRIBUTING.rst](../CONTRIBUTING.rst) for details):**
116-
- Update `CHANGELOG.rst`
117-
- Bump version in `pyproject.toml`
118-
- Run `make publish` (requires PyPI credentials)
119-
- Tag release: `git tag v1.2.3 && git push --tags`
120-
121-
## Summary
122-
123-
- This is a **library**, not an application - there's no server to run or UI to interact with
124-
- All development commands are very fast (under 6 seconds each after initial setup)
125-
- Focus validation on import patterns and API client functionality
126-
- The library works with or without authentication (some endpoints are public)
127-
- Network access is required for real API calls during manual testing
128-
- **See [CONTRIBUTING.rst](../CONTRIBUTING.rst) for complete setup, testing, and contribution guidelines**
56+
- And many more (see README.rst for complete list)

0 commit comments

Comments
 (0)