Feature Description
It would be nice if codebook could parse the configuration from a pyproject.toml in the project directory. pyproject.toml allows for arbitrary tool configuration in the [tool] table.
Use Case
Python projects tend to centralize tools configuration in pyproject.toml.
Proposed Solution
- If
codebook.toml or .codebook.toml are not found in the project directory, look for a pyproject.toml.
- If
[tool.codebook] exists, parse it for configuration.
- It's expected that settings under
[tool.codebook] are the same as codebook.toml root.
Alternative Solutions
No response
Examples
The README.md Configuration Options in a pyproject.toml.
[tool.codebook]
dictionaries = ["en_us", "en_gb"]
words = ["codebook", "rustc"]
flag_words = ["todo", "fixme"]
include_paths = ["src/**/*.rs", "lib/**/*.rs"]
ignore_paths = ["target/**/*", "**/*.json", ".git/**/*"]
ignore_patterns = [
'\b[ATCG]+\b',
'\d{3}-\d{2}-\d{4}',
'^[A-Z]{2,}$',
'https?://[^\s]+'
]
min_word_length = 3
use_global = true
Additional Context
Example references:
Feature Description
It would be nice if codebook could parse the configuration from a
pyproject.tomlin the project directory.pyproject.tomlallows for arbitrary tool configuration in the[tool]table.Use Case
Python projects tend to centralize tools configuration in
pyproject.toml.Proposed Solution
codebook.tomlor.codebook.tomlare not found in the project directory, look for apyproject.toml.[tool.codebook]exists, parse it for configuration.[tool.codebook]are the same ascodebook.tomlroot.Alternative Solutions
No response
Examples
The README.md Configuration Options in a
pyproject.toml.Additional Context
Example references: