Skip to content

add --exclude and tool.polylith.exclude #382

@fraser-langton

Description

@fraser-langton

We are using a different test structure that to the single test directory approach encouraged here, we are putting a tests dir in each module in a more package driven apprach, as a result poly check commands now complain that the test modules are not in the pyproject of projects.

I think the easiest and most generalised solution would be to allow configuration of the glob pattern poly searches to build the project space?

Ruff I think is a good example for config like this

poly info --exclude "**/tests/**"

# Multiple exclusions
poly check \
  --exclude "**/test_*" \
  --exclude "**/tests/**" \
[tool.polylith]
namespace = "ns"
git_tag_pattern = "stable-*"

# Add exclude patterns for Polylith commands
exclude = [
    "**/test_*",
    "**/tests/**",
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions