0.6.0 (November 29, 2023)#

Added#

  • The Translate.translate()-method now has overloads for improved typing.

  • User-defined ID and translation transformation framework: id_translation.transform.

  • Bitmask translation support: id_translation.transform.BitmaskTransformer.

  • Serialization methods for TranslationMap: to_dicts(), to_pandas(), from_pandas(). Translations maps are returned by Translator.fetch() and the cache attribute.

Changed#

  • Make Translator.translated_names() optionally return a mapping dict instead of just names.

  • Caching data for the AbstractFether has been updated.

    • Reduce the amount of excess data stored (now: records only).

    • Store records per source instead of all sources in the same .pkl-file.

  • Improve handling for UUID-like IDs. Fetcher implementations now respect Translator settings with regard to UUID mitigations.

  • Update SqlFetcher:

    • No longer uses table sizes. This could be expensive for large tables.

    • Simplify selection filtering; now only uses SqlFetcher.select_where() instead of two separate methods.

    • Add special handling of UUIDs when SQLAlchemy<2.

  • Renamed Translator.store() -> Translator.go_offline().

  • Change Translator.default_fmt to Format("<Failed: id={id!r}>") (was None).

Fixed#

  • Fixed issues in Format:

    • Fixed rendering of {id} when used in fallback format.

    • Fixed rendering of escaped curly brackets {{literal-text}}.

    • Convert optional blocks without placeholders to literal text.

  • The PandasFetcher now properly handles remote filesystems.

Removed#

  • Attribute translation is no longer support. Translator.allow_name_inheritance attribute as been removed, as well as the Translator.translate(attribute)-argument.

  • The Translator.from_config(clazz)-argument (always use cls instead).