You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Improve getting started and testing guides for humans and agents (#20970)
## Which issue does this PR close?
- Closes #.
## Rationale for this change
This PR is a follow-up to
#20939 from @Dandandan.
The goal is to make it easier for both humans and agents to get started
making changes in this repository and to create pull requests
efficiently.
The repository already had the necessary contributor information, but it
was spread across multiple documents and not easy to discover quickly.
## What changes are included in this PR?
This PR makes the most important setup, testing, and pre-PR checks
easier to find from the contributor guide and from `AGENTS.md`:
- Add a quick-start setup section to the contributor guide with the
shortest path to a working local environment.
- Add a testing quick-start section summarizing the most important tests
to run before submitting a PR.
- Add a “Before Submitting a PR” section to centralize formatting and
lint guidance.
- Update `AGENTS.md` to point to the canonical contributor guide
sections instead of duplicating setup and testing instructions.
## Are these changes tested?
This PR updates documentation only.
## Are there any user-facing changes?
This improves contributor-facing documentation and makes setup / testing
guidance easier to discover, but it does not change DataFusion runtime
behavior or public APIs.
---------
Co-authored-by: Yongting You <2010youy01@gmail.com>
DataFusion has support for [dev containers](https://containers.dev/) which may be used for
36
67
developing DataFusion in an isolated environment either locally or remote if desired. Using dev containers for developing
37
-
DataFusion is not a requirement by any means but is available for those where doing local development could be tricky
68
+
DataFusion is not a requirement but is available where doing local development could be tricky
38
69
such as with Windows and WSL2, those with older hardware, etc.
39
70
40
71
For specific details on IDE support for dev containers see the documentation for [Visual Studio Code](https://code.visualstudio.com/docs/devcontainers/containers),
Compiling DataFusion from sources requires an installed version of the protobuf compiler, `protoc`.
48
79
49
-
On most platforms this can be installed from your system's package manager
80
+
On most platforms this can be installed from your system's package manager. For example:
50
81
51
82
```
52
83
# Ubuntu
@@ -71,7 +102,7 @@ libprotoc 3.15.0
71
102
72
103
Alternatively a binary release can be downloaded from the [Release Page](https://github.com/protocolbuffers/protobuf/releases) or [built from source](https://github.com/protocolbuffers/protobuf/blob/main/src/README.md).
73
104
74
-
## Bootstrap environment
105
+
## Bootstrap Environment
75
106
76
107
DataFusion is written in Rust and it uses a standard rust toolkit:
Copy file name to clipboardExpand all lines: docs/source/contributor-guide/testing.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,37 @@ Tests are critical to ensure that DataFusion is working properly and
23
23
is not accidentally broken during refactorings. All new features
24
24
should have test coverage and the entire test suite is run as part of CI.
25
25
26
+
## Testing Quick Start
27
+
28
+
While developing a feature or bug fix, best practice is to run the smallest set
29
+
of tests that gives confidence for your change, then expand as needed.
30
+
31
+
Initially, run the tests in the crates you changed. For example, if you made changes
32
+
to files in `datafusion-optimizer/src`, run the corresponding crate tests:
33
+
34
+
```shell
35
+
cargo test -p datafusion-optimizer
36
+
```
37
+
38
+
Then, run the `sqllogictest` suite, which provides a strong speed–coverage tradeoff for development: it runs quickly while offering broad regression coverage across most SQL behavior in DataFusion.
39
+
40
+
```shell
41
+
cargo test --profile=ci --test sqllogictests
42
+
```
43
+
44
+
Finally, before submitting a PR, run the tests for the core `datafusion` and
45
+
`datafusion-cli` crates:
46
+
47
+
```shell
48
+
cargo test -p datafusion
49
+
cargo test -p datafusion-cli
50
+
```
51
+
52
+
Some integration tests require optional external services such as Docker-backed
53
+
containers and may skip when unavailable.
54
+
55
+
## Testing Overview
56
+
26
57
DataFusion has several levels of tests in its [Test Pyramid] and tries to follow
27
58
the Rust standard [Testing Organization] described in [The Book].
0 commit comments