Skip to content

Commit 1d1e93e

Browse files
authored
Misc grammar/typo fixes (#20518)
Fix various typos and grammar issues (like repeated words) found by the PyCharm grammar/spelling inspections. Most of these are in docs or code comments. A few isolated instances change some variable names, but they seem local enough that refactoring them shouldn't cause issues. I will highlight them in comments.
1 parent ad856fc commit 1d1e93e

File tree

127 files changed

+200
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+200
-198
lines changed

build-support/bin/terraform_tool_versions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def fetch_platforms_for_version(
189189
) -> Optional[List[ExternalToolVersion]]:
190190
"""Fetch platform binary information for a particular Terraform version."""
191191
logging.info(
192-
f"processiong version {version_slug} with {len(version_links.binary_links)} binaries"
192+
f"processing version {version_slug} with {len(version_links.binary_links)} binaries"
193193
)
194194

195195
if is_prerelease(version_slug):

docs/docs/ad-hoc-tools/integrating-new-tools-without-plugins.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The `adhoc_tool` target allows you to execute "runnable" targets inside the Pant
1111

1212
`adhoc_tool` provides you with the building blocks needed to put together a custom build process without needing to develop and maintain a plugin. The level of initial effort involved in using `adhoc_tool` is significantly lower than that of [writing a plugin](../writing-plugins/overview.mdx), so it's well-suited to consuming one-off scripts, or for rapidly prototyping a process before actually writing a plugin. The tradeoff is that there is more manual work involved in defining build processes that reflect your codebase's structure, and that the targets that define the tools you consume are less easy to reuse.
1313

14-
The `antlr` demo in the [`example-adhoc` respository](https://github.com/pantsbuild/example-adhoc) shows an example of running a JVM-based tool to transparently generate Python code that can be used in another language:
14+
The `antlr` demo in the [`example-adhoc` repository](https://github.com/pantsbuild/example-adhoc) shows an example of running a JVM-based tool to transparently generate Python code that can be used in another language:
1515

1616
```
1717
adhoc_tool(

docs/docs/contributions/development/debugging-and-benchmarking.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,6 @@ Dumping thread stacks:
121121
- Run: `gdb /path/to/python/binary PROCESS_ID`
122122
3. Enable logging to write the thread dump to `gdb.txt`: `set logging on`
123123
4. Dump all thread backtraces: `thread apply all bt`
124-
5. If you use pyenv to mange your Python install, a gdb script will exist in the same directory as the Python binary. Source it into gdb:
124+
5. If you use pyenv to manage your Python install, a gdb script will exist in the same directory as the Python binary. Source it into gdb:
125125
- `source ~/.pyenv/versions/3.8.5/bin/python3.8-gdb.py` (if using version 3.8.5)
126126
6. Dump all Python stacks: `thread apply all py-bt`

docs/docs/contributions/development/internal-architecture.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ But both of the goals are important because together they allow for an API that
6666
There are a few constraints that decide which `Rule`s are able to provide dependencies for one another:
6767

6868
- `param_consumption` - When a `Rule` directly uses a `Param` as a positional argument, that `Param` is removed from scope for any of that `Rule`'s dependencies.
69-
- For example, for a `Rule` `y` with a positional argument `A` and a `Get(B, C)`: if there is a `Param` `A` in scope at `y` and it is used to satisfy the positional argument, it cannot also be used to (transitively) to satisfy the `Get(B, C)` (i.e., a hyptothetical rule that consumes both `A` and `C` would not be eligible in that position).
69+
- For example, for a `Rule` `y` with a positional argument `A` and a `Get(B, C)`: if there is a `Param` `A` in scope at `y` and it is used to satisfy the positional argument, it cannot also be used to (transitively) to satisfy the `Get(B, C)` (i.e., a hypothetical rule that consumes both `A` and `C` would not be eligible in that position).
7070
- On the other hand, for a `Rule` `w` with `Get(B, C)` and `Get(D, E)`, if there is a `Param` `A` in scope at `w`, two dependency `Rule`s that consume `A` (transitively) _can_ be used to satisfy those `Get`s. Only consuming a `Param` as a positional argument removes it from scope.
71-
- `provided_params` - When deciding whether one `Rule` can use another `Rule` to provide the output type of a `Get`, a constraint is applied that the candidate depedency must (transitively) consume the `Param` that is provided by the `Get`.
71+
- `provided_params` - When deciding whether one `Rule` can use another `Rule` to provide the output type of a `Get`, a constraint is applied that the candidate dependency must (transitively) consume the `Param` that is provided by the `Get`.
7272
- For example: if a `Rule` `z` has a `Get(A, B)`, only `Rule`s that compute an `A` and (transitively) consume a `B` are eligible to be used. This also means that a `Param` `A` which is already in scope for `Rule` `z` is not eligible to be used, because it would trivially not consume `B`.
7373

7474
### Implementation
@@ -83,7 +83,7 @@ The construction algorithm is broken up into phases:
8383
- If we were to stop `RuleGraph` construction at this phase, it would be necessary to do a form of [dynamic dispatch](https://en.wikipedia.org/wiki/Dynamic_dispatch) at runtime to decide which source of a dependency to use based on the `Param`s that were currently in scope. And the sets of `Param`s used in the memoization key for each `Rule` would still be overly large, causing excess invalidation.
8484
3. [monomorphize](https://github.com/pantsbuild/pants/blob/3a188a1e06d8c27ff86d8c311ff1b2bdea0d39ff/src/rust/engine/rule_graph/src/builder.rs#L325-L353) - "Monomorphize" the polymorphic graph by using the out-set of available `Param`s (initialized during `initial_polymorphic`) and the in-set of consumed `Param`s (computed during `live_param_labeled`) to partition nodes (and their dependents) for each valid combination of their dependencies. Combinations of dependencies that would be invalid (see the Constraints section) are not generated, which causes some pruning of the graph to happen during this phase.
8585
- Continuing the example from above: the goal of monomorphize is to create one copy of `Rule` `x` per legal combination of its `DependencyKey`. Assuming that both of `x`'s dependencies remain legal (i.e. that all of `{A,B,C}` are still in scope in the dependents of `x`, etc), then two copies of `x` will be created: one that uses the first dependency and has an in-set of `{A,B}`, and another that uses the second dependency and has an in-set of `{B,C}`.
86-
4. [prune_edges](https://github.com/pantsbuild/pants/blob/3a188a1e06d8c27ff86d8c311ff1b2bdea0d39ff/src/rust/engine/rule_graph/src/builder.rs#L836-L845) - Once the monomorphic graph has [converged](https://en.wikipedia.org/wiki/Data-flow_analysis#Convergence), each node in the graph will ideally have exactly one source of each `DependencyKey` (with the exception of `Query`s, which are not monomorphized). This phase validates that, and chooses the smallest input `Param` set to use for each `Query`. In cases where a node has more that one dependency per `DependencyKey`, it is because given a particular set of input `Params` there was more than one valid way to compute a dependency. This can happen either because there were too many `Param`s in scope, or because there were multiple `Rule`s with the same `Param` requirements.
86+
4. [prune_edges](https://github.com/pantsbuild/pants/blob/3a188a1e06d8c27ff86d8c311ff1b2bdea0d39ff/src/rust/engine/rule_graph/src/builder.rs#L836-L845) - Once the monomorphic graph has [converged](https://en.wikipedia.org/wiki/Data-flow_analysis#Convergence), each node in the graph will ideally have exactly one source of each `DependencyKey` (except for `Query`s, which are not monomorphized). This phase validates that, and chooses the smallest input `Param` set to use for each `Query`. In cases where a node has more than one dependency per `DependencyKey`, it is because given a particular set of input `Params` there was more than one valid way to compute a dependency. This can happen either because there were too many `Param`s in scope, or because there were multiple `Rule`s with the same `Param` requirements.
8787
- This phase is the only phase that renders errors: all of the other phases mark nodes and edges "deleted" for particular reasons, and this phase consumes that record. A node that has been deleted indicates that that node is unsatisfiable for some reason, while an edge that has been deleted indicates that the source node was not able to consume the target node for some reason.
8888
- If a node has too many sources of a `DependencyKey`, this phase will recurse to attempt to locate the node in the `Rule` graph where the ambiguity was introduced. Likewise, if a node has no source of a `DependencyKey`, this phase will recurse on deleted nodes (which are preserved by the other phases) to attempt to locate the bottom-most `Rule` that was missing a `DependencyKey`.
8989
5. [finalize](https://github.com/pantsbuild/pants/blob/3a188a1e06d8c27ff86d8c311ff1b2bdea0d39ff/src/rust/engine/rule_graph/src/builder.rs#L1064-L1068) - After `prune_edges` the graph is known to be valid, and this phase generates the final static `RuleGraph` for all `Rule`s reachable from `Query`s.

docs/docs/contributions/development/style-guide.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class OrderedSet:
9797

9898
### TODOs
9999

100-
When creating a TODO, first [create an issue](https://github.com/pantsbuild/pants/issues/new) in GitHub. Then, link to the issue # in parantheses and add a brief description.
100+
When creating a TODO, first [create an issue](https://github.com/pantsbuild/pants/issues/new) in GitHub. Then, link to the issue # in parentheses and add a brief description.
101101

102102
For example:
103103

docs/docs/docker/tagging-docker-images.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ See [String interpolation using placeholder values](./tagging-docker-images.mdx#
148148

149149
When Docker builds images, it can tag them with a set of tags. Pants will apply the tags listed in
150150
the `image_tags` field of `docker_image`, and any additional tags if defined from the registry
151-
configuration (see [Configuring registries](./tagging-docker-images.mdx#configuring-registries).
151+
configuration (see [Configuring registries](./tagging-docker-images.mdx#configuring-registries)).
152152

153153
(Note that the field is named `image_tags` and not just `tags`, because Pants has [its own tags
154154
concept](doc:reference-target#tags), which is unrelated.)
@@ -307,7 +307,7 @@ See [Setting a repository name](./tagging-docker-images.mdx#setting-a-repository
307307
The calculated hash value _may_ change between stable versions of Pants for the otherwise same input sources.
308308
:::
309309

310-
## Retrieving the tags of an packaged image
310+
## Retrieving the tags of a packaged image
311311

312312
When a docker image is packaged, metadata about the resulting image is output to a JSON file artefact. This includes the image ID, as well as the full names that the image was tagged with. This file is written in the same manner as outputs of other packageable targets and available for later steps (for example, a test with `runtime_package_dependencies` including the docker image target) or in `dist/` after `pants package`. By default, this is available at `path.to.target/target_name.docker-info.json`.
313313

docs/docs/getting-started/incremental-adoption.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ How to incrementally add Pants to an existing repository.
1111

1212
If you have an existing repository, we recommend incrementally adopting to reduce the surface area of change, which reduces risk.
1313

14-
Incremental adoption also allows you to immediately start benefitting from Pants, then deepen adoption at your own pace, instead of postponing benefit until you are ready to make dramatic change all at once.
14+
Incremental adoption also allows you to immediately start benefiting from Pants, then deepen adoption at your own pace, instead of postponing benefit until you are ready to make dramatic change all at once.
1515

1616
:::note Joining Slack
1717
We would love to help you with adopting Pants. Please reach out through [Slack](/community/getting-help).

docs/docs/go/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ You can pass through arguments with `--`, e.g. `pants test pkg/deploy: -- -v -ru
175175

176176
### Loose files in tests (`testdata`)
177177

178-
To open files in your tests, use [`file` / `files` targets](../using-pants/assets-and-archives.mdx) targets and add them as `dependencies` to your `go_package`.
178+
To open files in your tests, use [`file` / `files`](../using-pants/assets-and-archives.mdx) targets and add them as `dependencies` to your `go_package`.
179179

180180
```python title="pkg/runner/BUILD"
181181
go_package(dependencies=[":testdata"])

docs/docs/helm/deployments.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ Please share feedback for what you need to use Pants with your Helm deployments
1515

1616
Helm's ultimate purpose is to simplify the deployment of Kubernetes resources and help in making these reproducible. However it is quite common to deploy the same software application into different kind of environments using slightly different configuration overrides.
1717

18-
This hinders reproducibility since operators end up having a set of configuration files and additional shell scripts that ensure that the Helm command line usued to deploy a piece of software into a given environment is always the same.
18+
This hinders reproducibility since operators end up having a set of configuration files and additional shell scripts that ensure that the Helm command line used to deploy a piece of software into a given environment is always the same.
1919

2020
Pants solves this problem by providing with the ability to manage the configuration files and the different parameters of a deployment as single unit such that a simple command line as `pants experimental-deploy ::` will always have the same effect on each of the deployments previously defined.
2121

2222
## Defining Helm deployments
2323

24-
Helm deployments are defined using the `helm_deployment` target which has a series of fields that can be used to guarantee the reproducibility of the given deployment. `helm_deployment` targets need to be added by hand as there is no deterministic way of instrospecting your repository to find sources that are specific to Helm:
24+
Helm deployments are defined using the `helm_deployment` target which has a series of fields that can be used to guarantee the reproducibility of the given deployment. `helm_deployment` targets need to be added by hand as there is no deterministic way of introspecting your repository to find sources that are specific to Helm:
2525

2626
```python tab={"label":"src/chart/BUILD"}
2727
helm_chart()
@@ -85,7 +85,7 @@ There are quite a few things to notice in the previous example:
8585
- One of those value files (`common-values.yaml`) provides with default values that are common to all deployments.
8686
- Each deployment uses an additional `xxx-override.yaml` file with values that are specific to the given deployment.
8787

88-
The `helm_deployment` target has many additional fields including the target kubernetes namespace, adding inline override values (similar to using helm's `--set` arg) and many others. Please run `pants help helm_deployment` to see all the posibilities.
88+
The `helm_deployment` target has many additional fields including the target kubernetes namespace, adding inline override values (similar to using helm's `--set` arg) and many others. Please run `pants help helm_deployment` to see all the possibilities.
8989

9090
## Dependencies with `docker_image` targets
9191

@@ -253,7 +253,7 @@ helm_deployment(
253253
As shown above, now the `release` and `namespace` fields are calculated at deploy-time by Pants and, as in the previous example, they will be forwarded to the Helm chart accordingly.
254254

255255
:::caution Ensuring repeatable deployments
256-
You should always favor using static values (or value files) VS dynamic values in your deployments. Using interpolated environment variables in your deployments can render your deployments non-repetable anymore if those values can affect the behaviour of the system deployed, or what gets deployed (i.e. Docker image addresses).
256+
You should always favor using static values (or value files) VS dynamic values in your deployments. Using interpolated environment variables in your deployments can render your deployments non-repeatable anymore if those values can affect the behaviour of the system deployed, or what gets deployed (i.e. Docker image addresses).
257257
Be careful when chossing the values that are going to be calculated dynamically.
258258
:::
259259

docs/docs/helm/index.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pants package ::
111111
Built Helm chart artifact: testprojects.src.helm.example/example/example-0.2.0.tgz
112112
```
113113

114-
The final output folder can customised using the `output_path` field in the `helm_chart` target. Run `pants help helm_chart` for more information.
114+
The final output folder can be customised using the `output_path` field in the `helm_chart` target. Run `pants help helm_chart` for more information.
115115

116116
#### Helm chart version
117117

@@ -356,7 +356,7 @@ Use the option `pants test --no-timeouts` to temporarily disable timeouts, e.g.
356356

357357
Pants only supports publishing Helm charts to OCI registries, a feature that was made generally available in Helm 3.8.
358358

359-
The publishing is done with Pants' `publish` goal but first you will need to tell Pants what are the possible destination registries where to upload your charts.
359+
The publishing is done with Pants' `publish` goal, but first you will need to tell Pants what are the possible destination registries where to upload your charts.
360360

361361
### Configuring OCI registries
362362

docs/docs/introduction/how-does-pants-work.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This means, for example, that you can run all of your linters at the same time,
2727

2828
### Caching
2929

30-
The engine caches processes precisely based on their inputs, and sandboxes execution to minimize side-effects and to make builds consistent and repeatable.
30+
The engine caches processes precisely based on their inputs, and sandboxes execution to minimize side effects and to make builds consistent and repeatable.
3131

3232
<CaptionedImg src={require("/img/pants-caching.gif").default}>
3333
We run both tests, then add a syntax error to one test and rerun; the

docs/docs/java-and-scala/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ Pants supports loading Java and Scala projects in IntelliJ via the [BSP protocol
321321
After Setup (see below), and after IntelliJ has finished indexing your code, you should be able to:
322322

323323
- Use goto definition and other symbol-index-using operations.
324-
- Run test classes, which will first compile them will Pants (and render compile failures if not), and then run them in the foreground with IntelliJ's test runner.
324+
- Run test classes, which will first compile them with Pants (and render compile failures if not), and then run them in the foreground with IntelliJ's test runner.
325325

326326
### Setup
327327

docs/docs/python/goals/check.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ You can use [`.pyi` files](https://mypy.readthedocs.io/en/stable/stubs.html) for
9494

9595
Pants's dependency inference knows to infer a dependency both on the implementation and the type stub. You can verify this by running `pants dependencies path/to/file.py`.
9696

97-
When writing stubs for third-party libraries, you may need the set up the `[source].root_patterns` option so that [source roots](../../using-pants/key-concepts/source-roots.mdx) are properly stripped. For example:
97+
When writing stubs for third-party libraries, you may need to set up the `[source].root_patterns` option so that [source roots](../../using-pants/key-concepts/source-roots.mdx) are properly stripped. For example:
9898

9999
```toml tab={"label":"pants.toml"}
100100
[source]

docs/docs/python/goals/package.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ This allows you to test your packaging pipeline by simply running `pants test ::
2525
See [test](./test.mdx) for more information.
2626
:::
2727

28-
:::tip Streamling Docker builds
29-
Check out our blog [Streamling Docker Builds](https://blog.pantsbuild.org/pants-pex-and-docker/) to read about how you can combine these `package` formats with Pants's Docker support. Also see our [Docker docs](../../docker/index.mdx)
28+
:::tip Streamline Docker builds
29+
Check out our blog [Streamline Docker Builds](https://blog.pantsbuild.org/pants-pex-and-docker/) to read about how you can combine these `package` formats with Pants's Docker support. Also see our [Docker docs](../../docker/index.mdx)
3030
:::
3131

3232
## Creating a PEX file from a `pex_binary` target

docs/docs/python/goals/publish.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ It is better to provide the required secrets using environment variables when ru
5757

5858
## Environment variables
5959

60-
Pants will pass certain configuration [environment variables](https://twine.readthedocs.io/en/latest/#environment-variables), through to Twine. If multiple repositories are involved in a single `publish` goal, you can distinguish them by adding an undersore and the repository name (upper-cased, and with hyphens replaced with underscores) as a suffix on the environment variable names:
60+
Pants will pass certain configuration [environment variables](https://twine.readthedocs.io/en/latest/#environment-variables), through to Twine. If multiple repositories are involved in a single `publish` goal, you can distinguish them by adding an underscore and the repository name (upper-cased, and with hyphens replaced with underscores) as a suffix on the environment variable names:
6161

6262
- `TWINE_USERNAME`
6363
- `TWINE_USERNAME_<repository>`

0 commit comments

Comments
 (0)