Releases: rsundqvist/id-translation
Releases · rsundqvist/id-translation
Release v0.12.2
Fixed
- Fix typehint in
Translator.translated_names()
. - Fix
file
note in exceptions raised byMultiFetcher
children.
Release v0.12.1
Fixed
- Filter children by sources in
MultiFetcher.fetch_all()
.
Release v0.12.0
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
toAbstractFether
. Default isignore
forMemoryFetcher
. - 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
Fixed
- Fix crash when using
deepclone
dMultiFetcher
instances (again).
Release v0.11.0
Added
- Implemented
SqlFetcher.__deepclone__()
.
Deprecated
- Parameter
inplace
; usecopy
instead. - Parameter
maximal_untranslated_fraction
; usemax_fails
instead.
Fixed
- Fix crash when using
deepclone
dMultiFetcher
instances. - Fix crash when object-type ID collections contain
NaN/None
values.
Release v0.10.2
Fixed
- Fix crash on import with
rics>=4.1.0
.
Release v0.10.1
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
Added
- Added integration for polars.DataFrame.
- Added integration for dask.DataFrame and Series.
Changed
- Consume
[transform]
-sections in auxiliary configuration files (#231). - Added typehints to
dio.DataStructureIO
and otherid_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
Added
- Added new utility
utils.translation_helper.TranslationHelper
. - Added several new
TypedDict
types totranslator_typing
. - Added
Translator.translate
overloads. Catch-all overload forreverse=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()
andgo_offline()
now expose arguments (such as
maximal_untranslated_fraction
) that were previously limited totranslate()
. - 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 inTranslator.fetch()
andgo_offline()
. - Untranslated IDs should now never be
None
- ensure a validFormat
is always available. - Raise
ValueError
when using positional placeholders inFormat
. This used to be a silent error.
Release v0.8.0
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 baseTranslator
implementation. - Added support for simplified
Translator.fetcher
arguments on the form{source: {id: name}}
.
Changed
- Python minimum version is now
3.11
(was3.8
). - Minimum
pandas
version is now2.0.3
(was1.1.0
). - Minimum
sqlalchemy
version is now2.0.5
(was1.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 newUnmappedValuesError(MappingError)
or
warnUnmappedValuesWarning(MappingWarning)
(used to raise parent types directly). Add hints to warning message.