class PromoteSettings(LoggerSettings):
"""Configuration for the NCBI FTP file promotion pipeline."""
model_config: SettingsConfigDict = default_settings_with_shortcuts(cli_prog_name=PIPELINE_NAME)
staging_bucket: PurePosixPath = Field(
default=DEFAULT_STAGING_BUCKET,
description="Bucket where staged files are located after download",
)
destination_bucket: PurePosixPath = Field(
default=DEFAULT_DESTINATION_BUCKET,
description="Bucket to which staged files will be promoted.",
)
staging_path: PurePosixPath = Field(
description="Path to folder in the staging bucket where staged files are located; Should contain `raw_data/` folder",
validation_alias=AliasChoices("s", "staging_path"),
)
destination_path: PurePosixPath = Field(
default=DEFAULT_DESTINATION_PREFIX,
description="Path to folder in the destination bucket where files will be promoted to; Will contain `raw_data/` folder",
)
removed_manifest_path: Path | None = Field(
default=None,
description="Local filesystem path to the removed files manifest from Phase 1, or None to skip archiving removed records",
validation_alias=AliasChoices("r", "removed-manifest", "removed_manifest"),
)
updated_manifest_path: Path | None = Field(
default=None,
description="Local filesystem path to the updated files manifest from Phase 1, or None to skip archiving updated records",
validation_alias=AliasChoices("u", "updated-manifest", "updated_manifest"),
)
transfer_manifest_path: PurePosixPath | None = Field(
default_factory=lambda settings: settings["staging_path"] / DEFAULT_TRANSFER_MANIFEST_FILE,
description="S3 object key of the transfer manifest to trim after promotion, or None to skip pruning staged files",
validation_alias=AliasChoices("t", "transfer-manifest", "transfer_manifest"),
)
dry_run: CliImplicitFlag[bool] = Field(
default=False,
description="Log actions without making changes",
)