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.
- TomlFormatter#
TOML formatters supported by the policy framework.
alias of
Literal[‘taplo’, ‘tombi’]
- class Arguments(allow_deprecated_workflows: bool, allow_labels: bool, allow_vscode_coverage_gutters: bool, allowed_cell_metadata: str, autofix_ci: bool, branch_coverage: bool, ci_skipped_tests: str, dependabot_assignees: list[str], dependabot_ecosystems: set[DependabotEcosystem] | None, dev_python_version: PythonVersion, doc_apt_packages: str, docstrfmt: bool, environment_variables: str, excluded_dependencies, excluded_python_versions: set[PythonVersion], github_pages: bool, gitpod: bool, imports_on_top: bool, keep_contributing_md: bool, keep_issue_templates: bool, keep_pr_linting: bool, keep_workflow, macos_python_version: PythonVersion | None, macos_runner: MacosRunnerLabel | None, windows_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, release_name_template: str, tag_prefix: str, tombi_errors_on_warnings: bool, toml_formatter: TomlFormatter, toml_formatter_configured: bool, type_checker: set[TypeChecker], ubuntu_runner: UbuntuRunnerLabel | None, upgrade_frequency: UpgradeFrequency)[source]#
Bases:
objectResolved configuration shared by every check.
The policy CLI constructs this from its options (see
compwa_policy.cli._options.build_arguments).- dependabot_ecosystems: set[DependabotEcosystem] | None[source]#
- dev_python_version: PythonVersion[source]#
- excluded_python_versions: set[PythonVersion][source]#
- macos_python_version: PythonVersion | None[source]#
- macos_runner: MacosRunnerLabel | None[source]#
- windows_python_version: PythonVersion | None[source]#
- package_manager: PackageManagerChoice[source]#
- toml_formatter: TomlFormatter[source]#
- type_checker: set[TypeChecker][source]#
- ubuntu_runner: UbuntuRunnerLabel | None[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()add_to_gitignore()natural_sorting()update_file()get_nested_dict()- precommit
- pyproject
PyprojectModifiablePyprojectModifiablePyproject.load()ModifiablePyproject.dumps()ModifiablePyproject.dump()ModifiablePyproject.get_table()ModifiablePyproject.add_dependency()ModifiablePyproject.move_dependencies_to_group()ModifiablePyproject.remove_empty_dependency_groups()ModifiablePyproject.remove_dependency()ModifiablePyproject.changelog
ModifiablePixicomplies_with_subset()has_pyproject_package_name()has_dependency()get_constraints_file()load_pyproject_toml()- getters
- setters
- cfg
- check_hook
- collections
- match
- python
- readme
- resource
- session
- toml
- vscode
- yaml