compwa_policy#
import compwa_policy
Bundled developer configurations and tools for ComPWA repositories.
This package provides the check-dev-files pre-commit
hook (and the policy CLI) that standardize and synchronize the developer
setup across the ComPWA repositories.
The command-line interface lives in compwa_policy.cli. This module only defines
the shared Arguments data model and a few string helpers; the Arguments object is
what the CLI builds and hands to the check dispatch in compwa_policy.cli._checks.
- class Arguments(allow_deprecated_workflows: bool, allow_labels: bool, allow_vscode_coverage_gutters: bool, allowed_cell_metadata: str, ci_skipped_tests: str, dev_python_version: PythonVersion, doc_apt_packages: str, environment_variables: str, excluded_python_versions: set[PythonVersion], github_pages: bool, gitpod: bool, imports_on_top: bool, keep_contributing_md: bool, keep_issue_templates: bool, keep_local_precommit: bool, keep_pr_linting: bool, keep_workflow, macos_python_version: PythonVersion | None, no_binder: bool, no_cd: bool, no_cspell_update: bool, no_github_actions: bool, no_milestones: bool, no_pypi: bool, no_ruff: bool, no_version_branches: bool, package_manager: PackageManagerChoice, pytest_single_threaded: bool, python: bool | None, repo_name: str, repo_organization: str, repo_title: str, type_checker: set[TypeChecker], upgrade_frequency: Frequency)[source]#
Bases:
objectResolved configuration shared by every check.
The policy CLI constructs this from its options (see
compwa_policy.cli._options.build_arguments).- dev_python_version: PythonVersion[source]#
- excluded_python_versions: set[PythonVersion][source]#
- macos_python_version: PythonVersion | None[source]#
- package_manager: PackageManagerChoice[source]#
- type_checker: set[TypeChecker][source]#
Submodules and Subpackages
- cli
- env
- format
- github
- nb
- python
- repo
- utilities
append_safe()contains_line()hash_file()read()write()remove_configs()rename_file()remove_lines()natural_sorting()update_file()get_nested_dict()- precommit
- pyproject
- cfg
- executor
- match
- python
- readme
- toml
- vscode
- yaml