From 0420ce9da723867f6bccfc00c3f130486097ce70 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Fri, 31 May 2024 08:20:31 +1000 Subject: [PATCH] Add reference docs for BUILD file symbols (#216) This adds a new section to the reference docs: `/2.x/reference/build-file-symbols/`. This renders all the known non-target BUILD file symbols, as indicated by the `name_to_build_file_info` key of the `help-all` output JSON. This JSON looks like the following, and this generation basically just mashes it up into documentation form: ```json "name_to_build_file_info": { "PANTS_VERSION": { "documentation": null, "is_target": false, "name": "PANTS_VERSION", "signature": null }, "__defaults__": { "documentation": "Provide default field values.\n\nLearn more https://www.pantsbuild.org/2.22/docs/using-pants/key-concepts/targets-and-build-files#field-default-values", "is_target": false, "name": "__defaults__", "signature": "(*args: 'SetDefaultsT', ignore_unknown_fields: 'bool' = False, ignore_unknown_targets: 'bool' = False, **kwargs) -> 'None'" }, "__dependencies_rules__": { "documentation": "Declare dependencies rules.", "is_target": false, "name": "__dependencies_rules__", "signature": "(*args, **kwargs) -> 'None'" }, "__dependents_rules__": { "documentation": "Declare dependents rules.", "is_target": false, "name": "__dependents_rules__", "signature": "(*args, **kwargs) -> 'None'" }, "_generator_sources_helper": { "documentation": null, "is_target": true, "name": "_generator_sources_helper", "signature": "(**kwargs: 'Any') -> 'TargetAdaptor'" }, "_lockfile": { "documentation": null, "is_target": true, "name": "_lockfile", "signature": "(**kwargs: 'Any') -> 'TargetAdaptor'" }, ... ``` This is a new sidebar option: ![image](https://github.com/pantsbuild/pantsbuild.org/assets/1203825/e1e1a27c-9cc2-47e1-ac07-644a1c019ae8) Some of these have reasonable docs: ![image](https://github.com/pantsbuild/pantsbuild.org/assets/1203825/b453a0ad-055b-4ef9-b7b9-9528782f1d02) ![image](https://github.com/pantsbuild/pantsbuild.org/assets/1203825/3f11ca66-85a2-49cc-87f4-fe36ed75a960) Others do not have good docs: ![image](https://github.com/pantsbuild/pantsbuild.org/assets/1203825/83df063c-2a59-434c-8d8e-878d6b57ac3e) ![image](https://github.com/pantsbuild/pantsbuild.org/assets/1203825/121f3c2e-10a3-491c-b836-f9cad0256d31) ![image](https://github.com/pantsbuild/pantsbuild.org/assets/1203825/76a07178-de41-4022-b29c-56a6f04f191e) I think we should land this and then separately work to improve the documentation of each BUILD file symbol: - https://github.com/pantsbuild/pants/issues/20976 - https://github.com/pantsbuild/pants/issues/20977 - https://github.com/pantsbuild/pants/issues/20978 - https://github.com/pantsbuild/pants/issues/20979 - https://github.com/pantsbuild/pants/issues/20980 To make this work, there's two other changes required, which are done as separate commits: - support for back-tick code blocks, to avoid mangling them - explicit sidebar positions, so that `BUILD file symbols` is placed last, rather than before `Global options` (thus becoming the default) This generates back to the first version that include that (2.16) and involves some other changes to the code-genned docs, hence this is targeted `automation:sync-docs`. Fixes #212 --- .../build-file-symbols/PANTS_VERSION.mdx | 10 +++ .../build-file-symbols/__defaults__.mdx | 15 ++++ .../__dependencies_rules__.mdx | 13 ++++ .../__dependents_rules__.mdx | 13 ++++ .../build-file-symbols/_category_.json | 9 +++ .../build-file-symbols/build_file_dir.mdx | 17 +++++ .../build-file-symbols/duplicate_rule.mdx | 13 ++++ docs/reference/build-file-symbols/env.mdx | 13 ++++ .../build-file-symbols/http_source.mdx | 13 ++++ .../build-file-symbols/jvm_exclude.mdx | 13 ++++ .../build-file-symbols/node_build_script.mdx | 16 +++++ .../build-file-symbols/node_test_script.mdx | 16 +++++ .../build-file-symbols/parametrize.mdx | 16 +++++ .../build-file-symbols/per_platform.mdx | 52 ++++++++++++++ .../build-file-symbols/python_artifact.mdx | 13 ++++ .../build-file-symbols/scala_exclude.mdx | 13 ++++ .../reference/build-file-symbols/setup_py.mdx | 13 ++++ .../build-file-symbols/shading_keep.mdx | 13 ++++ .../build-file-symbols/shading_relocate.mdx | 13 ++++ .../build-file-symbols/shading_rename.mdx | 13 ++++ .../build-file-symbols/shading_zap.mdx | 13 ++++ .../stevedore_namespace.mdx | 22 ++++++ docs/reference/global-options.mdx | 1 + docs/reference/goals/_category_.json | 3 +- docs/reference/subsystems/_category_.json | 3 +- docs/reference/targets/_category_.json | 3 +- .../build_file_symbol.mdx.mustache | 13 ++++ reference_codegen/generate.mjs | 70 +++++++++++++++++-- reference_codegen/subsystem.mdx.mustache | 1 + src/components/reference/BuildFileSymbol.jsx | 12 ++++ .../version-2.0/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.1/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.10/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/subsystems/flake8.mdx | 8 +-- .../reference/subsystems/regex-lint.mdx | 52 +++++++------- .../subsystems/sourcefile-validation.mdx | 52 +++++++------- .../reference/targets/_category_.json | 3 +- .../version-2.10/reference/targets/files.mdx | 14 ++-- .../reference/targets/pex_binaries.mdx | 14 ++-- .../reference/targets/pipenv_requirements.mdx | 14 ++-- .../reference/targets/poetry_requirements.mdx | 14 ++-- .../reference/targets/protobuf_sources.mdx | 14 ++-- .../reference/targets/python_requirements.mdx | 14 ++-- .../reference/targets/python_sources.mdx | 14 ++-- .../reference/targets/python_test_utils.mdx | 14 ++-- .../reference/targets/python_tests.mdx | 14 ++-- .../reference/targets/resources.mdx | 14 ++-- .../reference/targets/shell_sources.mdx | 14 ++-- .../reference/targets/shunit2_tests.mdx | 14 ++-- .../reference/targets/thrift_sources.mdx | 12 ++-- .../version-2.11/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/subsystems/flake8.mdx | 8 +-- .../reference/subsystems/regex-lint.mdx | 48 ++++++------- .../reference/targets/_category_.json | 3 +- .../version-2.11/reference/targets/files.mdx | 14 ++-- .../reference/targets/pex_binaries.mdx | 14 ++-- .../reference/targets/pipenv_requirements.mdx | 14 ++-- .../reference/targets/poetry_requirements.mdx | 14 ++-- .../reference/targets/protobuf_sources.mdx | 14 ++-- .../reference/targets/python_requirements.mdx | 14 ++-- .../reference/targets/python_sources.mdx | 14 ++-- .../reference/targets/python_test_utils.mdx | 14 ++-- .../reference/targets/python_tests.mdx | 14 ++-- .../reference/targets/resources.mdx | 14 ++-- .../reference/targets/shell_sources.mdx | 14 ++-- .../reference/targets/shunit2_tests.mdx | 14 ++-- .../reference/targets/thrift_sources.mdx | 12 ++-- .../version-2.12/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.12/reference/targets/files.mdx | 14 ++-- .../reference/targets/protobuf_sources.mdx | 14 ++-- .../reference/targets/python_sources.mdx | 14 ++-- .../reference/targets/python_test_utils.mdx | 14 ++-- .../reference/targets/python_tests.mdx | 14 ++-- .../reference/targets/resources.mdx | 14 ++-- .../reference/targets/shell_sources.mdx | 14 ++-- .../reference/targets/shunit2_tests.mdx | 14 ++-- .../reference/targets/thrift_sources.mdx | 12 ++-- .../version-2.13/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.14/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.15/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../build-file-symbols/__defaults__.mdx | 15 ++++ .../__dependencies_rules__.mdx | 13 ++++ .../__dependents_rules__.mdx | 13 ++++ .../build-file-symbols/_category_.json | 9 +++ .../build-file-symbols/build_file_dir.mdx | 17 +++++ .../build-file-symbols/duplicate_rule.mdx | 13 ++++ .../reference/build-file-symbols/env.mdx | 13 ++++ .../build-file-symbols/http_source.mdx | 13 ++++ .../build-file-symbols/parametrize.mdx | 16 +++++ .../build-file-symbols/per_platform.mdx | 52 ++++++++++++++ .../build-file-symbols/python_artifact.mdx | 13 ++++ .../reference/build-file-symbols/setup_py.mdx | 13 ++++ .../build-file-symbols/shading_keep.mdx | 13 ++++ .../build-file-symbols/shading_relocate.mdx | 13 ++++ .../build-file-symbols/shading_rename.mdx | 13 ++++ .../build-file-symbols/shading_zap.mdx | 13 ++++ .../stevedore_namespace.mdx | 22 ++++++ .../version-2.16/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../build-file-symbols/PANTS_VERSION.mdx | 10 +++ .../build-file-symbols/__defaults__.mdx | 15 ++++ .../__dependencies_rules__.mdx | 13 ++++ .../__dependents_rules__.mdx | 13 ++++ .../build-file-symbols/_category_.json | 9 +++ .../build-file-symbols/build_file_dir.mdx | 17 +++++ .../build-file-symbols/duplicate_rule.mdx | 13 ++++ .../reference/build-file-symbols/env.mdx | 13 ++++ .../build-file-symbols/http_source.mdx | 13 ++++ .../build-file-symbols/parametrize.mdx | 16 +++++ .../build-file-symbols/per_platform.mdx | 52 ++++++++++++++ .../build-file-symbols/python_artifact.mdx | 13 ++++ .../reference/build-file-symbols/setup_py.mdx | 13 ++++ .../build-file-symbols/shading_keep.mdx | 13 ++++ .../build-file-symbols/shading_relocate.mdx | 13 ++++ .../build-file-symbols/shading_rename.mdx | 13 ++++ .../build-file-symbols/shading_zap.mdx | 13 ++++ .../stevedore_namespace.mdx | 22 ++++++ .../version-2.17/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../build-file-symbols/PANTS_VERSION.mdx | 10 +++ .../build-file-symbols/__defaults__.mdx | 15 ++++ .../__dependencies_rules__.mdx | 13 ++++ .../__dependents_rules__.mdx | 13 ++++ .../build-file-symbols/_category_.json | 9 +++ .../build-file-symbols/build_file_dir.mdx | 17 +++++ .../build-file-symbols/duplicate_rule.mdx | 13 ++++ .../reference/build-file-symbols/env.mdx | 13 ++++ .../build-file-symbols/http_source.mdx | 13 ++++ .../build-file-symbols/jvm_exclude.mdx | 13 ++++ .../build-file-symbols/node_build_script.mdx | 16 +++++ .../build-file-symbols/node_test_script.mdx | 16 +++++ .../build-file-symbols/parametrize.mdx | 16 +++++ .../build-file-symbols/per_platform.mdx | 52 ++++++++++++++ .../build-file-symbols/python_artifact.mdx | 13 ++++ .../build-file-symbols/scala_exclude.mdx | 13 ++++ .../reference/build-file-symbols/setup_py.mdx | 13 ++++ .../build-file-symbols/shading_keep.mdx | 13 ++++ .../build-file-symbols/shading_relocate.mdx | 13 ++++ .../build-file-symbols/shading_rename.mdx | 13 ++++ .../build-file-symbols/shading_zap.mdx | 13 ++++ .../stevedore_namespace.mdx | 22 ++++++ .../version-2.18/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../build-file-symbols/PANTS_VERSION.mdx | 10 +++ .../build-file-symbols/__defaults__.mdx | 15 ++++ .../__dependencies_rules__.mdx | 13 ++++ .../__dependents_rules__.mdx | 13 ++++ .../build-file-symbols/_category_.json | 9 +++ .../build-file-symbols/build_file_dir.mdx | 17 +++++ .../build-file-symbols/duplicate_rule.mdx | 13 ++++ .../reference/build-file-symbols/env.mdx | 13 ++++ .../build-file-symbols/http_source.mdx | 13 ++++ .../build-file-symbols/jvm_exclude.mdx | 13 ++++ .../build-file-symbols/node_build_script.mdx | 16 +++++ .../build-file-symbols/node_test_script.mdx | 16 +++++ .../build-file-symbols/parametrize.mdx | 16 +++++ .../build-file-symbols/per_platform.mdx | 52 ++++++++++++++ .../build-file-symbols/python_artifact.mdx | 13 ++++ .../build-file-symbols/scala_exclude.mdx | 13 ++++ .../reference/build-file-symbols/setup_py.mdx | 13 ++++ .../build-file-symbols/shading_keep.mdx | 13 ++++ .../build-file-symbols/shading_relocate.mdx | 13 ++++ .../build-file-symbols/shading_rename.mdx | 13 ++++ .../build-file-symbols/shading_zap.mdx | 13 ++++ .../stevedore_namespace.mdx | 22 ++++++ .../version-2.19/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.2/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../build-file-symbols/PANTS_VERSION.mdx | 10 +++ .../build-file-symbols/__defaults__.mdx | 15 ++++ .../__dependencies_rules__.mdx | 13 ++++ .../__dependents_rules__.mdx | 13 ++++ .../build-file-symbols/_category_.json | 9 +++ .../build-file-symbols/build_file_dir.mdx | 17 +++++ .../build-file-symbols/duplicate_rule.mdx | 13 ++++ .../reference/build-file-symbols/env.mdx | 13 ++++ .../build-file-symbols/http_source.mdx | 13 ++++ .../build-file-symbols/jvm_exclude.mdx | 13 ++++ .../build-file-symbols/node_build_script.mdx | 16 +++++ .../build-file-symbols/node_test_script.mdx | 16 +++++ .../build-file-symbols/parametrize.mdx | 16 +++++ .../build-file-symbols/per_platform.mdx | 52 ++++++++++++++ .../build-file-symbols/python_artifact.mdx | 13 ++++ .../build-file-symbols/scala_exclude.mdx | 13 ++++ .../reference/build-file-symbols/setup_py.mdx | 13 ++++ .../build-file-symbols/shading_keep.mdx | 13 ++++ .../build-file-symbols/shading_relocate.mdx | 13 ++++ .../build-file-symbols/shading_rename.mdx | 13 ++++ .../build-file-symbols/shading_zap.mdx | 13 ++++ .../stevedore_namespace.mdx | 22 ++++++ .../version-2.20/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../build-file-symbols/PANTS_VERSION.mdx | 10 +++ .../build-file-symbols/__defaults__.mdx | 15 ++++ .../__dependencies_rules__.mdx | 13 ++++ .../__dependents_rules__.mdx | 13 ++++ .../build-file-symbols/_category_.json | 9 +++ .../build-file-symbols/build_file_dir.mdx | 17 +++++ .../build-file-symbols/duplicate_rule.mdx | 13 ++++ .../reference/build-file-symbols/env.mdx | 13 ++++ .../build-file-symbols/http_source.mdx | 13 ++++ .../build-file-symbols/jvm_exclude.mdx | 13 ++++ .../build-file-symbols/node_build_script.mdx | 16 +++++ .../build-file-symbols/node_test_script.mdx | 16 +++++ .../build-file-symbols/parametrize.mdx | 16 +++++ .../build-file-symbols/per_platform.mdx | 52 ++++++++++++++ .../build-file-symbols/python_artifact.mdx | 13 ++++ .../build-file-symbols/scala_exclude.mdx | 13 ++++ .../reference/build-file-symbols/setup_py.mdx | 13 ++++ .../build-file-symbols/shading_keep.mdx | 13 ++++ .../build-file-symbols/shading_relocate.mdx | 13 ++++ .../build-file-symbols/shading_rename.mdx | 13 ++++ .../build-file-symbols/shading_zap.mdx | 13 ++++ .../stevedore_namespace.mdx | 22 ++++++ .../version-2.21/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.3/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.4/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.5/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.6/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.7/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.8/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.8/reference/targets/files.mdx | 14 ++-- .../reference/targets/protobuf_sources.mdx | 14 ++-- .../reference/targets/python_sources.mdx | 14 ++-- .../reference/targets/python_test_utils.mdx | 14 ++-- .../reference/targets/python_tests.mdx | 14 ++-- .../reference/targets/resources.mdx | 14 ++-- .../reference/targets/shell_sources.mdx | 14 ++-- .../reference/targets/shunit2_tests.mdx | 14 ++-- .../version-2.9/reference/global-options.mdx | 1 + .../reference/goals/_category_.json | 3 +- .../reference/subsystems/_category_.json | 3 +- .../reference/targets/_category_.json | 3 +- .../version-2.9/reference/targets/files.mdx | 14 ++-- .../reference/targets/protobuf_sources.mdx | 14 ++-- .../reference/targets/python_sources.mdx | 14 ++-- .../reference/targets/python_test_utils.mdx | 14 ++-- .../reference/targets/python_tests.mdx | 14 ++-- .../reference/targets/resources.mdx | 14 ++-- .../reference/targets/shell_sources.mdx | 14 ++-- .../reference/targets/shunit2_tests.mdx | 14 ++-- 297 files changed, 2959 insertions(+), 511 deletions(-) create mode 100644 docs/reference/build-file-symbols/PANTS_VERSION.mdx create mode 100644 docs/reference/build-file-symbols/__defaults__.mdx create mode 100644 docs/reference/build-file-symbols/__dependencies_rules__.mdx create mode 100644 docs/reference/build-file-symbols/__dependents_rules__.mdx create mode 100644 docs/reference/build-file-symbols/_category_.json create mode 100644 docs/reference/build-file-symbols/build_file_dir.mdx create mode 100644 docs/reference/build-file-symbols/duplicate_rule.mdx create mode 100644 docs/reference/build-file-symbols/env.mdx create mode 100644 docs/reference/build-file-symbols/http_source.mdx create mode 100644 docs/reference/build-file-symbols/jvm_exclude.mdx create mode 100644 docs/reference/build-file-symbols/node_build_script.mdx create mode 100644 docs/reference/build-file-symbols/node_test_script.mdx create mode 100644 docs/reference/build-file-symbols/parametrize.mdx create mode 100644 docs/reference/build-file-symbols/per_platform.mdx create mode 100644 docs/reference/build-file-symbols/python_artifact.mdx create mode 100644 docs/reference/build-file-symbols/scala_exclude.mdx create mode 100644 docs/reference/build-file-symbols/setup_py.mdx create mode 100644 docs/reference/build-file-symbols/shading_keep.mdx create mode 100644 docs/reference/build-file-symbols/shading_relocate.mdx create mode 100644 docs/reference/build-file-symbols/shading_rename.mdx create mode 100644 docs/reference/build-file-symbols/shading_zap.mdx create mode 100644 docs/reference/build-file-symbols/stevedore_namespace.mdx create mode 100644 reference_codegen/build_file_symbol.mdx.mustache create mode 100644 src/components/reference/BuildFileSymbol.jsx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/__defaults__.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/__dependencies_rules__.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/__dependents_rules__.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/_category_.json create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/build_file_dir.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/duplicate_rule.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/env.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/http_source.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/parametrize.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/per_platform.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/python_artifact.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/setup_py.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/shading_keep.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/shading_relocate.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/shading_rename.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/shading_zap.mdx create mode 100644 versioned_docs/version-2.16/reference/build-file-symbols/stevedore_namespace.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/PANTS_VERSION.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/__defaults__.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/__dependencies_rules__.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/__dependents_rules__.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/_category_.json create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/build_file_dir.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/duplicate_rule.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/env.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/http_source.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/parametrize.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/per_platform.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/python_artifact.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/setup_py.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/shading_keep.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/shading_relocate.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/shading_rename.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/shading_zap.mdx create mode 100644 versioned_docs/version-2.17/reference/build-file-symbols/stevedore_namespace.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/PANTS_VERSION.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/__defaults__.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/__dependencies_rules__.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/__dependents_rules__.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/_category_.json create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/build_file_dir.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/duplicate_rule.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/env.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/http_source.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/jvm_exclude.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/node_build_script.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/node_test_script.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/parametrize.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/per_platform.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/python_artifact.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/scala_exclude.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/setup_py.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/shading_keep.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/shading_relocate.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/shading_rename.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/shading_zap.mdx create mode 100644 versioned_docs/version-2.18/reference/build-file-symbols/stevedore_namespace.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/PANTS_VERSION.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/__defaults__.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/__dependencies_rules__.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/__dependents_rules__.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/_category_.json create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/build_file_dir.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/duplicate_rule.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/env.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/http_source.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/jvm_exclude.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/node_build_script.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/node_test_script.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/parametrize.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/per_platform.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/python_artifact.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/scala_exclude.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/setup_py.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/shading_keep.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/shading_relocate.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/shading_rename.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/shading_zap.mdx create mode 100644 versioned_docs/version-2.19/reference/build-file-symbols/stevedore_namespace.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/PANTS_VERSION.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/__defaults__.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/__dependencies_rules__.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/__dependents_rules__.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/_category_.json create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/build_file_dir.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/duplicate_rule.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/env.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/http_source.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/jvm_exclude.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/node_build_script.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/node_test_script.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/parametrize.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/per_platform.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/python_artifact.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/scala_exclude.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/setup_py.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/shading_keep.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/shading_relocate.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/shading_rename.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/shading_zap.mdx create mode 100644 versioned_docs/version-2.20/reference/build-file-symbols/stevedore_namespace.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/PANTS_VERSION.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/__defaults__.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/__dependencies_rules__.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/__dependents_rules__.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/_category_.json create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/build_file_dir.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/duplicate_rule.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/env.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/http_source.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/jvm_exclude.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/node_build_script.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/node_test_script.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/parametrize.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/per_platform.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/python_artifact.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/scala_exclude.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/setup_py.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/shading_keep.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/shading_relocate.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/shading_rename.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/shading_zap.mdx create mode 100644 versioned_docs/version-2.21/reference/build-file-symbols/stevedore_namespace.mdx diff --git a/docs/reference/build-file-symbols/PANTS_VERSION.mdx b/docs/reference/build-file-symbols/PANTS_VERSION.mdx new file mode 100644 index 000000000..0880ae866 --- /dev/null +++ b/docs/reference/build-file-symbols/PANTS_VERSION.mdx @@ -0,0 +1,10 @@ +--- +title: PANTS_VERSION +description: | +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + + + diff --git a/docs/reference/build-file-symbols/__defaults__.mdx b/docs/reference/build-file-symbols/__defaults__.mdx new file mode 100644 index 000000000..2a57b3f24 --- /dev/null +++ b/docs/reference/build-file-symbols/__defaults__.mdx @@ -0,0 +1,15 @@ +--- +title: __defaults__ +description: | + Provide default field values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + '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 + + diff --git a/docs/reference/build-file-symbols/__dependencies_rules__.mdx b/docs/reference/build-file-symbols/__dependencies_rules__.mdx new file mode 100644 index 000000000..3d3366087 --- /dev/null +++ b/docs/reference/build-file-symbols/__dependencies_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependencies_rules__ +description: | + Declare dependencies rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependencies rules. + + diff --git a/docs/reference/build-file-symbols/__dependents_rules__.mdx b/docs/reference/build-file-symbols/__dependents_rules__.mdx new file mode 100644 index 000000000..a50a19e57 --- /dev/null +++ b/docs/reference/build-file-symbols/__dependents_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependents_rules__ +description: | + Declare dependents rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependents rules. + + diff --git a/docs/reference/build-file-symbols/_category_.json b/docs/reference/build-file-symbols/_category_.json new file mode 100644 index 000000000..19a1c84c2 --- /dev/null +++ b/docs/reference/build-file-symbols/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "BUILD file symbols", + "link": { + "type": "generated-index", + "slug": "/reference/build-file-symbols", + "title": "BUILD file symbols" + }, + "position": 5 +} diff --git a/docs/reference/build-file-symbols/build_file_dir.mdx b/docs/reference/build-file-symbols/build_file_dir.mdx new file mode 100644 index 000000000..34cd3100d --- /dev/null +++ b/docs/reference/build-file-symbols/build_file_dir.mdx @@ -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"; + + '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 + + diff --git a/docs/reference/build-file-symbols/duplicate_rule.mdx b/docs/reference/build-file-symbols/duplicate_rule.mdx new file mode 100644 index 000000000..6b0781673 --- /dev/null +++ b/docs/reference/build-file-symbols/duplicate_rule.mdx @@ -0,0 +1,13 @@ +--- +title: duplicate_rule +description: | + DeployJarDuplicateRule(pattern: 'str', action: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +DeployJarDuplicateRule(pattern: 'str', action: 'str') + + diff --git a/docs/reference/build-file-symbols/env.mdx b/docs/reference/build-file-symbols/env.mdx new file mode 100644 index 000000000..7d514bca9 --- /dev/null +++ b/docs/reference/build-file-symbols/env.mdx @@ -0,0 +1,13 @@ +--- +title: env +description: | + Reference environment variable. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'Any'`}> + +Reference environment variable. + + diff --git a/docs/reference/build-file-symbols/http_source.mdx b/docs/reference/build-file-symbols/http_source.mdx new file mode 100644 index 000000000..eb507ce46 --- /dev/null +++ b/docs/reference/build-file-symbols/http_source.mdx @@ -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"; + + + +http_source(url: 'str', \*, len: 'int', sha256: 'str', filename: 'str' = '') + + diff --git a/docs/reference/build-file-symbols/jvm_exclude.mdx b/docs/reference/build-file-symbols/jvm_exclude.mdx new file mode 100644 index 000000000..527ad1e71 --- /dev/null +++ b/docs/reference/build-file-symbols/jvm_exclude.mdx @@ -0,0 +1,13 @@ +--- +title: jvm_exclude +description: | + JvmArtifactExclusion(group: 'str', artifact: 'str | None' = None) +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmArtifactExclusion(group: 'str', artifact: 'str | None' = None) + + diff --git a/docs/reference/build-file-symbols/node_build_script.mdx b/docs/reference/build-file-symbols/node_build_script.mdx new file mode 100644 index 000000000..7d4315453 --- /dev/null +++ b/docs/reference/build-file-symbols/node_build_script.mdx @@ -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"; + + '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. + + diff --git a/docs/reference/build-file-symbols/node_test_script.mdx b/docs/reference/build-file-symbols/node_test_script.mdx new file mode 100644 index 000000000..5bb248c5c --- /dev/null +++ b/docs/reference/build-file-symbols/node_test_script.mdx @@ -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"; + + '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. + + diff --git a/docs/reference/build-file-symbols/parametrize.mdx b/docs/reference/build-file-symbols/parametrize.mdx new file mode 100644 index 000000000..04bd19c56 --- /dev/null +++ b/docs/reference/build-file-symbols/parametrize.mdx @@ -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"; + + '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. + + diff --git a/docs/reference/build-file-symbols/per_platform.mdx b/docs/reference/build-file-symbols/per_platform.mdx new file mode 100644 index 000000000..eb9a06c1d --- /dev/null +++ b/docs/reference/build-file-symbols/per_platform.mdx @@ -0,0 +1,52 @@ +--- +title: per_platform +description: | + An object containing differing homogeneous platform-dependent values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 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). + + diff --git a/docs/reference/build-file-symbols/python_artifact.mdx b/docs/reference/build-file-symbols/python_artifact.mdx new file mode 100644 index 000000000..b99bfee25 --- /dev/null +++ b/docs/reference/build-file-symbols/python_artifact.mdx @@ -0,0 +1,13 @@ +--- +title: python_artifact +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/docs/reference/build-file-symbols/scala_exclude.mdx b/docs/reference/build-file-symbols/scala_exclude.mdx new file mode 100644 index 000000000..94890d053 --- /dev/null +++ b/docs/reference/build-file-symbols/scala_exclude.mdx @@ -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"; + + None`}> + +ScalaArtifactExclusion(group: 'str', artifact: 'str | None' = None, crossversion: 'str' = 'binary') + + diff --git a/docs/reference/build-file-symbols/setup_py.mdx b/docs/reference/build-file-symbols/setup_py.mdx new file mode 100644 index 000000000..6b4382b30 --- /dev/null +++ b/docs/reference/build-file-symbols/setup_py.mdx @@ -0,0 +1,13 @@ +--- +title: setup_py +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/docs/reference/build-file-symbols/shading_keep.mdx b/docs/reference/build-file-symbols/shading_keep.mdx new file mode 100644 index 000000000..64ae53ec6 --- /dev/null +++ b/docs/reference/build-file-symbols/shading_keep.mdx @@ -0,0 +1,13 @@ +--- +title: shading_keep +description: | + JvmShadingKeepRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingKeepRule(pattern: 'str') + + diff --git a/docs/reference/build-file-symbols/shading_relocate.mdx b/docs/reference/build-file-symbols/shading_relocate.mdx new file mode 100644 index 000000000..104c8b7dd --- /dev/null +++ b/docs/reference/build-file-symbols/shading_relocate.mdx @@ -0,0 +1,13 @@ +--- +title: shading_relocate +description: | + JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) + + diff --git a/docs/reference/build-file-symbols/shading_rename.mdx b/docs/reference/build-file-symbols/shading_rename.mdx new file mode 100644 index 000000000..ca1128dc1 --- /dev/null +++ b/docs/reference/build-file-symbols/shading_rename.mdx @@ -0,0 +1,13 @@ +--- +title: shading_rename +description: | + JvmShadingRenameRule(pattern: 'str', replacement: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRenameRule(pattern: 'str', replacement: 'str') + + diff --git a/docs/reference/build-file-symbols/shading_zap.mdx b/docs/reference/build-file-symbols/shading_zap.mdx new file mode 100644 index 000000000..553179c3b --- /dev/null +++ b/docs/reference/build-file-symbols/shading_zap.mdx @@ -0,0 +1,13 @@ +--- +title: shading_zap +description: | + JvmShadingZapRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingZapRule(pattern: 'str') + + diff --git a/docs/reference/build-file-symbols/stevedore_namespace.mdx b/docs/reference/build-file-symbols/stevedore_namespace.mdx new file mode 100644 index 000000000..54f3d5a2f --- /dev/null +++ b/docs/reference/build-file-symbols/stevedore_namespace.mdx @@ -0,0 +1,22 @@ +--- +title: stevedore_namespace +description: | + str(object='') -> str +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + + +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'. + + diff --git a/docs/reference/global-options.mdx b/docs/reference/global-options.mdx index 091682394..8e24c5f4d 100644 --- a/docs/reference/global-options.mdx +++ b/docs/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/docs/reference/goals/_category_.json b/docs/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/docs/reference/goals/_category_.json +++ b/docs/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/docs/reference/subsystems/_category_.json b/docs/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/docs/reference/subsystems/_category_.json +++ b/docs/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/docs/reference/targets/_category_.json b/docs/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/docs/reference/targets/_category_.json +++ b/docs/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/reference_codegen/build_file_symbol.mdx.mustache b/reference_codegen/build_file_symbol.mdx.mustache new file mode 100644 index 000000000..73752b43e --- /dev/null +++ b/reference_codegen/build_file_symbol.mdx.mustache @@ -0,0 +1,13 @@ +--- +title: {{ name }} +description: | + {{{short_documentation}}} +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol" + + + +{{{ documentation }}} + + diff --git a/reference_codegen/generate.mjs b/reference_codegen/generate.mjs index 3a80d073e..3aef70d43 100644 --- a/reference_codegen/generate.mjs +++ b/reference_codegen/generate.mjs @@ -49,6 +49,10 @@ const fieldTemplate = fs.readFileSync( "reference_codegen/field.mdx.mustache", "utf8" ); +const buildFileSymbolTemplate = fs.readFileSync( + "reference_codegen/build_file_symbol.mdx.mustache", + "utf8" +); function renderSubsystemTemplate(view, helpAll) { view.related_subsystems = ( @@ -66,6 +70,10 @@ function renderTargetTemplate(view) { return Mustache.render(targetTemplate, view, { field: fieldTemplate }); } +function renderBuildFileSymbolTemplate(view) { + return Mustache.render(buildFileSymbolTemplate, view); +} + function convertDefault(val, type) { if (val === true) return "True"; if (val === false) return "False"; @@ -102,6 +110,19 @@ function unescape(val) { .replaceAll("}", "}"); } +function backtickStartingLineToIgnore(line) { + // There's a few places with weird syntax that intefere with our naive line-by-line processing + // of the markdown, so, for now, we just hard-code them to keep things working. + // + // Using a proper markdown parser would help solve this. + return [ + // `helm_deployment` target, `values` field + "``` helm_deployment(", + // `deploy_jar` target, `duplicate_policy` field + "``` duplicate_policy=[", + ].includes(line); +} + function convertDescription(val) { const lines = []; let tabbedBlock = false; @@ -136,8 +157,16 @@ function convertDescription(val) { tabbedBlock = false; } } - // We're _not_ in a tabbed block - else { + // If we're starting or ending a backticked block + else if (line.startsWith("```") && !backtickStartingLineToIgnore(line)) { + // The line is fine as is, but we need to toggle in or out of the backticks + lines.push(line); + backtickedBlock = !backtickedBlock; + // If we're in a backticked block + } else if (backtickedBlock) { + lines.push(line); + // No code block at all + } else { // HTML escape the line, but unescape anything in backticks lines.push( escape(line).replace(/`(.+?)`/g, (match, p1) => `\`${unescape(p1)}\``) @@ -286,7 +315,7 @@ Object.entries(helpAll.name_to_target_type_info).forEach(([name, info]) => { }); }); -["goals", "subsystems", "targets"].forEach((name) => +["goals", "subsystems", "targets", "build-file-symbols"].forEach((name) => ensureEmptyDirectory(name) ); @@ -295,7 +324,10 @@ await Promise.all([ writeFile( "global-options.mdx", renderSubsystemTemplate( - helpAll["scope_to_help_info"][globalScopeInternal], + { + ...helpAll["scope_to_help_info"][globalScopeInternal], + sidebar_position: 1, + }, helpAll ) ), @@ -322,6 +354,20 @@ await Promise.all([ ); } ), + // BUILD file symbols (NB. targets are also included, so need to be explicitly removed). + helpAll.name_to_build_file_info && + Object.values(helpAll.name_to_build_file_info).map(async (info) => { + if (info.is_target) return; + + info.short_documentation = info.documentation?.split("\n")?.[0]; + info.documentation = + info.documentation && convertDescription(info.documentation); + + await writeFile( + path.join("build-file-symbols", `${info.name}.mdx`), + renderBuildFileSymbolTemplate(info) + ); + }), // `_category_.json` files writeFile( "goals/_category_.json", @@ -332,6 +378,7 @@ await Promise.all([ slug: "/reference/goals", title: "Goals", }, + position: 2, }) ), writeFile( @@ -343,6 +390,7 @@ await Promise.all([ slug: "/reference/subsystems", title: "Subsystems", }, + position: 3, }) ), writeFile( @@ -354,6 +402,20 @@ await Promise.all([ slug: "/reference/targets", title: "Targets", }, + position: 4, }) ), + helpAll.name_to_build_file_info && + writeFile( + "build-file-symbols/_category_.json", + JSON.stringify({ + label: "BUILD file symbols", + link: { + type: "generated-index", + slug: "/reference/build-file-symbols", + title: "BUILD file symbols", + }, + position: 5, + }) + ), ]); diff --git a/reference_codegen/subsystem.mdx.mustache b/reference_codegen/subsystem.mdx.mustache index 80a11b54d..c023ddb22 100644 --- a/reference_codegen/subsystem.mdx.mustache +++ b/reference_codegen/subsystem.mdx.mustache @@ -2,6 +2,7 @@ title: {{#scope}}{{scope}}{{/scope}}{{^scope}}Global options{{/scope}} description: | {{{short_description}}} +{{#sidebar_position}}sidebar_position: {{sidebar_position}}{{/sidebar_position}} --- import Option from "@site/src/components/reference/Option"; diff --git a/src/components/reference/BuildFileSymbol.jsx b/src/components/reference/BuildFileSymbol.jsx new file mode 100644 index 000000000..be100d5de --- /dev/null +++ b/src/components/reference/BuildFileSymbol.jsx @@ -0,0 +1,12 @@ +import CodeBlock from "@theme/CodeBlock"; +export default function BuildFileSymbol({ name, signature, children }) { + return ( +
+ + {/* if there's no signature, the BUILD file symbol is just a constant... but we don't currently have any info about what that constant is */} + {signature ? `def ${name}${signature}: ...` : `${name} = ...`} + + {children} +
+ ); +} diff --git a/versioned_docs/version-2.0/reference/global-options.mdx b/versioned_docs/version-2.0/reference/global-options.mdx index 0f9217d00..159c948ff 100644 --- a/versioned_docs/version-2.0/reference/global-options.mdx +++ b/versioned_docs/version-2.0/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.0/reference/goals/_category_.json b/versioned_docs/version-2.0/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.0/reference/goals/_category_.json +++ b/versioned_docs/version-2.0/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.0/reference/subsystems/_category_.json b/versioned_docs/version-2.0/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.0/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.0/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.0/reference/targets/_category_.json b/versioned_docs/version-2.0/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.0/reference/targets/_category_.json +++ b/versioned_docs/version-2.0/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.1/reference/global-options.mdx b/versioned_docs/version-2.1/reference/global-options.mdx index 052f2a04f..6120812a5 100644 --- a/versioned_docs/version-2.1/reference/global-options.mdx +++ b/versioned_docs/version-2.1/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.1/reference/goals/_category_.json b/versioned_docs/version-2.1/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.1/reference/goals/_category_.json +++ b/versioned_docs/version-2.1/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.1/reference/subsystems/_category_.json b/versioned_docs/version-2.1/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.1/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.1/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.1/reference/targets/_category_.json b/versioned_docs/version-2.1/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.1/reference/targets/_category_.json +++ b/versioned_docs/version-2.1/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.10/reference/global-options.mdx b/versioned_docs/version-2.10/reference/global-options.mdx index ec62a27bb..d7d62260a 100644 --- a/versioned_docs/version-2.10/reference/global-options.mdx +++ b/versioned_docs/version-2.10/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.10/reference/goals/_category_.json b/versioned_docs/version-2.10/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.10/reference/goals/_category_.json +++ b/versioned_docs/version-2.10/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.10/reference/subsystems/_category_.json b/versioned_docs/version-2.10/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.10/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.10/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.10/reference/subsystems/flake8.mdx b/versioned_docs/version-2.10/reference/subsystems/flake8.mdx index 653aea2b2..08597081f 100644 --- a/versioned_docs/version-2.10/reference/subsystems/flake8.mdx +++ b/versioned_docs/version-2.10/reference/subsystems/flake8.mdx @@ -173,11 +173,11 @@ You must set the plugin's parent directory as a source root. For example, i You must also set `[flake8:local-plugins]` in your Flake8 config file. For example: -``` +``` [flake8:local-plugins] -extension = -CUSTOMCODE = custom_plugin:MyChecker -``` + extension = + CUSTOMCODE = custom_plugin:MyChecker +``` While your plugin's code can depend on other first-party code and third-party requirements, all first-party dependencies of the plugin must live in the same directory or a subdirectory. diff --git a/versioned_docs/version-2.10/reference/subsystems/regex-lint.mdx b/versioned_docs/version-2.10/reference/subsystems/regex-lint.mdx index 175d51622..4300578ca 100644 --- a/versioned_docs/version-2.10/reference/subsystems/regex-lint.mdx +++ b/versioned_docs/version-2.10/reference/subsystems/regex-lint.mdx @@ -37,32 +37,32 @@ key2 = val2 Config schema is as follows: -``` -{ -'required_matches': { -'path_pattern1': [content_pattern1, content_pattern2], -'path_pattern2': [content_pattern1, content_pattern3], -... -}, -'path_patterns': [ -{ -'name': path_pattern1', -'pattern': <path regex pattern>, -'inverted': True|False (defaults to False), -'content_encoding': <encoding> (defaults to utf8) -}, -... -], -'content_patterns': [ -{ -'name': 'content_pattern1', -'pattern': <content regex pattern>, -'inverted': True|False (defaults to False) -} -... -] -} -``` +``` +{ + 'required_matches': { + 'path_pattern1': [content_pattern1, content_pattern2], + 'path_pattern2': [content_pattern1, content_pattern3], + ... + }, + 'path_patterns': [ + { + 'name': path_pattern1', + 'pattern': , + 'inverted': True|False (defaults to False), + 'content_encoding': (defaults to utf8) + }, + ... + ], + 'content_patterns': [ + { + 'name': 'content_pattern1', + 'pattern': , + 'inverted': True|False (defaults to False) + } + ... + ] +} +``` Meaning: if a file matches some path pattern, its content must match all the corresponding content patterns. diff --git a/versioned_docs/version-2.10/reference/subsystems/sourcefile-validation.mdx b/versioned_docs/version-2.10/reference/subsystems/sourcefile-validation.mdx index ea303b42f..08775b9fb 100644 --- a/versioned_docs/version-2.10/reference/subsystems/sourcefile-validation.mdx +++ b/versioned_docs/version-2.10/reference/subsystems/sourcefile-validation.mdx @@ -37,32 +37,32 @@ key2 = val2 Config schema is as follows: -``` -{ -'required_matches': { -'path_pattern1': [content_pattern1, content_pattern2], -'path_pattern2': [content_pattern1, content_pattern3], -... -}, -'path_patterns': [ -{ -'name': path_pattern1', -'pattern': <path regex pattern>, -'inverted': True|False (defaults to False), -'content_encoding': <encoding> (defaults to utf8) -}, -... -], -'content_patterns': [ -{ -'name': 'content_pattern1', -'pattern': <content regex pattern>, -'inverted': True|False (defaults to False) -} -... -] -} -``` +``` +{ + 'required_matches': { + 'path_pattern1': [content_pattern1, content_pattern2], + 'path_pattern2': [content_pattern1, content_pattern3], + ... + }, + 'path_patterns': [ + { + 'name': path_pattern1', + 'pattern': , + 'inverted': True|False (defaults to False), + 'content_encoding': (defaults to utf8) + }, + ... + ], + 'content_patterns': [ + { + 'name': 'content_pattern1', + 'pattern': , + 'inverted': True|False (defaults to False) + } + ... + ] +} +``` Meaning: if a file matches some path pattern, its content must match all the corresponding content patterns. diff --git a/versioned_docs/version-2.10/reference/targets/_category_.json b/versioned_docs/version-2.10/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.10/reference/targets/_category_.json +++ b/versioned_docs/version-2.10/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.10/reference/targets/files.mdx b/versioned_docs/version-2.10/reference/targets/files.mdx index 8316928c8..4740c93f2 100644 --- a/versioned_docs/version-2.10/reference/targets/files.mdx +++ b/versioned_docs/version-2.10/reference/targets/files.mdx @@ -76,13 +76,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.json": {"description": "our customer model"]}, -"bar.json": {"description": "our product model"]}, -("foo.json", "bar.json"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.json": {"description": "our customer model"]}, + "bar.json": {"description": "our product model"]}, + ("foo.json", "bar.json"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.10/reference/targets/pex_binaries.mdx b/versioned_docs/version-2.10/reference/targets/pex_binaries.mdx index a6de0ab3d..8133eda7e 100644 --- a/versioned_docs/version-2.10/reference/targets/pex_binaries.mdx +++ b/versioned_docs/version-2.10/reference/targets/pex_binaries.mdx @@ -212,13 +212,13 @@ Expects a dictionary mapping values from the `entry_points` field to a dictionar For example: -``` -overrides={ -"foo.py": {"execution_mode": "venv"]}, -"bar.py:main": {"restartable": True]}, -("foo.py", "bar.py:main"): {"tags": ["legacy"]}, -} -``` +``` +overrides={ + "foo.py": {"execution_mode": "venv"]}, + "bar.py:main": {"restartable": True]}, + ("foo.py", "bar.py:main"): {"tags": ["legacy"]}, +} +``` Every key is validated to belong to this target's `entry_points` field. diff --git a/versioned_docs/version-2.10/reference/targets/pipenv_requirements.mdx b/versioned_docs/version-2.10/reference/targets/pipenv_requirements.mdx index 6ee057644..f4681a118 100644 --- a/versioned_docs/version-2.10/reference/targets/pipenv_requirements.mdx +++ b/versioned_docs/version-2.10/reference/targets/pipenv_requirements.mdx @@ -58,13 +58,13 @@ Expects a dictionary of requirements to a dictionary for the overrides. You may For example: -``` -overrides={ -"django": {"dependencies": ["#setuptools"]]}, -"ansicolors": {"description": "pretty colors"]}, -("ansicolors, "django"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "django": {"dependencies": ["#setuptools"]]}, + "ansicolors": {"description": "pretty colors"]}, + ("ansicolors, "django"): {"tags": ["overridden"]}, +} +``` Every overridden requirement is validated to be generated by this target. diff --git a/versioned_docs/version-2.10/reference/targets/poetry_requirements.mdx b/versioned_docs/version-2.10/reference/targets/poetry_requirements.mdx index 1f0958b07..5e6e66151 100644 --- a/versioned_docs/version-2.10/reference/targets/poetry_requirements.mdx +++ b/versioned_docs/version-2.10/reference/targets/poetry_requirements.mdx @@ -58,13 +58,13 @@ Expects a dictionary of requirements to a dictionary for the overrides. You may For example: -``` -overrides={ -"django": {"dependencies": ["#setuptools"]]}, -"ansicolors": {"description": "pretty colors"]}, -("ansicolors, "django"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "django": {"dependencies": ["#setuptools"]]}, + "ansicolors": {"description": "pretty colors"]}, + ("ansicolors, "django"): {"tags": ["overridden"]}, +} +``` Every overridden requirement is validated to be generated by this target. diff --git a/versioned_docs/version-2.10/reference/targets/protobuf_sources.mdx b/versioned_docs/version-2.10/reference/targets/protobuf_sources.mdx index 90f6db465..af1402876 100644 --- a/versioned_docs/version-2.10/reference/targets/protobuf_sources.mdx +++ b/versioned_docs/version-2.10/reference/targets/protobuf_sources.mdx @@ -73,13 +73,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.proto": {"grpc": True]}, -"bar.proto": {"description": "our user model"]}, -("foo.proto", "bar.proto"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.proto": {"grpc": True]}, + "bar.proto": {"description": "our user model"]}, + ("foo.proto", "bar.proto"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.10/reference/targets/python_requirements.mdx b/versioned_docs/version-2.10/reference/targets/python_requirements.mdx index f21dd2c5f..f48203060 100644 --- a/versioned_docs/version-2.10/reference/targets/python_requirements.mdx +++ b/versioned_docs/version-2.10/reference/targets/python_requirements.mdx @@ -62,13 +62,13 @@ Expects a dictionary of requirements to a dictionary for the overrides. You may For example: -``` -overrides={ -"django": {"dependencies": ["#setuptools"]]}, -"ansicolors": {"description": "pretty colors"]}, -("ansicolors, "django"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "django": {"dependencies": ["#setuptools"]]}, + "ansicolors": {"description": "pretty colors"]}, + ("ansicolors, "django"): {"tags": ["overridden"]}, +} +``` Every overridden requirement is validated to be generated by this target. diff --git a/versioned_docs/version-2.10/reference/targets/python_sources.mdx b/versioned_docs/version-2.10/reference/targets/python_sources.mdx index 89d5e809c..49628aba3 100644 --- a/versioned_docs/version-2.10/reference/targets/python_sources.mdx +++ b/versioned_docs/version-2.10/reference/targets/python_sources.mdx @@ -83,13 +83,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.py": {"skip_pylint": True]}, -"bar.py": {"skip_flake8": True]}, -("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.py": {"skip_pylint": True]}, + "bar.py": {"skip_flake8": True]}, + ("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.10/reference/targets/python_test_utils.mdx b/versioned_docs/version-2.10/reference/targets/python_test_utils.mdx index fe50fb531..096673c65 100644 --- a/versioned_docs/version-2.10/reference/targets/python_test_utils.mdx +++ b/versioned_docs/version-2.10/reference/targets/python_test_utils.mdx @@ -83,13 +83,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.py": {"skip_pylint": True]}, -"bar.py": {"skip_flake8": True]}, -("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.py": {"skip_pylint": True]}, + "bar.py": {"skip_flake8": True]}, + ("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.10/reference/targets/python_tests.mdx b/versioned_docs/version-2.10/reference/targets/python_tests.mdx index b3a6428a8..26d31b4fa 100644 --- a/versioned_docs/version-2.10/reference/targets/python_tests.mdx +++ b/versioned_docs/version-2.10/reference/targets/python_tests.mdx @@ -92,13 +92,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo_test.py": {"timeout": 120]}, -"bar_test.py": {"timeout": 200]}, -("foo_test.py", "bar_test.py"): {"tags": ["slow_tests"]}, -} -``` +``` +overrides={ + "foo_test.py": {"timeout": 120]}, + "bar_test.py": {"timeout": 200]}, + ("foo_test.py", "bar_test.py"): {"tags": ["slow_tests"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.10/reference/targets/resources.mdx b/versioned_docs/version-2.10/reference/targets/resources.mdx index 6d844b9b4..05f0ed0ee 100644 --- a/versioned_docs/version-2.10/reference/targets/resources.mdx +++ b/versioned_docs/version-2.10/reference/targets/resources.mdx @@ -76,13 +76,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.json": {"description": "our customer model"]}, -"bar.json": {"description": "our product model"]}, -("foo.json", "bar.json"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.json": {"description": "our customer model"]}, + "bar.json": {"description": "our product model"]}, + ("foo.json", "bar.json"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.10/reference/targets/shell_sources.mdx b/versioned_docs/version-2.10/reference/targets/shell_sources.mdx index fe99f47de..b6f66b4e0 100644 --- a/versioned_docs/version-2.10/reference/targets/shell_sources.mdx +++ b/versioned_docs/version-2.10/reference/targets/shell_sources.mdx @@ -62,13 +62,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.sh": {"skip_shellcheck": True]}, -"bar.sh": {"skip_shfmt": True]}, -("foo.sh", "bar.sh"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.sh": {"skip_shellcheck": True]}, + "bar.sh": {"skip_shfmt": True]}, + ("foo.sh", "bar.sh"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.10/reference/targets/shunit2_tests.mdx b/versioned_docs/version-2.10/reference/targets/shunit2_tests.mdx index 9f7fdca30..19d763d78 100644 --- a/versioned_docs/version-2.10/reference/targets/shunit2_tests.mdx +++ b/versioned_docs/version-2.10/reference/targets/shunit2_tests.mdx @@ -62,13 +62,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo_test.sh": {"timeout": 120]}, -"bar_test.sh": {"timeout": 200]}, -("foo_test.sh", "bar_test.sh"): {"tags": ["slow_tests"]}, -} -``` +``` +overrides={ + "foo_test.sh": {"timeout": 120]}, + "bar_test.sh": {"timeout": 200]}, + ("foo_test.sh", "bar_test.sh"): {"tags": ["slow_tests"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.10/reference/targets/thrift_sources.mdx b/versioned_docs/version-2.10/reference/targets/thrift_sources.mdx index 9690ccb06..87ae4c2d5 100644 --- a/versioned_docs/version-2.10/reference/targets/thrift_sources.mdx +++ b/versioned_docs/version-2.10/reference/targets/thrift_sources.mdx @@ -62,12 +62,12 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"bar.thrift": {"description": "our user model"]}, -("foo.thrift", "bar.thrift"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "bar.thrift": {"description": "our user model"]}, + ("foo.thrift", "bar.thrift"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.11/reference/global-options.mdx b/versioned_docs/version-2.11/reference/global-options.mdx index 2e057a146..a48eeb871 100644 --- a/versioned_docs/version-2.11/reference/global-options.mdx +++ b/versioned_docs/version-2.11/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.11/reference/goals/_category_.json b/versioned_docs/version-2.11/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.11/reference/goals/_category_.json +++ b/versioned_docs/version-2.11/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.11/reference/subsystems/_category_.json b/versioned_docs/version-2.11/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.11/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.11/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.11/reference/subsystems/flake8.mdx b/versioned_docs/version-2.11/reference/subsystems/flake8.mdx index 3a0fef663..09460dc77 100644 --- a/versioned_docs/version-2.11/reference/subsystems/flake8.mdx +++ b/versioned_docs/version-2.11/reference/subsystems/flake8.mdx @@ -173,11 +173,11 @@ You must set the plugin's parent directory as a source root. For example, i You must also set `[flake8:local-plugins]` in your Flake8 config file. For example: -``` +``` [flake8:local-plugins] -extension = -CUSTOMCODE = custom_plugin:MyChecker -``` + extension = + CUSTOMCODE = custom_plugin:MyChecker +``` While your plugin's code can depend on other first-party code and third-party requirements, all first-party dependencies of the plugin must live in the same directory or a subdirectory. diff --git a/versioned_docs/version-2.11/reference/subsystems/regex-lint.mdx b/versioned_docs/version-2.11/reference/subsystems/regex-lint.mdx index 175d51622..aed48bbdc 100644 --- a/versioned_docs/version-2.11/reference/subsystems/regex-lint.mdx +++ b/versioned_docs/version-2.11/reference/subsystems/regex-lint.mdx @@ -37,32 +37,32 @@ key2 = val2 Config schema is as follows: -``` -{ -'required_matches': { -'path_pattern1': [content_pattern1, content_pattern2], -'path_pattern2': [content_pattern1, content_pattern3], -... -}, -'path_patterns': [ -{ -'name': path_pattern1', -'pattern': <path regex pattern>, -'inverted': True|False (defaults to False), -'content_encoding': <encoding> (defaults to utf8) -}, -... +``` +{ +'required_matches': { + 'path_pattern1': [content_pattern1, content_pattern2], + 'path_pattern2': [content_pattern1, content_pattern3], + ... +}, +'path_patterns': [ + { + 'name': path_pattern1', + 'pattern': , + 'inverted': True|False (defaults to False), + 'content_encoding': (defaults to utf8) + }, + ... ], -'content_patterns': [ -{ -'name': 'content_pattern1', -'pattern': <content regex pattern>, -'inverted': True|False (defaults to False) -} -... +'content_patterns': [ + { + 'name': 'content_pattern1', + 'pattern': , + 'inverted': True|False (defaults to False) + } + ... ] -} -``` +} +``` Meaning: if a file matches some path pattern, its content must match all the corresponding content patterns. diff --git a/versioned_docs/version-2.11/reference/targets/_category_.json b/versioned_docs/version-2.11/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.11/reference/targets/_category_.json +++ b/versioned_docs/version-2.11/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.11/reference/targets/files.mdx b/versioned_docs/version-2.11/reference/targets/files.mdx index c72e808f9..ecce62e94 100644 --- a/versioned_docs/version-2.11/reference/targets/files.mdx +++ b/versioned_docs/version-2.11/reference/targets/files.mdx @@ -76,13 +76,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.json": {"description": "our customer model"]}, -"bar.json": {"description": "our product model"]}, -("foo.json", "bar.json"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.json": {"description": "our customer model"]}, + "bar.json": {"description": "our product model"]}, + ("foo.json", "bar.json"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.11/reference/targets/pex_binaries.mdx b/versioned_docs/version-2.11/reference/targets/pex_binaries.mdx index 07256105e..734ac93bd 100644 --- a/versioned_docs/version-2.11/reference/targets/pex_binaries.mdx +++ b/versioned_docs/version-2.11/reference/targets/pex_binaries.mdx @@ -212,13 +212,13 @@ Expects a dictionary mapping values from the `entry_points` field to a dictionar For example: -``` -overrides={ -"foo.py": {"execution_mode": "venv"]}, -"bar.py:main": {"restartable": True]}, -("foo.py", "bar.py:main"): {"tags": ["legacy"]}, -} -``` +``` +overrides={ + "foo.py": {"execution_mode": "venv"]}, + "bar.py:main": {"restartable": True]}, + ("foo.py", "bar.py:main"): {"tags": ["legacy"]}, +} +``` Every key is validated to belong to this target's `entry_points` field. diff --git a/versioned_docs/version-2.11/reference/targets/pipenv_requirements.mdx b/versioned_docs/version-2.11/reference/targets/pipenv_requirements.mdx index 1957bd996..f7a484d44 100644 --- a/versioned_docs/version-2.11/reference/targets/pipenv_requirements.mdx +++ b/versioned_docs/version-2.11/reference/targets/pipenv_requirements.mdx @@ -58,13 +58,13 @@ Expects a dictionary of requirements to a dictionary for the overrides. You may For example: -``` -overrides={ -"django": {"dependencies": ["#setuptools"]]}, -"ansicolors": {"description": "pretty colors"]}, -("ansicolors, "django"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "django": {"dependencies": ["#setuptools"]]}, + "ansicolors": {"description": "pretty colors"]}, + ("ansicolors, "django"): {"tags": ["overridden"]}, +} +``` Every overridden requirement is validated to be generated by this target. diff --git a/versioned_docs/version-2.11/reference/targets/poetry_requirements.mdx b/versioned_docs/version-2.11/reference/targets/poetry_requirements.mdx index 6344cd95e..8d9f4d67a 100644 --- a/versioned_docs/version-2.11/reference/targets/poetry_requirements.mdx +++ b/versioned_docs/version-2.11/reference/targets/poetry_requirements.mdx @@ -58,13 +58,13 @@ Expects a dictionary of requirements to a dictionary for the overrides. You may For example: -``` -overrides={ -"django": {"dependencies": ["#setuptools"]]}, -"ansicolors": {"description": "pretty colors"]}, -("ansicolors, "django"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "django": {"dependencies": ["#setuptools"]]}, + "ansicolors": {"description": "pretty colors"]}, + ("ansicolors, "django"): {"tags": ["overridden"]}, +} +``` Every overridden requirement is validated to be generated by this target. diff --git a/versioned_docs/version-2.11/reference/targets/protobuf_sources.mdx b/versioned_docs/version-2.11/reference/targets/protobuf_sources.mdx index 7750aef1a..355c5edfc 100644 --- a/versioned_docs/version-2.11/reference/targets/protobuf_sources.mdx +++ b/versioned_docs/version-2.11/reference/targets/protobuf_sources.mdx @@ -99,13 +99,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.proto": {"grpc": True]}, -"bar.proto": {"description": "our user model"]}, -("foo.proto", "bar.proto"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.proto": {"grpc": True]}, + "bar.proto": {"description": "our user model"]}, + ("foo.proto", "bar.proto"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.11/reference/targets/python_requirements.mdx b/versioned_docs/version-2.11/reference/targets/python_requirements.mdx index cb2a4ec71..00860a542 100644 --- a/versioned_docs/version-2.11/reference/targets/python_requirements.mdx +++ b/versioned_docs/version-2.11/reference/targets/python_requirements.mdx @@ -64,13 +64,13 @@ Expects a dictionary of requirements to a dictionary for the overrides. You may For example: -``` -overrides={ -"django": {"dependencies": ["#setuptools"]]}, -"ansicolors": {"description": "pretty colors"]}, -("ansicolors, "django"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "django": {"dependencies": ["#setuptools"]]}, + "ansicolors": {"description": "pretty colors"]}, + ("ansicolors, "django"): {"tags": ["overridden"]}, +} +``` Every overridden requirement is validated to be generated by this target. diff --git a/versioned_docs/version-2.11/reference/targets/python_sources.mdx b/versioned_docs/version-2.11/reference/targets/python_sources.mdx index 4c56cff50..3449f4132 100644 --- a/versioned_docs/version-2.11/reference/targets/python_sources.mdx +++ b/versioned_docs/version-2.11/reference/targets/python_sources.mdx @@ -83,13 +83,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.py": {"skip_pylint": True]}, -"bar.py": {"skip_flake8": True]}, -("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.py": {"skip_pylint": True]}, + "bar.py": {"skip_flake8": True]}, + ("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.11/reference/targets/python_test_utils.mdx b/versioned_docs/version-2.11/reference/targets/python_test_utils.mdx index a5f2bf415..dcccaabfb 100644 --- a/versioned_docs/version-2.11/reference/targets/python_test_utils.mdx +++ b/versioned_docs/version-2.11/reference/targets/python_test_utils.mdx @@ -83,13 +83,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.py": {"skip_pylint": True]}, -"bar.py": {"skip_flake8": True]}, -("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.py": {"skip_pylint": True]}, + "bar.py": {"skip_flake8": True]}, + ("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.11/reference/targets/python_tests.mdx b/versioned_docs/version-2.11/reference/targets/python_tests.mdx index cb695edfb..60b342ef8 100644 --- a/versioned_docs/version-2.11/reference/targets/python_tests.mdx +++ b/versioned_docs/version-2.11/reference/targets/python_tests.mdx @@ -92,13 +92,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo_test.py": {"timeout": 120]}, -"bar_test.py": {"timeout": 200]}, -("foo_test.py", "bar_test.py"): {"tags": ["slow_tests"]}, -} -``` +``` +overrides={ + "foo_test.py": {"timeout": 120]}, + "bar_test.py": {"timeout": 200]}, + ("foo_test.py", "bar_test.py"): {"tags": ["slow_tests"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.11/reference/targets/resources.mdx b/versioned_docs/version-2.11/reference/targets/resources.mdx index d6c2a4795..01f7220a2 100644 --- a/versioned_docs/version-2.11/reference/targets/resources.mdx +++ b/versioned_docs/version-2.11/reference/targets/resources.mdx @@ -76,13 +76,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.json": {"description": "our customer model"]}, -"bar.json": {"description": "our product model"]}, -("foo.json", "bar.json"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.json": {"description": "our customer model"]}, + "bar.json": {"description": "our product model"]}, + ("foo.json", "bar.json"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.11/reference/targets/shell_sources.mdx b/versioned_docs/version-2.11/reference/targets/shell_sources.mdx index e1de126b8..937ed1530 100644 --- a/versioned_docs/version-2.11/reference/targets/shell_sources.mdx +++ b/versioned_docs/version-2.11/reference/targets/shell_sources.mdx @@ -62,13 +62,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.sh": {"skip_shellcheck": True]}, -"bar.sh": {"skip_shfmt": True]}, -("foo.sh", "bar.sh"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.sh": {"skip_shellcheck": True]}, + "bar.sh": {"skip_shfmt": True]}, + ("foo.sh", "bar.sh"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.11/reference/targets/shunit2_tests.mdx b/versioned_docs/version-2.11/reference/targets/shunit2_tests.mdx index 19e63c288..d53a7004b 100644 --- a/versioned_docs/version-2.11/reference/targets/shunit2_tests.mdx +++ b/versioned_docs/version-2.11/reference/targets/shunit2_tests.mdx @@ -62,13 +62,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo_test.sh": {"timeout": 120]}, -"bar_test.sh": {"timeout": 200]}, -("foo_test.sh", "bar_test.sh"): {"tags": ["slow_tests"]}, -} -``` +``` +overrides={ + "foo_test.sh": {"timeout": 120]}, + "bar_test.sh": {"timeout": 200]}, + ("foo_test.sh", "bar_test.sh"): {"tags": ["slow_tests"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.11/reference/targets/thrift_sources.mdx b/versioned_docs/version-2.11/reference/targets/thrift_sources.mdx index bc43cb11c..5dd83467f 100644 --- a/versioned_docs/version-2.11/reference/targets/thrift_sources.mdx +++ b/versioned_docs/version-2.11/reference/targets/thrift_sources.mdx @@ -62,12 +62,12 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"bar.thrift": {"description": "our user model"]}, -("foo.thrift", "bar.thrift"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "bar.thrift": {"description": "our user model"]}, + ("foo.thrift", "bar.thrift"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.12/reference/global-options.mdx b/versioned_docs/version-2.12/reference/global-options.mdx index c758933b7..d7298b4a3 100644 --- a/versioned_docs/version-2.12/reference/global-options.mdx +++ b/versioned_docs/version-2.12/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.12/reference/goals/_category_.json b/versioned_docs/version-2.12/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.12/reference/goals/_category_.json +++ b/versioned_docs/version-2.12/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.12/reference/subsystems/_category_.json b/versioned_docs/version-2.12/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.12/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.12/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.12/reference/targets/_category_.json b/versioned_docs/version-2.12/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.12/reference/targets/_category_.json +++ b/versioned_docs/version-2.12/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.12/reference/targets/files.mdx b/versioned_docs/version-2.12/reference/targets/files.mdx index c9a9979a1..2fa3f0aab 100644 --- a/versioned_docs/version-2.12/reference/targets/files.mdx +++ b/versioned_docs/version-2.12/reference/targets/files.mdx @@ -76,13 +76,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.json": {"description": "our customer model"]}, -"bar.json": {"description": "our product model"]}, -("foo.json", "bar.json"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.json": {"description": "our customer model"]}, + "bar.json": {"description": "our product model"]}, + ("foo.json", "bar.json"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.12/reference/targets/protobuf_sources.mdx b/versioned_docs/version-2.12/reference/targets/protobuf_sources.mdx index be16165a7..67c2cf3a3 100644 --- a/versioned_docs/version-2.12/reference/targets/protobuf_sources.mdx +++ b/versioned_docs/version-2.12/reference/targets/protobuf_sources.mdx @@ -99,13 +99,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.proto": {"grpc": True}, -"bar.proto": {"description": "our user model"}, -("foo.proto", "bar.proto"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.proto": {"grpc": True}, + "bar.proto": {"description": "our user model"}, + ("foo.proto", "bar.proto"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.12/reference/targets/python_sources.mdx b/versioned_docs/version-2.12/reference/targets/python_sources.mdx index 9499ce7d2..995e3e92c 100644 --- a/versioned_docs/version-2.12/reference/targets/python_sources.mdx +++ b/versioned_docs/version-2.12/reference/targets/python_sources.mdx @@ -83,13 +83,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.py": {"skip_pylint": True]}, -"bar.py": {"skip_flake8": True]}, -("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.py": {"skip_pylint": True]}, + "bar.py": {"skip_flake8": True]}, + ("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.12/reference/targets/python_test_utils.mdx b/versioned_docs/version-2.12/reference/targets/python_test_utils.mdx index 0769ae30d..27604884c 100644 --- a/versioned_docs/version-2.12/reference/targets/python_test_utils.mdx +++ b/versioned_docs/version-2.12/reference/targets/python_test_utils.mdx @@ -83,13 +83,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.py": {"skip_pylint": True]}, -"bar.py": {"skip_flake8": True]}, -("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.py": {"skip_pylint": True]}, + "bar.py": {"skip_flake8": True]}, + ("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.12/reference/targets/python_tests.mdx b/versioned_docs/version-2.12/reference/targets/python_tests.mdx index eba714e5d..504d9d228 100644 --- a/versioned_docs/version-2.12/reference/targets/python_tests.mdx +++ b/versioned_docs/version-2.12/reference/targets/python_tests.mdx @@ -92,13 +92,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo_test.py": {"timeout": 120]}, -"bar_test.py": {"timeout": 200]}, -("foo_test.py", "bar_test.py"): {"tags": ["slow_tests"]}, -} -``` +``` +overrides={ + "foo_test.py": {"timeout": 120]}, + "bar_test.py": {"timeout": 200]}, + ("foo_test.py", "bar_test.py"): {"tags": ["slow_tests"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.12/reference/targets/resources.mdx b/versioned_docs/version-2.12/reference/targets/resources.mdx index 24a83a411..e86e3451b 100644 --- a/versioned_docs/version-2.12/reference/targets/resources.mdx +++ b/versioned_docs/version-2.12/reference/targets/resources.mdx @@ -76,13 +76,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.json": {"description": "our customer model"]}, -"bar.json": {"description": "our product model"]}, -("foo.json", "bar.json"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.json": {"description": "our customer model"]}, + "bar.json": {"description": "our product model"]}, + ("foo.json", "bar.json"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.12/reference/targets/shell_sources.mdx b/versioned_docs/version-2.12/reference/targets/shell_sources.mdx index ae175a453..f24bc4afa 100644 --- a/versioned_docs/version-2.12/reference/targets/shell_sources.mdx +++ b/versioned_docs/version-2.12/reference/targets/shell_sources.mdx @@ -62,13 +62,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.sh": {"skip_shellcheck": True]}, -"bar.sh": {"skip_shfmt": True]}, -("foo.sh", "bar.sh"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.sh": {"skip_shellcheck": True]}, + "bar.sh": {"skip_shfmt": True]}, + ("foo.sh", "bar.sh"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.12/reference/targets/shunit2_tests.mdx b/versioned_docs/version-2.12/reference/targets/shunit2_tests.mdx index 7c025edaf..3f1510951 100644 --- a/versioned_docs/version-2.12/reference/targets/shunit2_tests.mdx +++ b/versioned_docs/version-2.12/reference/targets/shunit2_tests.mdx @@ -62,13 +62,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo_test.sh": {"timeout": 120]}, -"bar_test.sh": {"timeout": 200]}, -("foo_test.sh", "bar_test.sh"): {"tags": ["slow_tests"]}, -} -``` +``` +overrides={ + "foo_test.sh": {"timeout": 120]}, + "bar_test.sh": {"timeout": 200]}, + ("foo_test.sh", "bar_test.sh"): {"tags": ["slow_tests"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.12/reference/targets/thrift_sources.mdx b/versioned_docs/version-2.12/reference/targets/thrift_sources.mdx index 95b539530..e850ab265 100644 --- a/versioned_docs/version-2.12/reference/targets/thrift_sources.mdx +++ b/versioned_docs/version-2.12/reference/targets/thrift_sources.mdx @@ -62,12 +62,12 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"bar.thrift": {"description": "our user model"]}, -("foo.thrift", "bar.thrift"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "bar.thrift": {"description": "our user model"]}, + ("foo.thrift", "bar.thrift"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.13/reference/global-options.mdx b/versioned_docs/version-2.13/reference/global-options.mdx index 875d76c4e..d9352f8c1 100644 --- a/versioned_docs/version-2.13/reference/global-options.mdx +++ b/versioned_docs/version-2.13/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.13/reference/goals/_category_.json b/versioned_docs/version-2.13/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.13/reference/goals/_category_.json +++ b/versioned_docs/version-2.13/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.13/reference/subsystems/_category_.json b/versioned_docs/version-2.13/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.13/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.13/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.13/reference/targets/_category_.json b/versioned_docs/version-2.13/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.13/reference/targets/_category_.json +++ b/versioned_docs/version-2.13/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.14/reference/global-options.mdx b/versioned_docs/version-2.14/reference/global-options.mdx index f55ad41dc..bd5ab69a1 100644 --- a/versioned_docs/version-2.14/reference/global-options.mdx +++ b/versioned_docs/version-2.14/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.14/reference/goals/_category_.json b/versioned_docs/version-2.14/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.14/reference/goals/_category_.json +++ b/versioned_docs/version-2.14/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.14/reference/subsystems/_category_.json b/versioned_docs/version-2.14/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.14/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.14/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.14/reference/targets/_category_.json b/versioned_docs/version-2.14/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.14/reference/targets/_category_.json +++ b/versioned_docs/version-2.14/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.15/reference/global-options.mdx b/versioned_docs/version-2.15/reference/global-options.mdx index 61cb9f7aa..3cc7d4692 100644 --- a/versioned_docs/version-2.15/reference/global-options.mdx +++ b/versioned_docs/version-2.15/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.15/reference/goals/_category_.json b/versioned_docs/version-2.15/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.15/reference/goals/_category_.json +++ b/versioned_docs/version-2.15/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.15/reference/subsystems/_category_.json b/versioned_docs/version-2.15/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.15/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.15/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.15/reference/targets/_category_.json b/versioned_docs/version-2.15/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.15/reference/targets/_category_.json +++ b/versioned_docs/version-2.15/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/__defaults__.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/__defaults__.mdx new file mode 100644 index 000000000..07b76efb4 --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/__defaults__.mdx @@ -0,0 +1,15 @@ +--- +title: __defaults__ +description: | + Provide default field values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Provide default field values. + +Learn more https://www.pantsbuild.org/v2.16/docs/targets#field-default-values + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/__dependencies_rules__.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/__dependencies_rules__.mdx new file mode 100644 index 000000000..3d3366087 --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/__dependencies_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependencies_rules__ +description: | + Declare dependencies rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependencies rules. + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/__dependents_rules__.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/__dependents_rules__.mdx new file mode 100644 index 000000000..a50a19e57 --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/__dependents_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependents_rules__ +description: | + Declare dependents rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependents rules. + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/_category_.json b/versioned_docs/version-2.16/reference/build-file-symbols/_category_.json new file mode 100644 index 000000000..19a1c84c2 --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "BUILD file symbols", + "link": { + "type": "generated-index", + "slug": "/reference/build-file-symbols", + "title": "BUILD file symbols" + }, + "position": 5 +} diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/build_file_dir.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/build_file_dir.mdx new file mode 100644 index 000000000..34cd3100d --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/build_file_dir.mdx @@ -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"; + + '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 + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/duplicate_rule.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/duplicate_rule.mdx new file mode 100644 index 000000000..6b0781673 --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/duplicate_rule.mdx @@ -0,0 +1,13 @@ +--- +title: duplicate_rule +description: | + DeployJarDuplicateRule(pattern: 'str', action: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +DeployJarDuplicateRule(pattern: 'str', action: 'str') + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/env.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/env.mdx new file mode 100644 index 000000000..7d514bca9 --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/env.mdx @@ -0,0 +1,13 @@ +--- +title: env +description: | + Reference environment variable. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'Any'`}> + +Reference environment variable. + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/http_source.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/http_source.mdx new file mode 100644 index 000000000..eb507ce46 --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/http_source.mdx @@ -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"; + + + +http_source(url: 'str', \*, len: 'int', sha256: 'str', filename: 'str' = '') + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/parametrize.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/parametrize.mdx new file mode 100644 index 000000000..04bd19c56 --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/parametrize.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/per_platform.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/per_platform.mdx new file mode 100644 index 000000000..d2d2edeba --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/per_platform.mdx @@ -0,0 +1,52 @@ +--- +title: per_platform +description: | + An object containing differing homogeneous platform-dependent values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 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 homogenous + 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 innaproriate 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). + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/python_artifact.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/python_artifact.mdx new file mode 100644 index 000000000..b99bfee25 --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/python_artifact.mdx @@ -0,0 +1,13 @@ +--- +title: python_artifact +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/setup_py.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/setup_py.mdx new file mode 100644 index 000000000..6b4382b30 --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/setup_py.mdx @@ -0,0 +1,13 @@ +--- +title: setup_py +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/shading_keep.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/shading_keep.mdx new file mode 100644 index 000000000..64ae53ec6 --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/shading_keep.mdx @@ -0,0 +1,13 @@ +--- +title: shading_keep +description: | + JvmShadingKeepRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingKeepRule(pattern: 'str') + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/shading_relocate.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/shading_relocate.mdx new file mode 100644 index 000000000..104c8b7dd --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/shading_relocate.mdx @@ -0,0 +1,13 @@ +--- +title: shading_relocate +description: | + JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/shading_rename.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/shading_rename.mdx new file mode 100644 index 000000000..ca1128dc1 --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/shading_rename.mdx @@ -0,0 +1,13 @@ +--- +title: shading_rename +description: | + JvmShadingRenameRule(pattern: 'str', replacement: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRenameRule(pattern: 'str', replacement: 'str') + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/shading_zap.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/shading_zap.mdx new file mode 100644 index 000000000..553179c3b --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/shading_zap.mdx @@ -0,0 +1,13 @@ +--- +title: shading_zap +description: | + JvmShadingZapRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingZapRule(pattern: 'str') + + diff --git a/versioned_docs/version-2.16/reference/build-file-symbols/stevedore_namespace.mdx b/versioned_docs/version-2.16/reference/build-file-symbols/stevedore_namespace.mdx new file mode 100644 index 000000000..54f3d5a2f --- /dev/null +++ b/versioned_docs/version-2.16/reference/build-file-symbols/stevedore_namespace.mdx @@ -0,0 +1,22 @@ +--- +title: stevedore_namespace +description: | + str(object='') -> str +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + + +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'. + + diff --git a/versioned_docs/version-2.16/reference/global-options.mdx b/versioned_docs/version-2.16/reference/global-options.mdx index eabb0fb9c..70d39513c 100644 --- a/versioned_docs/version-2.16/reference/global-options.mdx +++ b/versioned_docs/version-2.16/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.16/reference/goals/_category_.json b/versioned_docs/version-2.16/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.16/reference/goals/_category_.json +++ b/versioned_docs/version-2.16/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.16/reference/subsystems/_category_.json b/versioned_docs/version-2.16/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.16/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.16/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.16/reference/targets/_category_.json b/versioned_docs/version-2.16/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.16/reference/targets/_category_.json +++ b/versioned_docs/version-2.16/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/PANTS_VERSION.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/PANTS_VERSION.mdx new file mode 100644 index 000000000..0880ae866 --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/PANTS_VERSION.mdx @@ -0,0 +1,10 @@ +--- +title: PANTS_VERSION +description: | +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/__defaults__.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/__defaults__.mdx new file mode 100644 index 000000000..2f0c73122 --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/__defaults__.mdx @@ -0,0 +1,15 @@ +--- +title: __defaults__ +description: | + Provide default field values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Provide default field values. + +Learn more https://www.pantsbuild.org/v2.17/docs/targets#field-default-values + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/__dependencies_rules__.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/__dependencies_rules__.mdx new file mode 100644 index 000000000..3d3366087 --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/__dependencies_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependencies_rules__ +description: | + Declare dependencies rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependencies rules. + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/__dependents_rules__.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/__dependents_rules__.mdx new file mode 100644 index 000000000..a50a19e57 --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/__dependents_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependents_rules__ +description: | + Declare dependents rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependents rules. + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/_category_.json b/versioned_docs/version-2.17/reference/build-file-symbols/_category_.json new file mode 100644 index 000000000..19a1c84c2 --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "BUILD file symbols", + "link": { + "type": "generated-index", + "slug": "/reference/build-file-symbols", + "title": "BUILD file symbols" + }, + "position": 5 +} diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/build_file_dir.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/build_file_dir.mdx new file mode 100644 index 000000000..34cd3100d --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/build_file_dir.mdx @@ -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"; + + '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 + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/duplicate_rule.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/duplicate_rule.mdx new file mode 100644 index 000000000..6b0781673 --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/duplicate_rule.mdx @@ -0,0 +1,13 @@ +--- +title: duplicate_rule +description: | + DeployJarDuplicateRule(pattern: 'str', action: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +DeployJarDuplicateRule(pattern: 'str', action: 'str') + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/env.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/env.mdx new file mode 100644 index 000000000..7d514bca9 --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/env.mdx @@ -0,0 +1,13 @@ +--- +title: env +description: | + Reference environment variable. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'Any'`}> + +Reference environment variable. + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/http_source.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/http_source.mdx new file mode 100644 index 000000000..eb507ce46 --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/http_source.mdx @@ -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"; + + + +http_source(url: 'str', \*, len: 'int', sha256: 'str', filename: 'str' = '') + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/parametrize.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/parametrize.mdx new file mode 100644 index 000000000..04bd19c56 --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/parametrize.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/per_platform.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/per_platform.mdx new file mode 100644 index 000000000..d2d2edeba --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/per_platform.mdx @@ -0,0 +1,52 @@ +--- +title: per_platform +description: | + An object containing differing homogeneous platform-dependent values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 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 homogenous + 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 innaproriate 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). + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/python_artifact.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/python_artifact.mdx new file mode 100644 index 000000000..b99bfee25 --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/python_artifact.mdx @@ -0,0 +1,13 @@ +--- +title: python_artifact +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/setup_py.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/setup_py.mdx new file mode 100644 index 000000000..6b4382b30 --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/setup_py.mdx @@ -0,0 +1,13 @@ +--- +title: setup_py +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/shading_keep.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/shading_keep.mdx new file mode 100644 index 000000000..64ae53ec6 --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/shading_keep.mdx @@ -0,0 +1,13 @@ +--- +title: shading_keep +description: | + JvmShadingKeepRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingKeepRule(pattern: 'str') + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/shading_relocate.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/shading_relocate.mdx new file mode 100644 index 000000000..104c8b7dd --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/shading_relocate.mdx @@ -0,0 +1,13 @@ +--- +title: shading_relocate +description: | + JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/shading_rename.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/shading_rename.mdx new file mode 100644 index 000000000..ca1128dc1 --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/shading_rename.mdx @@ -0,0 +1,13 @@ +--- +title: shading_rename +description: | + JvmShadingRenameRule(pattern: 'str', replacement: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRenameRule(pattern: 'str', replacement: 'str') + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/shading_zap.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/shading_zap.mdx new file mode 100644 index 000000000..553179c3b --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/shading_zap.mdx @@ -0,0 +1,13 @@ +--- +title: shading_zap +description: | + JvmShadingZapRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingZapRule(pattern: 'str') + + diff --git a/versioned_docs/version-2.17/reference/build-file-symbols/stevedore_namespace.mdx b/versioned_docs/version-2.17/reference/build-file-symbols/stevedore_namespace.mdx new file mode 100644 index 000000000..54f3d5a2f --- /dev/null +++ b/versioned_docs/version-2.17/reference/build-file-symbols/stevedore_namespace.mdx @@ -0,0 +1,22 @@ +--- +title: stevedore_namespace +description: | + str(object='') -> str +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + + +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'. + + diff --git a/versioned_docs/version-2.17/reference/global-options.mdx b/versioned_docs/version-2.17/reference/global-options.mdx index 53c1fbc43..f50a2d419 100644 --- a/versioned_docs/version-2.17/reference/global-options.mdx +++ b/versioned_docs/version-2.17/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.17/reference/goals/_category_.json b/versioned_docs/version-2.17/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.17/reference/goals/_category_.json +++ b/versioned_docs/version-2.17/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.17/reference/subsystems/_category_.json b/versioned_docs/version-2.17/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.17/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.17/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.17/reference/targets/_category_.json b/versioned_docs/version-2.17/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.17/reference/targets/_category_.json +++ b/versioned_docs/version-2.17/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/PANTS_VERSION.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/PANTS_VERSION.mdx new file mode 100644 index 000000000..0880ae866 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/PANTS_VERSION.mdx @@ -0,0 +1,10 @@ +--- +title: PANTS_VERSION +description: | +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/__defaults__.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/__defaults__.mdx new file mode 100644 index 000000000..ef1314358 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/__defaults__.mdx @@ -0,0 +1,15 @@ +--- +title: __defaults__ +description: | + Provide default field values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Provide default field values. + +Learn more https://www.pantsbuild.org/v2.18/docs/targets#field-default-values + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/__dependencies_rules__.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/__dependencies_rules__.mdx new file mode 100644 index 000000000..3d3366087 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/__dependencies_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependencies_rules__ +description: | + Declare dependencies rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependencies rules. + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/__dependents_rules__.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/__dependents_rules__.mdx new file mode 100644 index 000000000..a50a19e57 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/__dependents_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependents_rules__ +description: | + Declare dependents rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependents rules. + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/_category_.json b/versioned_docs/version-2.18/reference/build-file-symbols/_category_.json new file mode 100644 index 000000000..19a1c84c2 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "BUILD file symbols", + "link": { + "type": "generated-index", + "slug": "/reference/build-file-symbols", + "title": "BUILD file symbols" + }, + "position": 5 +} diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/build_file_dir.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/build_file_dir.mdx new file mode 100644 index 000000000..34cd3100d --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/build_file_dir.mdx @@ -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"; + + '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 + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/duplicate_rule.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/duplicate_rule.mdx new file mode 100644 index 000000000..6b0781673 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/duplicate_rule.mdx @@ -0,0 +1,13 @@ +--- +title: duplicate_rule +description: | + DeployJarDuplicateRule(pattern: 'str', action: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +DeployJarDuplicateRule(pattern: 'str', action: 'str') + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/env.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/env.mdx new file mode 100644 index 000000000..7d514bca9 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/env.mdx @@ -0,0 +1,13 @@ +--- +title: env +description: | + Reference environment variable. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'Any'`}> + +Reference environment variable. + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/http_source.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/http_source.mdx new file mode 100644 index 000000000..eb507ce46 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/http_source.mdx @@ -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"; + + + +http_source(url: 'str', \*, len: 'int', sha256: 'str', filename: 'str' = '') + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/jvm_exclude.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/jvm_exclude.mdx new file mode 100644 index 000000000..527ad1e71 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/jvm_exclude.mdx @@ -0,0 +1,13 @@ +--- +title: jvm_exclude +description: | + JvmArtifactExclusion(group: 'str', artifact: 'str | None' = None) +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmArtifactExclusion(group: 'str', artifact: 'str | None' = None) + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/node_build_script.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/node_build_script.mdx new file mode 100644 index 000000000..7d4315453 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/node_build_script.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/node_test_script.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/node_test_script.mdx new file mode 100644 index 000000000..5bb248c5c --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/node_test_script.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/parametrize.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/parametrize.mdx new file mode 100644 index 000000000..04bd19c56 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/parametrize.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/per_platform.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/per_platform.mdx new file mode 100644 index 000000000..d2d2edeba --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/per_platform.mdx @@ -0,0 +1,52 @@ +--- +title: per_platform +description: | + An object containing differing homogeneous platform-dependent values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 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 homogenous + 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 innaproriate 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). + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/python_artifact.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/python_artifact.mdx new file mode 100644 index 000000000..b99bfee25 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/python_artifact.mdx @@ -0,0 +1,13 @@ +--- +title: python_artifact +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/scala_exclude.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/scala_exclude.mdx new file mode 100644 index 000000000..1fe6ce56a --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/scala_exclude.mdx @@ -0,0 +1,13 @@ +--- +title: scala_exclude +description: | + ScalaArtifactExclusion(group: 'str', artifact: 'str | None' = None, crossversion: 'str' = 'partial') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +ScalaArtifactExclusion(group: 'str', artifact: 'str | None' = None, crossversion: 'str' = 'partial') + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/setup_py.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/setup_py.mdx new file mode 100644 index 000000000..6b4382b30 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/setup_py.mdx @@ -0,0 +1,13 @@ +--- +title: setup_py +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/shading_keep.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/shading_keep.mdx new file mode 100644 index 000000000..64ae53ec6 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/shading_keep.mdx @@ -0,0 +1,13 @@ +--- +title: shading_keep +description: | + JvmShadingKeepRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingKeepRule(pattern: 'str') + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/shading_relocate.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/shading_relocate.mdx new file mode 100644 index 000000000..104c8b7dd --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/shading_relocate.mdx @@ -0,0 +1,13 @@ +--- +title: shading_relocate +description: | + JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/shading_rename.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/shading_rename.mdx new file mode 100644 index 000000000..ca1128dc1 --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/shading_rename.mdx @@ -0,0 +1,13 @@ +--- +title: shading_rename +description: | + JvmShadingRenameRule(pattern: 'str', replacement: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRenameRule(pattern: 'str', replacement: 'str') + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/shading_zap.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/shading_zap.mdx new file mode 100644 index 000000000..553179c3b --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/shading_zap.mdx @@ -0,0 +1,13 @@ +--- +title: shading_zap +description: | + JvmShadingZapRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingZapRule(pattern: 'str') + + diff --git a/versioned_docs/version-2.18/reference/build-file-symbols/stevedore_namespace.mdx b/versioned_docs/version-2.18/reference/build-file-symbols/stevedore_namespace.mdx new file mode 100644 index 000000000..54f3d5a2f --- /dev/null +++ b/versioned_docs/version-2.18/reference/build-file-symbols/stevedore_namespace.mdx @@ -0,0 +1,22 @@ +--- +title: stevedore_namespace +description: | + str(object='') -> str +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + + +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'. + + diff --git a/versioned_docs/version-2.18/reference/global-options.mdx b/versioned_docs/version-2.18/reference/global-options.mdx index fbe46b1ba..f2031fd75 100644 --- a/versioned_docs/version-2.18/reference/global-options.mdx +++ b/versioned_docs/version-2.18/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.18/reference/goals/_category_.json b/versioned_docs/version-2.18/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.18/reference/goals/_category_.json +++ b/versioned_docs/version-2.18/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.18/reference/subsystems/_category_.json b/versioned_docs/version-2.18/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.18/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.18/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.18/reference/targets/_category_.json b/versioned_docs/version-2.18/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.18/reference/targets/_category_.json +++ b/versioned_docs/version-2.18/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/PANTS_VERSION.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/PANTS_VERSION.mdx new file mode 100644 index 000000000..0880ae866 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/PANTS_VERSION.mdx @@ -0,0 +1,10 @@ +--- +title: PANTS_VERSION +description: | +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/__defaults__.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/__defaults__.mdx new file mode 100644 index 000000000..f0f34968b --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/__defaults__.mdx @@ -0,0 +1,15 @@ +--- +title: __defaults__ +description: | + Provide default field values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Provide default field values. + +Learn more https://www.pantsbuild.org/v2.19/docs/targets#field-default-values + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/__dependencies_rules__.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/__dependencies_rules__.mdx new file mode 100644 index 000000000..3d3366087 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/__dependencies_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependencies_rules__ +description: | + Declare dependencies rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependencies rules. + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/__dependents_rules__.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/__dependents_rules__.mdx new file mode 100644 index 000000000..a50a19e57 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/__dependents_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependents_rules__ +description: | + Declare dependents rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependents rules. + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/_category_.json b/versioned_docs/version-2.19/reference/build-file-symbols/_category_.json new file mode 100644 index 000000000..19a1c84c2 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "BUILD file symbols", + "link": { + "type": "generated-index", + "slug": "/reference/build-file-symbols", + "title": "BUILD file symbols" + }, + "position": 5 +} diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/build_file_dir.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/build_file_dir.mdx new file mode 100644 index 000000000..34cd3100d --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/build_file_dir.mdx @@ -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"; + + '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 + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/duplicate_rule.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/duplicate_rule.mdx new file mode 100644 index 000000000..6b0781673 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/duplicate_rule.mdx @@ -0,0 +1,13 @@ +--- +title: duplicate_rule +description: | + DeployJarDuplicateRule(pattern: 'str', action: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +DeployJarDuplicateRule(pattern: 'str', action: 'str') + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/env.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/env.mdx new file mode 100644 index 000000000..7d514bca9 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/env.mdx @@ -0,0 +1,13 @@ +--- +title: env +description: | + Reference environment variable. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'Any'`}> + +Reference environment variable. + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/http_source.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/http_source.mdx new file mode 100644 index 000000000..eb507ce46 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/http_source.mdx @@ -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"; + + + +http_source(url: 'str', \*, len: 'int', sha256: 'str', filename: 'str' = '') + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/jvm_exclude.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/jvm_exclude.mdx new file mode 100644 index 000000000..527ad1e71 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/jvm_exclude.mdx @@ -0,0 +1,13 @@ +--- +title: jvm_exclude +description: | + JvmArtifactExclusion(group: 'str', artifact: 'str | None' = None) +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmArtifactExclusion(group: 'str', artifact: 'str | None' = None) + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/node_build_script.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/node_build_script.mdx new file mode 100644 index 000000000..7d4315453 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/node_build_script.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/node_test_script.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/node_test_script.mdx new file mode 100644 index 000000000..5bb248c5c --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/node_test_script.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/parametrize.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/parametrize.mdx new file mode 100644 index 000000000..04bd19c56 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/parametrize.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/per_platform.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/per_platform.mdx new file mode 100644 index 000000000..d2d2edeba --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/per_platform.mdx @@ -0,0 +1,52 @@ +--- +title: per_platform +description: | + An object containing differing homogeneous platform-dependent values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 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 homogenous + 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 innaproriate 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). + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/python_artifact.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/python_artifact.mdx new file mode 100644 index 000000000..b99bfee25 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/python_artifact.mdx @@ -0,0 +1,13 @@ +--- +title: python_artifact +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/scala_exclude.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/scala_exclude.mdx new file mode 100644 index 000000000..1fe6ce56a --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/scala_exclude.mdx @@ -0,0 +1,13 @@ +--- +title: scala_exclude +description: | + ScalaArtifactExclusion(group: 'str', artifact: 'str | None' = None, crossversion: 'str' = 'partial') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +ScalaArtifactExclusion(group: 'str', artifact: 'str | None' = None, crossversion: 'str' = 'partial') + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/setup_py.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/setup_py.mdx new file mode 100644 index 000000000..6b4382b30 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/setup_py.mdx @@ -0,0 +1,13 @@ +--- +title: setup_py +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/shading_keep.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/shading_keep.mdx new file mode 100644 index 000000000..64ae53ec6 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/shading_keep.mdx @@ -0,0 +1,13 @@ +--- +title: shading_keep +description: | + JvmShadingKeepRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingKeepRule(pattern: 'str') + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/shading_relocate.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/shading_relocate.mdx new file mode 100644 index 000000000..104c8b7dd --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/shading_relocate.mdx @@ -0,0 +1,13 @@ +--- +title: shading_relocate +description: | + JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/shading_rename.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/shading_rename.mdx new file mode 100644 index 000000000..ca1128dc1 --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/shading_rename.mdx @@ -0,0 +1,13 @@ +--- +title: shading_rename +description: | + JvmShadingRenameRule(pattern: 'str', replacement: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRenameRule(pattern: 'str', replacement: 'str') + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/shading_zap.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/shading_zap.mdx new file mode 100644 index 000000000..553179c3b --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/shading_zap.mdx @@ -0,0 +1,13 @@ +--- +title: shading_zap +description: | + JvmShadingZapRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingZapRule(pattern: 'str') + + diff --git a/versioned_docs/version-2.19/reference/build-file-symbols/stevedore_namespace.mdx b/versioned_docs/version-2.19/reference/build-file-symbols/stevedore_namespace.mdx new file mode 100644 index 000000000..54f3d5a2f --- /dev/null +++ b/versioned_docs/version-2.19/reference/build-file-symbols/stevedore_namespace.mdx @@ -0,0 +1,22 @@ +--- +title: stevedore_namespace +description: | + str(object='') -> str +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + + +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'. + + diff --git a/versioned_docs/version-2.19/reference/global-options.mdx b/versioned_docs/version-2.19/reference/global-options.mdx index 47a2eccb5..99978101b 100644 --- a/versioned_docs/version-2.19/reference/global-options.mdx +++ b/versioned_docs/version-2.19/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.19/reference/goals/_category_.json b/versioned_docs/version-2.19/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.19/reference/goals/_category_.json +++ b/versioned_docs/version-2.19/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.19/reference/subsystems/_category_.json b/versioned_docs/version-2.19/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.19/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.19/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.19/reference/targets/_category_.json b/versioned_docs/version-2.19/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.19/reference/targets/_category_.json +++ b/versioned_docs/version-2.19/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.2/reference/global-options.mdx b/versioned_docs/version-2.2/reference/global-options.mdx index 6247ae99a..3ca3e76ac 100644 --- a/versioned_docs/version-2.2/reference/global-options.mdx +++ b/versioned_docs/version-2.2/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.2/reference/goals/_category_.json b/versioned_docs/version-2.2/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.2/reference/goals/_category_.json +++ b/versioned_docs/version-2.2/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.2/reference/subsystems/_category_.json b/versioned_docs/version-2.2/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.2/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.2/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.2/reference/targets/_category_.json b/versioned_docs/version-2.2/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.2/reference/targets/_category_.json +++ b/versioned_docs/version-2.2/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/PANTS_VERSION.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/PANTS_VERSION.mdx new file mode 100644 index 000000000..0880ae866 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/PANTS_VERSION.mdx @@ -0,0 +1,10 @@ +--- +title: PANTS_VERSION +description: | +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/__defaults__.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/__defaults__.mdx new file mode 100644 index 000000000..11ca48ac9 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/__defaults__.mdx @@ -0,0 +1,15 @@ +--- +title: __defaults__ +description: | + Provide default field values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Provide default field values. + +Learn more https://www.pantsbuild.org/2.20/docs/using-pants/key-concepts/targets-and-build-files#field-default-values + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/__dependencies_rules__.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/__dependencies_rules__.mdx new file mode 100644 index 000000000..3d3366087 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/__dependencies_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependencies_rules__ +description: | + Declare dependencies rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependencies rules. + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/__dependents_rules__.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/__dependents_rules__.mdx new file mode 100644 index 000000000..a50a19e57 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/__dependents_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependents_rules__ +description: | + Declare dependents rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependents rules. + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/_category_.json b/versioned_docs/version-2.20/reference/build-file-symbols/_category_.json new file mode 100644 index 000000000..19a1c84c2 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "BUILD file symbols", + "link": { + "type": "generated-index", + "slug": "/reference/build-file-symbols", + "title": "BUILD file symbols" + }, + "position": 5 +} diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/build_file_dir.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/build_file_dir.mdx new file mode 100644 index 000000000..34cd3100d --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/build_file_dir.mdx @@ -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"; + + '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 + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/duplicate_rule.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/duplicate_rule.mdx new file mode 100644 index 000000000..6b0781673 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/duplicate_rule.mdx @@ -0,0 +1,13 @@ +--- +title: duplicate_rule +description: | + DeployJarDuplicateRule(pattern: 'str', action: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +DeployJarDuplicateRule(pattern: 'str', action: 'str') + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/env.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/env.mdx new file mode 100644 index 000000000..7d514bca9 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/env.mdx @@ -0,0 +1,13 @@ +--- +title: env +description: | + Reference environment variable. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'Any'`}> + +Reference environment variable. + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/http_source.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/http_source.mdx new file mode 100644 index 000000000..eb507ce46 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/http_source.mdx @@ -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"; + + + +http_source(url: 'str', \*, len: 'int', sha256: 'str', filename: 'str' = '') + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/jvm_exclude.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/jvm_exclude.mdx new file mode 100644 index 000000000..527ad1e71 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/jvm_exclude.mdx @@ -0,0 +1,13 @@ +--- +title: jvm_exclude +description: | + JvmArtifactExclusion(group: 'str', artifact: 'str | None' = None) +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmArtifactExclusion(group: 'str', artifact: 'str | None' = None) + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/node_build_script.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/node_build_script.mdx new file mode 100644 index 000000000..7d4315453 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/node_build_script.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/node_test_script.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/node_test_script.mdx new file mode 100644 index 000000000..5bb248c5c --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/node_test_script.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/parametrize.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/parametrize.mdx new file mode 100644 index 000000000..04bd19c56 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/parametrize.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/per_platform.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/per_platform.mdx new file mode 100644 index 000000000..eb9a06c1d --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/per_platform.mdx @@ -0,0 +1,52 @@ +--- +title: per_platform +description: | + An object containing differing homogeneous platform-dependent values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 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). + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/python_artifact.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/python_artifact.mdx new file mode 100644 index 000000000..b99bfee25 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/python_artifact.mdx @@ -0,0 +1,13 @@ +--- +title: python_artifact +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/scala_exclude.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/scala_exclude.mdx new file mode 100644 index 000000000..94890d053 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/scala_exclude.mdx @@ -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"; + + None`}> + +ScalaArtifactExclusion(group: 'str', artifact: 'str | None' = None, crossversion: 'str' = 'binary') + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/setup_py.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/setup_py.mdx new file mode 100644 index 000000000..6b4382b30 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/setup_py.mdx @@ -0,0 +1,13 @@ +--- +title: setup_py +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/shading_keep.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/shading_keep.mdx new file mode 100644 index 000000000..64ae53ec6 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/shading_keep.mdx @@ -0,0 +1,13 @@ +--- +title: shading_keep +description: | + JvmShadingKeepRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingKeepRule(pattern: 'str') + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/shading_relocate.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/shading_relocate.mdx new file mode 100644 index 000000000..104c8b7dd --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/shading_relocate.mdx @@ -0,0 +1,13 @@ +--- +title: shading_relocate +description: | + JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/shading_rename.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/shading_rename.mdx new file mode 100644 index 000000000..ca1128dc1 --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/shading_rename.mdx @@ -0,0 +1,13 @@ +--- +title: shading_rename +description: | + JvmShadingRenameRule(pattern: 'str', replacement: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRenameRule(pattern: 'str', replacement: 'str') + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/shading_zap.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/shading_zap.mdx new file mode 100644 index 000000000..553179c3b --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/shading_zap.mdx @@ -0,0 +1,13 @@ +--- +title: shading_zap +description: | + JvmShadingZapRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingZapRule(pattern: 'str') + + diff --git a/versioned_docs/version-2.20/reference/build-file-symbols/stevedore_namespace.mdx b/versioned_docs/version-2.20/reference/build-file-symbols/stevedore_namespace.mdx new file mode 100644 index 000000000..54f3d5a2f --- /dev/null +++ b/versioned_docs/version-2.20/reference/build-file-symbols/stevedore_namespace.mdx @@ -0,0 +1,22 @@ +--- +title: stevedore_namespace +description: | + str(object='') -> str +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + + +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'. + + diff --git a/versioned_docs/version-2.20/reference/global-options.mdx b/versioned_docs/version-2.20/reference/global-options.mdx index fd9798e3f..224784cf6 100644 --- a/versioned_docs/version-2.20/reference/global-options.mdx +++ b/versioned_docs/version-2.20/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.20/reference/goals/_category_.json b/versioned_docs/version-2.20/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.20/reference/goals/_category_.json +++ b/versioned_docs/version-2.20/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.20/reference/subsystems/_category_.json b/versioned_docs/version-2.20/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.20/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.20/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.20/reference/targets/_category_.json b/versioned_docs/version-2.20/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.20/reference/targets/_category_.json +++ b/versioned_docs/version-2.20/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/PANTS_VERSION.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/PANTS_VERSION.mdx new file mode 100644 index 000000000..0880ae866 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/PANTS_VERSION.mdx @@ -0,0 +1,10 @@ +--- +title: PANTS_VERSION +description: | +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/__defaults__.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/__defaults__.mdx new file mode 100644 index 000000000..8092c1475 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/__defaults__.mdx @@ -0,0 +1,15 @@ +--- +title: __defaults__ +description: | + Provide default field values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Provide default field values. + +Learn more https://www.pantsbuild.org/2.21/docs/using-pants/key-concepts/targets-and-build-files#field-default-values + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/__dependencies_rules__.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/__dependencies_rules__.mdx new file mode 100644 index 000000000..3d3366087 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/__dependencies_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependencies_rules__ +description: | + Declare dependencies rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependencies rules. + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/__dependents_rules__.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/__dependents_rules__.mdx new file mode 100644 index 000000000..a50a19e57 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/__dependents_rules__.mdx @@ -0,0 +1,13 @@ +--- +title: __dependents_rules__ +description: | + Declare dependents rules. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'None'`}> + +Declare dependents rules. + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/_category_.json b/versioned_docs/version-2.21/reference/build-file-symbols/_category_.json new file mode 100644 index 000000000..19a1c84c2 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "BUILD file symbols", + "link": { + "type": "generated-index", + "slug": "/reference/build-file-symbols", + "title": "BUILD file symbols" + }, + "position": 5 +} diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/build_file_dir.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/build_file_dir.mdx new file mode 100644 index 000000000..34cd3100d --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/build_file_dir.mdx @@ -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"; + + '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 + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/duplicate_rule.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/duplicate_rule.mdx new file mode 100644 index 000000000..6b0781673 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/duplicate_rule.mdx @@ -0,0 +1,13 @@ +--- +title: duplicate_rule +description: | + DeployJarDuplicateRule(pattern: 'str', action: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +DeployJarDuplicateRule(pattern: 'str', action: 'str') + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/env.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/env.mdx new file mode 100644 index 000000000..7d514bca9 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/env.mdx @@ -0,0 +1,13 @@ +--- +title: env +description: | + Reference environment variable. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 'Any'`}> + +Reference environment variable. + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/http_source.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/http_source.mdx new file mode 100644 index 000000000..eb507ce46 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/http_source.mdx @@ -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"; + + + +http_source(url: 'str', \*, len: 'int', sha256: 'str', filename: 'str' = '') + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/jvm_exclude.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/jvm_exclude.mdx new file mode 100644 index 000000000..527ad1e71 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/jvm_exclude.mdx @@ -0,0 +1,13 @@ +--- +title: jvm_exclude +description: | + JvmArtifactExclusion(group: 'str', artifact: 'str | None' = None) +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmArtifactExclusion(group: 'str', artifact: 'str | None' = None) + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/node_build_script.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/node_build_script.mdx new file mode 100644 index 000000000..7d4315453 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/node_build_script.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/node_test_script.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/node_test_script.mdx new file mode 100644 index 000000000..5bb248c5c --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/node_test_script.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/parametrize.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/parametrize.mdx new file mode 100644 index 000000000..04bd19c56 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/parametrize.mdx @@ -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"; + + '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. + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/per_platform.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/per_platform.mdx new file mode 100644 index 000000000..eb9a06c1d --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/per_platform.mdx @@ -0,0 +1,52 @@ +--- +title: per_platform +description: | + An object containing differing homogeneous platform-dependent values. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + 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). + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/python_artifact.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/python_artifact.mdx new file mode 100644 index 000000000..b99bfee25 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/python_artifact.mdx @@ -0,0 +1,13 @@ +--- +title: python_artifact +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/scala_exclude.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/scala_exclude.mdx new file mode 100644 index 000000000..94890d053 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/scala_exclude.mdx @@ -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"; + + None`}> + +ScalaArtifactExclusion(group: 'str', artifact: 'str | None' = None, crossversion: 'str' = 'binary') + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/setup_py.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/setup_py.mdx new file mode 100644 index 000000000..6b4382b30 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/setup_py.mdx @@ -0,0 +1,13 @@ +--- +title: setup_py +description: | + Represents a Python setup.py-based project. +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +Represents a Python setup.py-based project. + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/shading_keep.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/shading_keep.mdx new file mode 100644 index 000000000..64ae53ec6 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/shading_keep.mdx @@ -0,0 +1,13 @@ +--- +title: shading_keep +description: | + JvmShadingKeepRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingKeepRule(pattern: 'str') + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/shading_relocate.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/shading_relocate.mdx new file mode 100644 index 000000000..104c8b7dd --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/shading_relocate.mdx @@ -0,0 +1,13 @@ +--- +title: shading_relocate +description: | + JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRelocateRule(package: 'str', into: 'str | None' = None) + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/shading_rename.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/shading_rename.mdx new file mode 100644 index 000000000..ca1128dc1 --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/shading_rename.mdx @@ -0,0 +1,13 @@ +--- +title: shading_rename +description: | + JvmShadingRenameRule(pattern: 'str', replacement: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingRenameRule(pattern: 'str', replacement: 'str') + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/shading_zap.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/shading_zap.mdx new file mode 100644 index 000000000..553179c3b --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/shading_zap.mdx @@ -0,0 +1,13 @@ +--- +title: shading_zap +description: | + JvmShadingZapRule(pattern: 'str') +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + None`}> + +JvmShadingZapRule(pattern: 'str') + + diff --git a/versioned_docs/version-2.21/reference/build-file-symbols/stevedore_namespace.mdx b/versioned_docs/version-2.21/reference/build-file-symbols/stevedore_namespace.mdx new file mode 100644 index 000000000..54f3d5a2f --- /dev/null +++ b/versioned_docs/version-2.21/reference/build-file-symbols/stevedore_namespace.mdx @@ -0,0 +1,22 @@ +--- +title: stevedore_namespace +description: | + str(object='') -> str +--- + +import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol"; + + + +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'. + + diff --git a/versioned_docs/version-2.21/reference/global-options.mdx b/versioned_docs/version-2.21/reference/global-options.mdx index ba7930386..155371700 100644 --- a/versioned_docs/version-2.21/reference/global-options.mdx +++ b/versioned_docs/version-2.21/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.21/reference/goals/_category_.json b/versioned_docs/version-2.21/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.21/reference/goals/_category_.json +++ b/versioned_docs/version-2.21/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.21/reference/subsystems/_category_.json b/versioned_docs/version-2.21/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.21/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.21/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.21/reference/targets/_category_.json b/versioned_docs/version-2.21/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.21/reference/targets/_category_.json +++ b/versioned_docs/version-2.21/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.3/reference/global-options.mdx b/versioned_docs/version-2.3/reference/global-options.mdx index 03bcb6523..bce8333b7 100644 --- a/versioned_docs/version-2.3/reference/global-options.mdx +++ b/versioned_docs/version-2.3/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.3/reference/goals/_category_.json b/versioned_docs/version-2.3/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.3/reference/goals/_category_.json +++ b/versioned_docs/version-2.3/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.3/reference/subsystems/_category_.json b/versioned_docs/version-2.3/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.3/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.3/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.3/reference/targets/_category_.json b/versioned_docs/version-2.3/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.3/reference/targets/_category_.json +++ b/versioned_docs/version-2.3/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.4/reference/global-options.mdx b/versioned_docs/version-2.4/reference/global-options.mdx index a9e1a0b2f..3ac6d3ac1 100644 --- a/versioned_docs/version-2.4/reference/global-options.mdx +++ b/versioned_docs/version-2.4/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.4/reference/goals/_category_.json b/versioned_docs/version-2.4/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.4/reference/goals/_category_.json +++ b/versioned_docs/version-2.4/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.4/reference/subsystems/_category_.json b/versioned_docs/version-2.4/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.4/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.4/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.4/reference/targets/_category_.json b/versioned_docs/version-2.4/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.4/reference/targets/_category_.json +++ b/versioned_docs/version-2.4/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.5/reference/global-options.mdx b/versioned_docs/version-2.5/reference/global-options.mdx index d09db511a..af48280df 100644 --- a/versioned_docs/version-2.5/reference/global-options.mdx +++ b/versioned_docs/version-2.5/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.5/reference/goals/_category_.json b/versioned_docs/version-2.5/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.5/reference/goals/_category_.json +++ b/versioned_docs/version-2.5/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.5/reference/subsystems/_category_.json b/versioned_docs/version-2.5/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.5/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.5/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.5/reference/targets/_category_.json b/versioned_docs/version-2.5/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.5/reference/targets/_category_.json +++ b/versioned_docs/version-2.5/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.6/reference/global-options.mdx b/versioned_docs/version-2.6/reference/global-options.mdx index 952bd72ab..ac1c24381 100644 --- a/versioned_docs/version-2.6/reference/global-options.mdx +++ b/versioned_docs/version-2.6/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.6/reference/goals/_category_.json b/versioned_docs/version-2.6/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.6/reference/goals/_category_.json +++ b/versioned_docs/version-2.6/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.6/reference/subsystems/_category_.json b/versioned_docs/version-2.6/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.6/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.6/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.6/reference/targets/_category_.json b/versioned_docs/version-2.6/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.6/reference/targets/_category_.json +++ b/versioned_docs/version-2.6/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.7/reference/global-options.mdx b/versioned_docs/version-2.7/reference/global-options.mdx index adf6c09ba..c5419bd48 100644 --- a/versioned_docs/version-2.7/reference/global-options.mdx +++ b/versioned_docs/version-2.7/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.7/reference/goals/_category_.json b/versioned_docs/version-2.7/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.7/reference/goals/_category_.json +++ b/versioned_docs/version-2.7/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.7/reference/subsystems/_category_.json b/versioned_docs/version-2.7/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.7/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.7/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.7/reference/targets/_category_.json b/versioned_docs/version-2.7/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.7/reference/targets/_category_.json +++ b/versioned_docs/version-2.7/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.8/reference/global-options.mdx b/versioned_docs/version-2.8/reference/global-options.mdx index 60a47a5d2..db43409ed 100644 --- a/versioned_docs/version-2.8/reference/global-options.mdx +++ b/versioned_docs/version-2.8/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.8/reference/goals/_category_.json b/versioned_docs/version-2.8/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.8/reference/goals/_category_.json +++ b/versioned_docs/version-2.8/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.8/reference/subsystems/_category_.json b/versioned_docs/version-2.8/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.8/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.8/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.8/reference/targets/_category_.json b/versioned_docs/version-2.8/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.8/reference/targets/_category_.json +++ b/versioned_docs/version-2.8/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.8/reference/targets/files.mdx b/versioned_docs/version-2.8/reference/targets/files.mdx index 4c7772095..69a4fde9c 100644 --- a/versioned_docs/version-2.8/reference/targets/files.mdx +++ b/versioned_docs/version-2.8/reference/targets/files.mdx @@ -72,13 +72,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.json": {"description": "our customer model"]}, -"bar.json": {"description": "our product model"]}, -("foo.json", "bar.json"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.json": {"description": "our customer model"]}, + "bar.json": {"description": "our product model"]}, + ("foo.json", "bar.json"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.8/reference/targets/protobuf_sources.mdx b/versioned_docs/version-2.8/reference/targets/protobuf_sources.mdx index b994a388e..a624c47ac 100644 --- a/versioned_docs/version-2.8/reference/targets/protobuf_sources.mdx +++ b/versioned_docs/version-2.8/reference/targets/protobuf_sources.mdx @@ -69,13 +69,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.proto": {"grpc": True]}, -"bar.proto": {"description": "our user model"]}, -("foo.proto", "bar.proto"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.proto": {"grpc": True]}, + "bar.proto": {"description": "our user model"]}, + ("foo.proto", "bar.proto"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.8/reference/targets/python_sources.mdx b/versioned_docs/version-2.8/reference/targets/python_sources.mdx index 8f4668461..becb6ef1e 100644 --- a/versioned_docs/version-2.8/reference/targets/python_sources.mdx +++ b/versioned_docs/version-2.8/reference/targets/python_sources.mdx @@ -79,13 +79,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.py": {"skip_pylint": True]}, -"bar.py": {"skip_flake8": True]}, -("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.py": {"skip_pylint": True]}, + "bar.py": {"skip_flake8": True]}, + ("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.8/reference/targets/python_test_utils.mdx b/versioned_docs/version-2.8/reference/targets/python_test_utils.mdx index e6e0a9296..4703c59ff 100644 --- a/versioned_docs/version-2.8/reference/targets/python_test_utils.mdx +++ b/versioned_docs/version-2.8/reference/targets/python_test_utils.mdx @@ -79,13 +79,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.py": {"skip_pylint": True]}, -"bar.py": {"skip_flake8": True]}, -("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.py": {"skip_pylint": True]}, + "bar.py": {"skip_flake8": True]}, + ("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.8/reference/targets/python_tests.mdx b/versioned_docs/version-2.8/reference/targets/python_tests.mdx index cb74da535..cf55b9b7c 100644 --- a/versioned_docs/version-2.8/reference/targets/python_tests.mdx +++ b/versioned_docs/version-2.8/reference/targets/python_tests.mdx @@ -101,13 +101,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo_test.py": {"timeout": 120]}, -"bar_test.py": {"timeout": 200]}, -("foo_test.py", "bar_test.py"): {"tags": ["slow_tests"]}, -} -``` +``` +overrides={ + "foo_test.py": {"timeout": 120]}, + "bar_test.py": {"timeout": 200]}, + ("foo_test.py", "bar_test.py"): {"tags": ["slow_tests"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.8/reference/targets/resources.mdx b/versioned_docs/version-2.8/reference/targets/resources.mdx index 1cedeed1d..09ee444b6 100644 --- a/versioned_docs/version-2.8/reference/targets/resources.mdx +++ b/versioned_docs/version-2.8/reference/targets/resources.mdx @@ -72,13 +72,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.json": {"description": "our customer model"]}, -"bar.json": {"description": "our product model"]}, -("foo.json", "bar.json"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.json": {"description": "our customer model"]}, + "bar.json": {"description": "our product model"]}, + ("foo.json", "bar.json"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.8/reference/targets/shell_sources.mdx b/versioned_docs/version-2.8/reference/targets/shell_sources.mdx index 7cc0e0923..c4fc37133 100644 --- a/versioned_docs/version-2.8/reference/targets/shell_sources.mdx +++ b/versioned_docs/version-2.8/reference/targets/shell_sources.mdx @@ -58,13 +58,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.sh": {"skip_shellcheck": True]}, -"bar.sh": {"skip_shfmt": True]}, -("foo.sh", "bar.sh"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.sh": {"skip_shellcheck": True]}, + "bar.sh": {"skip_shfmt": True]}, + ("foo.sh", "bar.sh"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.8/reference/targets/shunit2_tests.mdx b/versioned_docs/version-2.8/reference/targets/shunit2_tests.mdx index af3d32115..d72155cb1 100644 --- a/versioned_docs/version-2.8/reference/targets/shunit2_tests.mdx +++ b/versioned_docs/version-2.8/reference/targets/shunit2_tests.mdx @@ -58,13 +58,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo_test.sh": {"timeout": 120]}, -"bar_test.sh": {"timeout": 200]}, -("foo_test.sh", "bar_test.sh"): {"tags": ["slow_tests"]}, -} -``` +``` +overrides={ + "foo_test.sh": {"timeout": 120]}, + "bar_test.sh": {"timeout": 200]}, + ("foo_test.sh", "bar_test.sh"): {"tags": ["slow_tests"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.9/reference/global-options.mdx b/versioned_docs/version-2.9/reference/global-options.mdx index 6da451f88..8498c1d5b 100644 --- a/versioned_docs/version-2.9/reference/global-options.mdx +++ b/versioned_docs/version-2.9/reference/global-options.mdx @@ -2,6 +2,7 @@ title: Global options description: | Options to control the overall behavior of Pants. +sidebar_position: 1 --- import Option from "@site/src/components/reference/Option"; diff --git a/versioned_docs/version-2.9/reference/goals/_category_.json b/versioned_docs/version-2.9/reference/goals/_category_.json index 352d45f5f..5957f9750 100644 --- a/versioned_docs/version-2.9/reference/goals/_category_.json +++ b/versioned_docs/version-2.9/reference/goals/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/goals", "title": "Goals" - } + }, + "position": 2 } diff --git a/versioned_docs/version-2.9/reference/subsystems/_category_.json b/versioned_docs/version-2.9/reference/subsystems/_category_.json index 6b56feea7..889bdbe9b 100644 --- a/versioned_docs/version-2.9/reference/subsystems/_category_.json +++ b/versioned_docs/version-2.9/reference/subsystems/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/subsystems", "title": "Subsystems" - } + }, + "position": 3 } diff --git a/versioned_docs/version-2.9/reference/targets/_category_.json b/versioned_docs/version-2.9/reference/targets/_category_.json index 138b55dc1..696b76925 100644 --- a/versioned_docs/version-2.9/reference/targets/_category_.json +++ b/versioned_docs/version-2.9/reference/targets/_category_.json @@ -4,5 +4,6 @@ "type": "generated-index", "slug": "/reference/targets", "title": "Targets" - } + }, + "position": 4 } diff --git a/versioned_docs/version-2.9/reference/targets/files.mdx b/versioned_docs/version-2.9/reference/targets/files.mdx index 15a168db6..110a401fe 100644 --- a/versioned_docs/version-2.9/reference/targets/files.mdx +++ b/versioned_docs/version-2.9/reference/targets/files.mdx @@ -76,13 +76,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.json": {"description": "our customer model"]}, -"bar.json": {"description": "our product model"]}, -("foo.json", "bar.json"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.json": {"description": "our customer model"]}, + "bar.json": {"description": "our product model"]}, + ("foo.json", "bar.json"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.9/reference/targets/protobuf_sources.mdx b/versioned_docs/version-2.9/reference/targets/protobuf_sources.mdx index 65e1e6d6b..2e3e67f74 100644 --- a/versioned_docs/version-2.9/reference/targets/protobuf_sources.mdx +++ b/versioned_docs/version-2.9/reference/targets/protobuf_sources.mdx @@ -73,13 +73,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.proto": {"grpc": True]}, -"bar.proto": {"description": "our user model"]}, -("foo.proto", "bar.proto"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.proto": {"grpc": True]}, + "bar.proto": {"description": "our user model"]}, + ("foo.proto", "bar.proto"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.9/reference/targets/python_sources.mdx b/versioned_docs/version-2.9/reference/targets/python_sources.mdx index b10a585f3..881b1487b 100644 --- a/versioned_docs/version-2.9/reference/targets/python_sources.mdx +++ b/versioned_docs/version-2.9/reference/targets/python_sources.mdx @@ -83,13 +83,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.py": {"skip_pylint": True]}, -"bar.py": {"skip_flake8": True]}, -("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.py": {"skip_pylint": True]}, + "bar.py": {"skip_flake8": True]}, + ("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.9/reference/targets/python_test_utils.mdx b/versioned_docs/version-2.9/reference/targets/python_test_utils.mdx index 8108ad9eb..281136fa0 100644 --- a/versioned_docs/version-2.9/reference/targets/python_test_utils.mdx +++ b/versioned_docs/version-2.9/reference/targets/python_test_utils.mdx @@ -83,13 +83,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.py": {"skip_pylint": True]}, -"bar.py": {"skip_flake8": True]}, -("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.py": {"skip_pylint": True]}, + "bar.py": {"skip_flake8": True]}, + ("foo.py", "bar.py"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.9/reference/targets/python_tests.mdx b/versioned_docs/version-2.9/reference/targets/python_tests.mdx index 7d5c3637d..954963a44 100644 --- a/versioned_docs/version-2.9/reference/targets/python_tests.mdx +++ b/versioned_docs/version-2.9/reference/targets/python_tests.mdx @@ -105,13 +105,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo_test.py": {"timeout": 120]}, -"bar_test.py": {"timeout": 200]}, -("foo_test.py", "bar_test.py"): {"tags": ["slow_tests"]}, -} -``` +``` +overrides={ + "foo_test.py": {"timeout": 120]}, + "bar_test.py": {"timeout": 200]}, + ("foo_test.py", "bar_test.py"): {"tags": ["slow_tests"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.9/reference/targets/resources.mdx b/versioned_docs/version-2.9/reference/targets/resources.mdx index ecc9da849..b24da95af 100644 --- a/versioned_docs/version-2.9/reference/targets/resources.mdx +++ b/versioned_docs/version-2.9/reference/targets/resources.mdx @@ -76,13 +76,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.json": {"description": "our customer model"]}, -"bar.json": {"description": "our product model"]}, -("foo.json", "bar.json"): {"tags": ["overridden"]}, -} -``` +``` +overrides={ + "foo.json": {"description": "our customer model"]}, + "bar.json": {"description": "our product model"]}, + ("foo.json", "bar.json"): {"tags": ["overridden"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.9/reference/targets/shell_sources.mdx b/versioned_docs/version-2.9/reference/targets/shell_sources.mdx index 4175f13f4..70889ae04 100644 --- a/versioned_docs/version-2.9/reference/targets/shell_sources.mdx +++ b/versioned_docs/version-2.9/reference/targets/shell_sources.mdx @@ -62,13 +62,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo.sh": {"skip_shellcheck": True]}, -"bar.sh": {"skip_shfmt": True]}, -("foo.sh", "bar.sh"): {"tags": ["linter_disabled"]}, -} -``` +``` +overrides={ + "foo.sh": {"skip_shellcheck": True]}, + "bar.sh": {"skip_shfmt": True]}, + ("foo.sh", "bar.sh"): {"tags": ["linter_disabled"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field. diff --git a/versioned_docs/version-2.9/reference/targets/shunit2_tests.mdx b/versioned_docs/version-2.9/reference/targets/shunit2_tests.mdx index 177660306..b9042b692 100644 --- a/versioned_docs/version-2.9/reference/targets/shunit2_tests.mdx +++ b/versioned_docs/version-2.9/reference/targets/shunit2_tests.mdx @@ -62,13 +62,13 @@ Expects a dictionary of relative file paths and globs to a dictionary for the ov For example: -``` -overrides={ -"foo_test.sh": {"timeout": 120]}, -"bar_test.sh": {"timeout": 200]}, -("foo_test.sh", "bar_test.sh"): {"tags": ["slow_tests"]}, -} -``` +``` +overrides={ + "foo_test.sh": {"timeout": 120]}, + "bar_test.sh": {"timeout": 200]}, + ("foo_test.sh", "bar_test.sh"): {"tags": ["slow_tests"]}, +} +``` File paths and globs are relative to the BUILD file's directory. Every overridden file is validated to belong to this target's `sources` field.