generated from bisco/codex-bootstrap
Initial commit
This commit is contained in:
42
.codex/profiles/python.md
Normal file
42
.codex/profiles/python.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Python profile
|
||||
|
||||
Enable this profile for Python repositories.
|
||||
|
||||
## Suggested standard
|
||||
|
||||
Codex SHOULD prefer:
|
||||
|
||||
- `pytest` for tests;
|
||||
- `ruff` for linting and formatting checks;
|
||||
- type hints for public functions and non-trivial logic;
|
||||
- `pathlib` for filesystem paths where practical;
|
||||
- explicit error handling;
|
||||
- small, focused functions;
|
||||
- simple modules over unnecessary class hierarchies.
|
||||
|
||||
## Rules
|
||||
|
||||
Codex MUST:
|
||||
|
||||
- keep dependencies minimal;
|
||||
- avoid broad `except` clauses unless justified;
|
||||
- avoid hidden side effects at import time;
|
||||
- separate business logic from CLI, web, or framework glue;
|
||||
- avoid global mutable state unless justified;
|
||||
- write tests for behavior, not implementation details;
|
||||
- run tests inside Docker containers.
|
||||
|
||||
## Validation examples
|
||||
|
||||
Use project-specific Docker-based commands, for example:
|
||||
|
||||
```bash
|
||||
docker compose run --rm app ruff check .
|
||||
docker compose run --rm app pytest
|
||||
```
|
||||
|
||||
If formatting is configured:
|
||||
|
||||
```bash
|
||||
docker compose run --rm app ruff format --check .
|
||||
```
|
||||
Reference in New Issue
Block a user