Skip to content

Commit 635deee

Browse files
committed
docs: add commenting guidance section to AGENTS.md
1 parent da63a52 commit 635deee

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

AGENTS.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,26 @@ This repository contains Python bindings for Rust's DataFusion.
4848
relying on private PyArrow internals that may change.
4949

5050
## Helper Functions
51+
52+
## Commenting guidance
53+
54+
Use comments intentionally. Prefer three kinds of comments depending on purpose:
55+
56+
- Implementation Comments
57+
- Explains non-obvious choices and tricky implementations
58+
- Serves as breadcrumbs for future developers
59+
60+
- Documentation Comments
61+
- Describes functions, classes, and modules
62+
- Acts as public interface documentation
63+
64+
- Contextual Comments
65+
- Documents assumptions, preconditions, and non-obvious requirements
66+
67+
Keep comments concise and up-to-date; prefer clear code over comments when
68+
possible, and move long-form design notes into the repository docs or an
69+
appropriate design file.
70+
5171
- `python/datafusion/io.py` offers global context readers:
5272
- `read_parquet`
5373
- `read_json`

0 commit comments

Comments
 (0)