Skip to content

Releases: rsundqvist/id-translation

Release v0.12.2

16 Oct 21:59
Compare
Choose a tag to compare

Fixed

  • Fix typehint in Translator.translated_names().
  • Fix file note in exceptions raised by MultiFetcher children.

Release v0.12.1

28 Sep 12:44
Compare
Choose a tag to compare

Fixed

  • Filter children by sources in MultiFetcher.fetch_all().

Release v0.12.0

28 Sep 10:08
Compare
Choose a tag to compare

Added

  • Property TranslationMap.len_per_source.

Changes

  • Improve PandasIO performance (~4x faster for large datasets).
  • Typing updates (notably numpy 2.0).
  • Added concurrent_operation_action=raise|ignore to AbstractFether. Default is ignore for MemoryFetcher.
  • Implementations that override SqlFetcher.select_where() no longer have to call the supermethod to ensure that IDs
    are filtered.

Fixed

  • The Translator.go_offline(translatable=None)-method now respects given names arguments.

Removed

  • The AbstractFetcher now longer provides a caching implementation. Provides overridable methods instead.

Release v0.11.1

17 Jun 21:33
Compare
Choose a tag to compare

Fixed

  • Fix crash when using deepcloned MultiFetcher instances (again).

Release v0.11.0

16 Jun 20:31
Compare
Choose a tag to compare

Added

  • Implemented SqlFetcher.__deepclone__().

Deprecated

  • Parameter inplace; use copy instead.
  • Parameter maximal_untranslated_fraction; use max_fails instead.

Fixed

  • Fix crash when using deepcloned MultiFetcher instances.
  • Fix crash when object-type ID collections contain NaN/None values.

Release v0.10.2

28 May 19:56
Compare
Choose a tag to compare

Fixed

  • Fix crash on import with rics>=4.1.0.

Release v0.10.1

17 Apr 20:23
Compare
Choose a tag to compare

Fixed

  • Rewrite the Override-only mapping
    subsection in the mapping primer. Improve clarity and fix some confusing sentences.
  • Improved exception handling in the MultiFetcher; add notes to identify raising child.

Release v0.10.0

08 Apr 20:59
Compare
Choose a tag to compare

Added

Changed

  • Consume [transform]-sections in auxiliary configuration files (#231).
  • Added typehints to dio.DataStructureIO and other id_translation.dio classes and functions.
  • Added functions and methods to make creating new DataStructureIO implementations easier.

Fixed

  • Verify top-level sections in auxiliary configuration files.

Release v0.9.0

28 Mar 01:40
Compare
Choose a tag to compare

Added

  • Added new utility utils.translation_helper.TranslationHelper.
  • Added several new TypedDict types to translator_typing.
  • Added Translator.translate overloads. Catch-all overload for reverse=True.
  • Added many new in-line examples to class, function and module docstrings. Updated and corrected or clarified several
    docstrings which were poorly worded or outdated.

Changed

  • Methods Translator.fetch() and go_offline() now expose arguments (such as
    maximal_untranslated_fraction) that were previously limited to translate().
  • Improve when a maximal_untranslated_fraction is in use.
  • The Format class is now callable for convenience (keyword only).

Fixed

  • Return copy in TranslationMap.name_to_source - consistent with similar properties.
  • Handle dict names properly in Translator.fetch() and go_offline().
  • Untranslated IDs should now never be None - ensure a valid Format is always available.
  • Raise ValueError when using positional placeholders in Format. This used to be a silent error.

Release v0.8.0

23 Mar 15:36
Compare
Choose a tag to compare

Added

  • Python 3.12 is now fully tested and supported in CI/CD.
  • New module translator_typing. Useful especially users who which to extend the base Translator implementation.
  • Added support for simplified Translator.fetcher arguments on the form {source: {id: name}}.

Changed

  • Python minimum version is now 3.11 (was 3.8).
  • Minimum pandas version is now 2.0.3 (was 1.1.0).
  • Minimum sqlalchemy version is now 2.0.5 (was 1.4.16).
  • Updated base exceptions for several id_translation.*.exceptions-members:
    • DataStructureIOError: RuntimeError -> TypeError
    • ConfigurationError: ValueError -> TypeError
    • ConnectionStatusError: ValueError -> ConnectionError
    • TranslationError: ValueError -> Exception
    • MappingError: ValueError -> Exception
  • Make unmapped_values_action != 'ignore' actions more specific: Raise new UnmappedValuesError(MappingError) or
    warn UnmappedValuesWarning(MappingWarning) (used to raise parent types directly). Add hints to warning message.