Skip to content

Commit dca8014

Browse files
authored
docs: add whl_from_dir to dev guide docs (#3067)
Mentions the whl_from_dir repository rule in our dev guide.
1 parent cdf4f55 commit dca8014

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,13 @@ merged:
234234
## Binary artifacts
235235

236236
Checking in binary artifacts is not allowed. This is because they are extremely
237-
problematic to verify and ensure they're safe
237+
problematic to verify and ensure they're safe. This is true even in
238+
test contexts.
238239

239240
Examples include, but aren't limited to: prebuilt binaries, shared libraries,
240241
zip files, or wheels.
241242

243+
See the dev guide for utilities to help with testing.
242244

243245
(breaking-changes)=
244246
## Breaking Changes

docs/devguide.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ to be perfectly factored and not every common thing a test does needs to be
3737
factored into a more generally reusable piece. Copying and pasting is fine. It's
3838
more important for tests to balance understandability and maintainability.
3939

40+
### Test utilities
41+
42+
General code to support testing is in {gh-path}`tests/support`. It has a variety
43+
of functions, constants, rules etc, to make testing easier. Below are some
44+
common utilities that are frequently used.
45+
4046
### sh_py_run_test
4147

4248
The {gh-path}`sh_py_run_test <tests/support/sh_py_run_test.bzl` rule is a helper to
@@ -68,6 +74,12 @@ the rule. To have it support setting a new flag:
6874
list, then modify the transition's logic to check the attribute and set
6975
the flag value if the attribute is set.
7076

77+
### whl_from_dir_repo
78+
79+
The `whl_from_dir_repo` repository rule in {gh-path}`tests/support/whl_from_dir`
80+
takes a directory tree and turns it into a `.whl` file. This can be used to
81+
create arbitrary whl files to verify functionality.
82+
7183
### Integration tests
7284

7385
An integration test is one that runs a separate Bazel instance inside the test.

0 commit comments

Comments
 (0)