Skip to content

peek documentation example output is outdated/incomplete #20885

Closed
@huonw

Description

@huonw

Describe the bug

We have docs around the peek goal that include some example output: https://www.pantsbuild.org/2.20/docs/using-pants/project-introspection#peek---programmatically-inspect-a-target

This hasn't been updated for various changes (very easy to forget). For instance, running PANTS_VERSION=2.20.1 pants peek helloworld/greet:tests in https://github.com/pantsbuild/example-python gives:

[
  {
    "address": "helloworld/greet:tests",
    "target_type": "python_tests",
    "dependencies": [
      "helloworld/greet/greeting_test.py:tests"
    ],
    "description": null,
    "overrides": null,
    "skip_black": false,
    "skip_docformatter": false,
    "skip_flake8": false,
    "skip_isort": false,
    "skip_mypy": false,
    "sources": [
      "helloworld/greet/greeting_test.py"
    ],
    "sources_fingerprint": "2158e096d5ab63e537d88067b50a0274b83f6373143faf854d4a9adf5d01cf78",
    "sources_raw": [
      "test_*.py",
      "*_test.py",
      "tests.py"
    ],
    "tags": null
  }
]

This has various differences:

  • sources is now the actual file paths
  • source_fingerprint is a hash of the above
  • sources_raw is new

In 2.21, Running on a single file path has various new fields too, like goals.

Pants version
2.20, 2.21

OS
macOS

Additional info
N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions