-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-run codegen for BUILD file symbols
- Loading branch information
Showing
145 changed files
with
2,268 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: PANTS_VERSION | ||
description: | | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`PANTS_VERSION`} signature={``}> | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: __defaults__ | ||
description: | | ||
Provide default field values. | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`__defaults__`} signature={`(*args: 'SetDefaultsT', ignore_unknown_fields: 'bool' = False, ignore_unknown_targets: 'bool' = False, **kwargs) -> 'None'`}> | ||
|
||
Provide default field values. | ||
|
||
Learn more https://www.pantsbuild.org/2.22/docs/using-pants/key-concepts/targets-and-build-files#field-default-values | ||
|
||
</BuildFileSymbol> |
13 changes: 13 additions & 0 deletions
13
docs/reference/build-file-symbols/__dependencies_rules__.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: __dependencies_rules__ | ||
description: | | ||
Declare dependencies rules. | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`__dependencies_rules__`} signature={`(*args, **kwargs) -> 'None'`}> | ||
|
||
Declare dependencies rules. | ||
|
||
</BuildFileSymbol> |
13 changes: 13 additions & 0 deletions
13
docs/reference/build-file-symbols/__dependents_rules__.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: __dependents_rules__ | ||
description: | | ||
Declare dependents rules. | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`__dependents_rules__`} signature={`(*args, **kwargs) -> 'None'`}> | ||
|
||
Declare dependents rules. | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"label": "BUILD file symbols", | ||
"link": { | ||
"type": "generated-index", | ||
"slug": "/reference/build-file-symbols", | ||
"title": "BUILD file symbols" | ||
}, | ||
"position": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: build_file_dir | ||
description: | | ||
Returns the path to the directory of the current BUILD file. | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`build_file_dir`} signature={`() -> 'PurePath'`}> | ||
|
||
Returns the path to the directory of the current BUILD file. | ||
|
||
The returned value is an instance of `PurePath` to make path name manipulations easy. | ||
|
||
See: https://docs.python.org/3/library/pathlib.html#pathlib.PurePath | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: duplicate_rule | ||
description: | | ||
DeployJarDuplicateRule(pattern: 'str', action: 'str') | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`duplicate_rule`} signature={`(pattern: 'str', action: 'str') -> None`}> | ||
|
||
DeployJarDuplicateRule(pattern: 'str', action: 'str') | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: env | ||
description: | | ||
Reference environment variable. | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`env`} signature={`(name: 'str', *args, **kwargs) -> 'Any'`}> | ||
|
||
Reference environment variable. | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: http_source | ||
description: | | ||
http_source(url: 'str', *, len: 'int', sha256: 'str', filename: 'str' = '') | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`http_source`} signature={`(url: 'str', *, len: 'int', sha256: 'str', filename: 'str' = '')`}> | ||
|
||
http_source(url: 'str', \*, len: 'int', sha256: 'str', filename: 'str' = '') | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: jvm_exclude | ||
description: | | ||
JvmArtifactExclusion(group: 'str', artifact: 'str | None' = None) | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`jvm_exclude`} signature={`(group: 'str', artifact: 'str | None' = None) -> None`}> | ||
|
||
JvmArtifactExclusion(group: 'str', artifact: 'str | None' = None) | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: node_build_script | ||
description: | | ||
A build script, mapped from the `scripts` section of a package.json file. | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`node_build_script`} signature={`(entry_point: 'str', output_directories: 'Iterable[str]' = (), output_files: 'Iterable[str]' = (), extra_caches: 'Iterable[str]' = (), extra_env_vars: 'Iterable[str]' = ()) -> 'NodeBuildScript'`}> | ||
|
||
A build script, mapped from the `scripts` section of a package.json file. | ||
|
||
Either the `output_directories` or the `output_files` argument has to be set to capture the | ||
output artifacts of the build. | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: node_test_script | ||
description: | | ||
The test script for this package, mapped from the `scripts` section of a package.json | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`node_test_script`} signature={`(entry_point: 'str' = 'test', report_args: 'Iterable[str]' = (), report_output_files: 'Iterable[str]' = (), report_output_directories: 'Iterable[str]' = (), coverage_args: 'Iterable[str]' = (), coverage_output_files: 'Iterable[str]' = (), coverage_output_directories: 'Iterable[str]' = (), coverage_entry_point: 'str | None' = None) -> 'NodeTestScript'`}> | ||
|
||
The test script for this package, mapped from the `scripts` section of a package.json | ||
file. The pointed to script should accept a variadic number of ([ARG]...) path arguments. | ||
|
||
This entry point is the "test" script, by default. | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: parametrize | ||
description: | | ||
A builtin function/dataclass that can be used to parametrize Targets. | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`parametrize`} signature={`(*args: 'str', **kwargs: 'Any') -> 'None'`}> | ||
|
||
A builtin function/dataclass that can be used to parametrize Targets. | ||
|
||
Parametrization is applied between TargetAdaptor construction and Target instantiation, which | ||
means that individual Field instances need not be aware of it. | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: per_platform | ||
description: | | ||
An object containing differing homogeneous platform-dependent values. | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`per_platform`} signature={`(linux_arm64: '_T | None' = None, linux_x86_64: '_T | None' = None, macos_arm64: '_T | None' = None, macos_x86_64: '_T | None' = None) -> None`}> | ||
|
||
An object containing differing homogeneous platform-dependent values. | ||
|
||
The values should be evaluated for the execution environment, and not the host environment | ||
(I.e. it should be evaluated in a `rule` which requests `Platform`). | ||
|
||
Expected usage is roughly: | ||
|
||
```python | ||
class MyFieldType(...): | ||
value = str | per_platform[str] | ||
|
||
@classmethod | ||
def compute_value( # type: ignore[override] | ||
cls, | ||
raw_value: Optional[Union[str, per_platform[str]]], | ||
address: Address, | ||
) -> Optional[Union[str, per_platform[str]]]: | ||
if isinstance(raw_value, per_platform): | ||
# NOTE: Ensure the values are homogeneous | ||
raw_value.check_types(str) | ||
|
||
return raw_value | ||
|
||
... | ||
|
||
@rule | ||
async def my_rule(..., platform: Platform) -> ...: | ||
field_value = target[MyFieldType].value | ||
|
||
if isinstance(field_value, per_platform): | ||
field_value = field_value.get_value_for_platform(platform) | ||
|
||
... | ||
``` | ||
|
||
NOTE: Support for this object should be heavily weighed, as it would be inappropriate to use in | ||
certain contexts (such as the `source` field in a `foo_source` target, where the intent is to | ||
support differing source files based on platform. The result would be that dependency inference | ||
(and therefore the dependencies field) wouldn't be knowable on the host, which is not something | ||
the engine can support yet). | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: python_artifact | ||
description: | | ||
Represents a Python setup.py-based project. | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`python_artifact`} signature={`(**kwargs) -> None`}> | ||
|
||
Represents a Python setup.py-based project. | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: scala_exclude | ||
description: | | ||
ScalaArtifactExclusion(group: 'str', artifact: 'str | None' = None, crossversion: 'str' = 'binary') | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`scala_exclude`} signature={`(group: 'str', artifact: 'str | None' = None, crossversion: 'str' = 'binary') -> None`}> | ||
|
||
ScalaArtifactExclusion(group: 'str', artifact: 'str | None' = None, crossversion: 'str' = 'binary') | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: setup_py | ||
description: | | ||
Represents a Python setup.py-based project. | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`setup_py`} signature={`(**kwargs) -> None`}> | ||
|
||
Represents a Python setup.py-based project. | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: shading_keep | ||
description: | | ||
JvmShadingKeepRule(pattern: 'str') | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`shading_keep`} signature={`(pattern: 'str') -> None`}> | ||
|
||
JvmShadingKeepRule(pattern: 'str') | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: shading_relocate | ||
description: | | ||
JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`shading_relocate`} signature={`(package: 'str', into: 'str | None' = None) -> None`}> | ||
|
||
JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: shading_rename | ||
description: | | ||
JvmShadingRenameRule(pattern: 'str', replacement: 'str') | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`shading_rename`} signature={`(pattern: 'str', replacement: 'str') -> None`}> | ||
|
||
JvmShadingRenameRule(pattern: 'str', replacement: 'str') | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: shading_zap | ||
description: | | ||
JvmShadingZapRule(pattern: 'str') | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`shading_zap`} signature={`(pattern: 'str') -> None`}> | ||
|
||
JvmShadingZapRule(pattern: 'str') | ||
|
||
</BuildFileSymbol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: stevedore_namespace | ||
description: | | ||
str(object='') -> str | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`stevedore_namespace`} signature={``}> | ||
|
||
str(object='') -> str | ||
str(bytes_or_buffer[, encoding[, errors]]) -> str | ||
|
||
Create a new string object from the given object. If encoding or | ||
errors is specified, then the object must expose a data buffer | ||
that will be decoded using the given encoding and error handler. | ||
Otherwise, returns the result of object.**str**() (if defined) | ||
or repr(object). | ||
encoding defaults to sys.getdefaultencoding(). | ||
errors defaults to 'strict'. | ||
|
||
</BuildFileSymbol> |
15 changes: 15 additions & 0 deletions
15
versioned_docs/version-2.16/reference/build-file-symbols/__defaults__.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: __defaults__ | ||
description: | | ||
Provide default field values. | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`__defaults__`} signature={`(*args: 'SetDefaultsT', ignore_unknown_fields: 'bool' = False, ignore_unknown_targets: 'bool' = False, **kwargs) -> 'None'`}> | ||
|
||
Provide default field values. | ||
|
||
Learn more https://www.pantsbuild.org/v2.16/docs/targets#field-default-values | ||
|
||
</BuildFileSymbol> |
13 changes: 13 additions & 0 deletions
13
...ioned_docs/version-2.16/reference/build-file-symbols/__dependencies_rules__.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: __dependencies_rules__ | ||
description: | | ||
Declare dependencies rules. | ||
--- | ||
|
||
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; | ||
|
||
<BuildFileSymbol name={`__dependencies_rules__`} signature={`(*args, **kwargs) -> 'None'`}> | ||
|
||
Declare dependencies rules. | ||
|
||
</BuildFileSymbol> |
Oops, something went wrong.