Skip to content

Commit 0ed6732

Browse files
authored
Add AGENTS.md file (#20)
* Add AGENTS.md file * Update AGENTS.md
1 parent 10b6731 commit 0ed6732

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

AGENTS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# AGENTS.md
2+
3+
Python library for autograding Git repositories, used by Git Mastery exercise repository to verify exercise solutions.
4+
5+
## Dev environment
6+
7+
- Python 3.13+
8+
- Install dependencies: `pip install -r requirements.txt`
9+
- Install package in dev mode: `pip install -e .`
10+
11+
## Testing
12+
13+
- Run tests: `python -m pytest -s -vv`
14+
- Tests are located in `tests/`
15+
16+
## Project structure
17+
18+
- `src/git_autograder/` - Main package
19+
- `repo/` - Repository handling (GitAutograderRepo)
20+
- `branch.py`, `commit.py`, `remote.py` - Git object wrappers
21+
- `exercise.py` - Exercise configuration and grading
22+
- `helpers/` - Utility functions
23+
- `docs/` - Documentation
24+
- `tests/` - Test suite
25+
26+
## Code style
27+
28+
- **Type hints**: Required on all function signatures. Use `Optional[T]` for nullable types, union syntax `A | B` for alternatives
29+
- **Docstrings**: Use reStructuredText format with `:param:` and `:type:` tags for public APIs
30+
- **Imports**: Group in order: stdlib → third-party → local. Use absolute imports from `git_autograder`
31+
- **Naming**: Classes use `GitAutograder` prefix (e.g., `GitAutograderRepo`). Private methods use single underscore prefix
32+
- **Exceptions**: Raise `GitAutograderInvalidStateException` for invalid states, `GitAutograderWrongAnswerException` for grading failures
33+
- **Dataclasses**: Prefer `@dataclass` for simple data containers

0 commit comments

Comments
 (0)