Pants Build System

website·Indexed 35 days ago

https://www.pantsbuild.org

A build system providing support for multiple languages including Python, Go, Shell, and Scala. The documentation covers target definitions, subsystems, and goals for managing dependencies, running tests, and deploying applications, with references for versions 2.31, 2.33, and 2.34 (dev).

Tokens
1.2M
Snippets
7.9K
Records
10.6K
Agent score
65%

What's inside Pants

  1. Overview of the helm-post-renderer subsystem

    The helm-post-renderer subsystem is used to perform modifications to the final output produced by Helm charts after they have been fully rendered. By default, this subsystem uses yamlpath version 3.8.2. The associated backend is pants.backend.experimental.helm.check.kubeconform and configuration is managed under the [helm-post-renderer] section in pants.toml.
  2. Overview of the Pants yamllint subsystem

    The yamllint subsystem provides a linter for YAML files. By default, Pants uses yamllint version 1.37.1. To use this subsystem, enable the backend pants.backend.experimental.tools.yamllint. Configuration is managed under the [yamllint] section in pants.toml.
  3. Overview of the helm-post-renderer subsystem

    The helm-post-renderer subsystem is used to perform modifications to the final output produced by Helm charts after they have been fully rendered. By default, this version of Pants uses yamlpath version 3.8.2. The subsystem is associated with the backend pants.backend.experimental.helm.check.kubeconform and is configured under the [helm-post-renderer] section in pants.toml.
  4. Overview of Remote Execution in Pants

    Remote execution allows Pants to offload process execution to a remote server that complies with the Remote Execution API (REAPI) standard.

    Important Constraints:

    • Support is currently experimental.
    • The server's operating system must match the client's operating system. Because most REAPI servers only operate on Linux, Pants must be running on Linux to use this feature.
  5. Overview of MyPy integration in Pants

    Pants integrates the MyPy Python type checker using the pants.backend.python.typecheck.mypy backend. By default, it uses mypy version 1.20.2. Configuration for this subsystem is managed under the [mypy] section of the pants.toml file.
  6. Overview of Semgrep integration in Pants

    Pants provides lightweight static analysis using Semgrep. It automatically discovers configuration files (.semgrep.yml, .semgrep.yaml, or .yml/.yaml files within .semgrep/ directories) and runs Semgrep against all targets known to Pants. By default, Pants uses Semgrep version 1.79.0.

    • Backend: pants.backend.experimental.tools.semgrep
    • Config section: [semgrep]
  7. Overview of the Pants preamble subsystem

    The preamble subsystem formats files by adding a preamble (such as copyright headers or shebang lines) based on the file path. It supports dynamic substitutions using Python's string.Template syntax, specifically $year which is replaced by the current year when writing to a file. The subsystem is managed via the [preamble] config section and uses the pants.backend.tools.preamble backend.
  8. Overview of the Pants preamble subsystem

    The preamble subsystem formats files with a preamble (e.g., copyright headers or shebang lines) looked up based on the file path. It supports Python-style string.Template substitutions, specifically $year, which is replaced with the current year when writing to the file. The subsystem is managed via the pants.backend.tools.preamble backend and the [preamble] configuration section.
  9. Overview of Pytype integration in Pants

    Pants integrates the Pytype utility for typechecking Python code. By default, Pants 2.32 uses pytype version 2024.9.13. The subsystem is powered by the backend pants.backend.experimental.python.typecheck.pytype and is configured under the [pytype] section in pants.toml.
  10. Overview of shfmt autoformatter in Pants

    The shfmt subsystem provides an autoformatter for shell scripts using the shfmt tool. It is enabled via the pants.backend.shell.lint.shfmt backend and configured under the [shfmt] section in pants.toml.
  11. Overview of pydocstyle integration in Pants

    Pants provides a subsystem for pydocstyle to check compliance with Python docstring conventions. By default, Pants 2.32 uses pydocstyle version 6.3.0. The subsystem is enabled via the pants.backend.python.lint.pydocstyle backend and configured under the [pydocstyle] section in pants.toml.