1.2 KiB
1.2 KiB
AGENTS.md: Agent Coding Guidelines (2025)
Build, Lint, and Test Commands
- Main entry point:
python main.py - Start dev server:
python manage.py runserver - Run all tests:
pytest main/tests.py - Run a single test:
pytest main/tests.py::test_func - Lint code (if installed):
flake8 .orpylint main.py - Add new dependencies: update
requirements.txt
Python & Django Style Guide
- Follow PEP8: 4 spaces/indent, ≤79 chars/line
- Import order: stdlib, third-party, then project/local modules
- Use explicit imports; do NOT use wildcard imports
- Naming: snake_case (vars/functions), PascalCase (classes), UPPER_SNAKE_CASE (constants)
- All public classes/APIs require type annotations and docstrings
- Django models/views should have descriptive docstrings
- Handle errors with try/except; log, re-raise, or message as appropriate
- One statement per line, trim trailing whitespace
- Avoid global state; use functions/classes, avoid module-level code
- Guard standalone scripts with
if __name__ == '__main__': - No Cursor or Copilot rules present as of 2025
- Reference
.github/instructions/memory.instruction.mdfor user customizations
(Update and evolve as practices change)