Skip to main content

A tool to keep your configuration synced between repositories

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

copyist-0.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

copyist-0.1-py2.py3-none-any.whl (5.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file copyist-0.1.tar.gz.

File metadata

  • Download URL: copyist-0.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using 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.4

File hashes

Hashes for copyist-0.1.tar.gz
Algorithm Hash digest
SHA256 2f831e4117652fc9e7a62ef021c356ad92c78543dcef4a4f2b7a252da8da1387
MD5 d05c3ad943dfe6645da0ebb82cf05afa
BLAKE2b-256 25041f657c4ea274c881e2e6b9be97e38b2db64c57fe39ca1cbd8d8a9a79eaa0

See more details on using hashes here.

File details

Details for the file copyist-0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: copyist-0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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.4

File hashes

Hashes for copyist-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9e30e3994d74b982b8e9fe98606185c2169a83002577f3ace0a63b28beb45628
MD5 ad5697bf74a5f39b34678209ad24a66b
BLAKE2b-256 4046a248f607de9aa942d99701af3d50e27cbb5d6fb3c60eb1d01294c7742f41

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page