"""Canonical, import-light Cadrumo product identity vocabulary.This module is the single runtime authority for names that identify theapplication. :data:`PRODUCT_IDENTITY` projects the accepted CADRUMO tuple intoan immutable, import-light value.``AEAT`` remains correct when it denotes the Agencia Estatal de AdministracionTributaria, its portals, protocols, credentials, official artefacts, legalprovenance, or registry classifications. It is not a former-product alias.Conversely, every product surface uses the CADRUMO values below; this moduleprovides no legacy spelling, compatibility lookup, or fallback."""from__future__importannotationsimportrefromtypingimportFinal,NamedTuple
[docs]classProductIdentity(NamedTuple):"""Immutable names that jointly identify the Cadrumo product. ``repository`` is the owner-qualified source repository slug. """display_name:strprose_name:strpython_package:strdistribution:strcli_executable:strrepository:strplugin_identifier:strenvironment_prefix:strcompanion_distributions:tuple[str,str]companion_namespace:str
PRODUCT_IDENTITY:Final[ProductIdentity]=ProductIdentity(display_name="CADRUMO",prose_name="Cadrumo",python_package="cadrumo",distribution="cadrumo",cli_executable="aeat",repository="nevenincs/cadrumo",plugin_identifier="cadrumo",environment_prefix="CADRUMO_",companion_distributions=("cadrumo-data-manuals","cadrumo-data-official"),companion_namespace="cadrumo_data",)#: Short legal name retained only for the external tax authority referent.AEAT_AUTHORITY_SHORT_NAME:Final[str]="AEAT"_STALE_CLI_EXECUTABLE_RE=re.compile(r"\bcadrumo(?=[ \t\r\n]+(?:app|config|manual|--|<))")
[docs]defnormalise_product_identity_references(value:str)->str:"""Replace only stale human command prefixes with the canonical executable."""return_STALE_CLI_EXECUTABLE_RE.sub(PRODUCT_IDENTITY.cli_executable,value)