ape-compile
- class ape_compile.Config(_case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_ignore_empty: bool | None = None, _env_nested_delimiter: str | None = None, _env_parse_none_str: str | None = None, _env_parse_enums: bool | None = None, _cli_prog_name: str | None = None, _cli_parse_args: bool | list[str] | tuple[str, ...] | None = None, _cli_settings_source: CliSettingsSource[Any] | None = None, _cli_parse_none_str: str | None = None, _cli_hide_none_type: bool | None = None, _cli_avoid_json: bool | None = None, _cli_enforce_required: bool | None = None, _cli_use_class_docs_for_groups: bool | None = None, _cli_exit_on_error: bool | None = None, _cli_prefix: str | None = None, _secrets_dir: str | Path | None = None, *, exclude: set[Union[str, re.Pattern]] = {}, include_dependencies: bool = False, output_extra: list[ape_compile.OutputExtras] = [], **values: Any)
Configure general compiler settings.
- exclude: set[Union[str, re.Pattern]]
Source exclusion globs or regex patterns across all file types. To use regex, start your values with
r"
and they’ll be turned into regex pattern objects.NOTE:
ape.utils.misc.SOURCE_EXCLUDE_PATTERNS
are automatically included in this set.
- include_dependencies: bool
Set to
True
to compile dependencies duringape compile
. Generally, dependencies are not compiled duringape compile
This is because dependencies may not compile in Ape on their own, but you can still reference them in your project’s contracts’ imports. Some projects may be more dependency-based and wish to have the contract types always compiled duringape compile
, and these projects should configureinclude_dependencies
to beTrue
.
- output_extra: list[ape_compile.OutputExtras]
Extra selections to output. Outputs to
.build/{key.lower()}
.
- serialize_exclude(exclude, info)
Exclude is put back with the weird r-prefix so we can go to-and-from.