Skip to content

Configuration

The Polylith Workspace is configured using a workspace.toml file at the root of the workspace.

A default configuration is created when running the poly create workspace command (see the commands section).

As an alternative, you can put the configuration in the top pyproject.toml.

Example of a workspace configuration:

[tool.polylith]
namespace = "my_example_namespace"

[tool.polylith.structure]
theme = "loose"

[tool.polylith.tag.patterns]
stable = "stable-*"
release = "v[0-9]*"

[tool.polylith.resources]
brick_docs_enabled = false

[tool.polylith.test]
enabled = true

Tags

Check for changes since a tag. Configure the tag pattern.

The preferred way of defining tag patterns is:

[tool.polylith.tag.patterns]
stable = "stable-*"
release = "v[0-9]*"

By default, Polylith uses the -committerdate when fetching tags with the underlying git command. The sorting might be incorrect when using annotated tags. To solve this, you can configure the sorting.

Example, setting a different sorting option than the default:

[tool.polylith.tag]
sorting = ["-creatordate"]

Components and bases documentation

When brick_docs_enabeld = true, a README is added when creating a component or a base.

Testing

The create component and brick commands will also create corresponding unit tests when enabled = true in the test section of the workspace configuration.