To make sure all your projects share the same configuration, add a [tool.copyist] section to the pyproject.toml file of your projects specifying the expected files and their generators.
For example, copyist’s isort configuration is synced from examples/isort.py policy as specified in its pyproject.toml:
[tool.copyist] [tool.copyist.context] package_name = "copyist" [tool.copyist.files] "pyproject.toml" = ["examples.isort.apply_config"]
Configuration
[tool.copyist.files] section lists the files to generate/keep synced with their list of generators to apply.
Each generator is a function taking as argument the previous content of the file and an optional context specified in [tool.copyist.context] section.
The generators are generally provided by an other Python package specifying your expected configuration.
Command line options
You can list them by running copyist --help:
usage: copyist [-h] [--version] [--config CONFIG] [--verbose] [--dry-run]
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--config CONFIG, -c CONFIG
Configuration file (defaults to pyproject.toml)
--verbose, -v Show the diff produced at each stage
--dry-run Do not overwrite files
Helpers
Currently only copyist.helpers.fill_tool_section(previous_content, tool_name, section_text) is available to help fill pyproject.toml with the different tools’ configurations.
Release files for copyist 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| copyist-0.3.tar.gz | 5.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| copyist-0.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 11.0 kB
Release files / copyist-0.3.tar.gz
| Download URL | copyist-0.3.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
850bbceee959c368d616dfea4ec7b40efe89f2c6071e4b27a1c2f6219d1f677f
|
|
BLAKE2b-256 checksum How to use checksums |
7f5a69a2567a76b8c90ea25e93d62be635a47a2f87bc6cf2caf23ea406004e6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5
|
Release files / copyist-0.3-py2.py3-none-any.whl
| Download URL | copyist-0.3-py2.py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
cbac597397c3a7cf65c54696c473ea31e5c76d2b8b15c6af6f04c3795dacffd0
|
|
BLAKE2b-256 checksum How to use checksums |
126a7d4f49d403e95464a81248736412d42e312b35f4e066f1ac3f4c85db8d65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5
|