Skip to content

Commit eb2eb63

Browse files
committed
feat: add AGENTS.md
1 parent 0cc9b0a commit eb2eb63

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

AGENTS.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Repository instructions for datafusion-python
2+
3+
## Style and Linting
4+
- Python formatting and linting is handled by **ruff**.
5+
- Rust code must pass `cargo fmt`, `cargo clippy`, and `cargo tomlfmt`.
6+
- Install the pre-commit hooks with `pre-commit install` and run them with
7+
`pre-commit run --files <file1> <file2>` or `pre-commit run --all-files`.
8+
- The same checks can be run manually using the scripts in `ci/scripts`:
9+
- `./ci/scripts/python_lint.sh`
10+
- `./ci/scripts/rust_fmt.sh`
11+
- `./ci/scripts/rust_clippy.sh`
12+
- `./ci/scripts/rust_toml_fmt.sh`
13+
14+
## Running Tests
15+
1. Ensure submodules are initialized:
16+
```bash
17+
git submodule update --init
18+
```
19+
2. Create a development environment and install dependencies:
20+
```bash
21+
uv sync --dev --no-install-package datafusion
22+
```
23+
3. Build the Python extension:
24+
```bash
25+
uv run --no-project maturin develop --uv
26+
```
27+
4. Execute the test suite:
28+
```bash
29+
uv run --no-project pytest -v .
30+
```
31+
32+
## Building Documentation
33+
- Documentation dependencies can be installed with the `docs` group:
34+
```bash
35+
uv sync --dev --group docs --no-install-package datafusion
36+
```
37+
- Build the docs with:
38+
```bash
39+
uv run --no-project maturin develop --uv
40+
uv run --no-project docs/build.sh
41+
```
42+
- The generated HTML appears under `docs/build/html`.

0 commit comments

Comments
 (0)