docs: improve AGENTS.md with better build/lint/test commands and code style guidelines
This commit is contained in:
@@ -29,19 +29,33 @@ markdownlint . # Markdown linting
|
|||||||
### Running Tests
|
### Running Tests
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# No formal test framework configured
|
# Manual testing approach - run individual commands to test functionality
|
||||||
# Project uses manual testing with example PDF files in repository
|
# Test schedule fetching
|
||||||
# To test individual functions, run the CLI commands directly:
|
myice schedule --days 7
|
||||||
# myice schedule --days 7
|
|
||||||
# myice mobile-login
|
# Test mobile login
|
||||||
# myice search --help
|
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
|
### Running the Web API
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Or with poetry
|
# Run with poetry
|
||||||
poetry run fastapi run myice/webapi.py --host 127.0.0.1
|
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
|
## 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
|
- Maintain backward compatibility when modifying existing APIs
|
||||||
- Document new features in README.md
|
- Document new features in README.md
|
||||||
- Always run ruff format and ruff check after editing a python file
|
- 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