docs: improve AGENTS.md with better build/lint/test commands and code style guidelines
This commit is contained in:
32
AGENTS.md
32
AGENTS.md
@@ -29,19 +29,33 @@ markdownlint . # Markdown linting
|
||||
### Running Tests
|
||||
|
||||
```bash
|
||||
# No formal test framework configured
|
||||
# Project uses manual testing with example PDF files in repository
|
||||
# To test individual functions, run the CLI commands directly:
|
||||
# myice schedule --days 7
|
||||
# myice mobile-login
|
||||
# myice search --help
|
||||
# Manual testing approach - run individual commands to test functionality
|
||||
# Test schedule fetching
|
||||
myice schedule --days 7
|
||||
|
||||
# Test mobile login
|
||||
myice mobile-login
|
||||
|
||||
# Test specific command help
|
||||
myice search --help
|
||||
|
||||
# Test web API (run in background)
|
||||
poetry run fastapi run myice/webapi.py &
|
||||
|
||||
# Run a single pre-commit hook on specific file
|
||||
pre-commit run ruff --files myice/myice.py
|
||||
pre-commit run ruff-format --files myice/webapi.py
|
||||
pre-commit run mypy --files myice/myice.py
|
||||
```
|
||||
|
||||
### Running the Web API
|
||||
|
||||
```bash
|
||||
# Or with poetry
|
||||
# Run with poetry
|
||||
poetry run fastapi run myice/webapi.py --host 127.0.0.1
|
||||
|
||||
# Run with uv (alternative)
|
||||
uv run fastapi run myice/webapi.py --host 127.0.0.1
|
||||
```
|
||||
|
||||
## Code Style Guidelines
|
||||
@@ -102,4 +116,6 @@ poetry run fastapi run myice/webapi.py --host 127.0.0.1
|
||||
- Maintain backward compatibility when modifying existing APIs
|
||||
- Document new features in README.md
|
||||
- Always run ruff format and ruff check after editing a python file
|
||||
- use conventional commit messages
|
||||
- Use conventional commit messages
|
||||
- When fixing JSON parsing issues, follow the pattern established in
|
||||
sanitize_json_response function
|
||||
|
||||
Reference in New Issue
Block a user