Kuha Client Changelog
1.7.0 (2026-03-06)
Added
Map DDI-C
/codeBook/docDscr/notestoStudy.document_description_notes. (Implements #30)Map DDI-C
/codeBook/docDscr/notes/ExtLink@URItoStudy.document_description_notes.attr_external_link_uri. (Implements #30)FileLoggingCache supports invalidating. (Implements #28) Invalidation renders all previously cached records invalid, and results in a full sync to repopulate cache. Cache file contents are automatically invalidated when:
document store has no records for collection but cache has previously stored records for collection.
records are deleted using kuha_delete.
schema versions differ with records in running environment and document store. Kuha Common record models do not yet support changing record schema versions. More work is required to make this work reliably.
Support reading DDI 3.2 XML files. (Implements #25)
Add support for Python 3.13. (Implements #27)
Add support for Python 3.14. (Implements #31)
Use black to format source code. Note that this results in a huge diff, event though the behaviour of the code stays the same. (Implements #29)
Removed
Changed
Migrate CI-system away from Jenkins & SonarQube to Gitlab-CI. (Implements #26)
1.6.0 (2024-11-29)
Added
Support more DDI-C elements. (Implements #24)
Map DDI-C
/codeBook/stdyDscr/citation/distStmt/distDatetoStudy.distribution_dates.Map DDI-C
/codeBook/stdyDscr/method/dataColl/resInstrutoStudy.research_instruments.Map DDI-C
/codeBook/stdyDscr/dataAccs/useStmt/conditions/@elementVersiontoStudy.data_access_descriptions.attr_element_versionMap DDI-C
/codeBook/stdyDscr/stdyInfo/sumDscr/collDateCDATA toStudy.collection_periods.attr_description.
Changed
Update dependencies in requirements.txt:
ConfigArgParse 1.7
Kuha Common 2.6.0
Treat warnings as errors when testing with tox.
1.5.0 (2024-08-22)
Maintenance release due to support for newest Python releases.
Added
Run tests with Python 3.11 & Python 3.12 in CI.
Changes
requirements.txt: Update tornado to 6.4.1. Tornado 6.4.0 is the first release to officially support Python 3.12 without leading to any DeprecationWarnings.
requirements.txt: Update Kuha Common to 2.5.0.
requirements.txt: Update Py12fLogging to 0.7.0 to get rid of setuptools dependency.
1.4.0 (2024-04-25)
Maintenance release due to move to https://gitlab.tuni.fi/fsd/kuha_client.
Changed
Hosting platform changed from bitbucket.org to gitlab.tuni.fi. Update documentation & requirements.txt accordingly.
1.3.0 (2024-03-15)
Added
Map DDI-C
/codeBook/stdyDscr/citation/rspStmt/AuthEnty/ExtLinkto Study.principal_investigator attributesexternal_link,external_link_uri,external_link_roleandexternal_link_title.
Changed
Require Kuha Common 2.3.0 in requirements.txt and setup.py.
When DDI-C parser encounters a DDI file with relPubl/citation that has no titlStmt/titl child, log a warning and discard the invalid relPubl/citation element. The previous behaviour was to stop processing the file.
1.2.2 (2022-11-29)
Changed
Require Kuha Common 2.1.0 in requirements.txt and setup.py.
Fixed
Do not include
/codeBook/stdyDscr/citation/rspStmt/AuthEnty/ExtLinktext content toStudy.principal_investigators.principal_investigator. (Fixes #23)
Note
After upgrade the file-cache should be removed to make sure all files are re-read and saved to Document Store.
1.2.1 (2022-11-21)
Changed
Require Kuha Common 2.0.1 in requirements.txt and setup.py.
Fixed
Read DDI-Codebook XML from
/codeBook/stdyDscr/stdyInfo/sumDscr/anlyUnit/concept/@vocabURIand/codeBook/stdyDscr/method/dataColl/collMode/concept/@vocabURIcorrectly. (Fixes #22)
Note
After upgrade the file-cache should be removed to make sure all files are re-read and saved to Document Store.
1.2.0 (2022-10-25)
Added
Support Study attributes containing grant & funding information and identifiers for related publications. (Implements #21)
Changed
Require Kuha Common 2.0.0.
Use asyncio.run() instead of Tornado’s ioloop to execute coroutines.
Update dependencies in requirements.txt.
tornado==6.2.0
py12flogging==0.5.0
1.1.0 (2022-06-29)
Added
Support DDI 3.3 study-level metadata as input format. (Implements #20)
1.0.0 (2022-03-16)
Added
Entrypoint kuha_client.sync replaces the old kuha_upsert and kuha_import entrypoints. The entrypoint gets installed as a script named
kuha_sync. The sync entrypoint automatically chooses which DDI Record Parser is used based on XML root element.Entrypoint kuha_client.kuha_delete gets installed as a script named
kuha_delete.Support logical deletions. Synchronization process always uses logical deletions. Delete process provides a configuration option to select delete type.
Introduce sync entrypoint option
--no-fail-on-parse, which makes the synchronization process more fault tolerant. When enabled, the process will not stop in case a file cannot be parsed. Instead an error will be logged and processing will continue with the next file in the batch. This option might be useful if a folder might contain files that are not valid DDI. (Implements #13)
Changed
Require Kuha Common 1.0.0 or newer.
Option
--file-log-pathis now renamed to--file-cache. Usage remains the same.Option
--remove-absentis now renamed to--no-remove. Usage is reversed: the sync entrypoint default is to remove absent records. The flag--no-removechanges the behaviour so that no records get removed during the sync-process.Include filepath to error message, if an exception is raised while processing a file. (Fixes #12)
Contains plenty of API changes to make the package more modular:
kuha_client.py module contents are moved into package init: __init__.py.
There is now a Cache class which keeps a record of all changes in a single batch.
FileLoggingCache is a subclass of Cache that handles the functionality that previously was achieved by FileLog-class.
Record processing is wrapped in CollectionMethods-class. The package init contains an abstract base of this class. Local implementations are defined in impl.py. This way the building of customized clients is easier since they are not tied in Kuha Common record classes.
BatchProcessor is decoupled from record processing via collection_methods parameter, which contains all record processing functionality and is given to the BatchProcessor upon initializing.
BatchProcessor is decoupled from record parsers via parsers parameter, which contain all parsing functionality and is given to the BatchProcessor upon initializing.
BatchProcessor supports arbitrary cache functionality that bases on kuha_client.Cache via subclassing. The arbitrary cache is given to BatchProcessor upon initializing.
Update dependencies in requirements.txt.
tornado==6.1.0
configargparse==1.5.3
Removed
Drop module kuha_import.py. Kuha Document Store no longer features an import API.
Drop module kuha_upsert.py. Similar functionality is now wrapped in sync.py module, callable via
kuha_syncorpython -m kuha_client.syncDrop
--source-file-typeconfiguration. The sync entrypoint automatically chooses which DDI Record Parser is used based on XML root element.
0.10.0 (2021-09-06)
Ensure future compatibility with CESSDA Data Catalogue by adding kuha_common 0.15.1 to requirements.txt.
Drop tests with Python interpreters below py38. Add test environment py39.
0.9.0 (2020-06-12)
Support Python 3.8
requirements.txt: kuha_common 0.14.0.
0.8.0 (2020-05-06)
requirements.txt: kuha_common 0.13.0. Upgrading brings in support for Study.related_publications.
0.7.0 (2020-04-29)
Project source code management changed to git. Does not contain code changes to Client.
INSTALL.rst now instructs to use Git instead of Mercurial.
requirements.txt: kuha_common 0.12.0
0.6.1 (2020-01-24)
requirements.txt: require kuha_common 0.11.2, which fixes a bug in updating record values.
0.6.0 (2020-01-10)
Warning
Breaks backwards compatibility in DDI 1.2.2. and DDI 2.5. mapping of attributes for
Study.study_groups.study_group and StudyGroup.study_group_identifier.
See Kuha Common changelog for more information.
Kuha Common 0.10.0 introduces new attributes for Study and StudyGroup records.
Use latest Kuha Common 0.11.1 as a requirement.
Change end2end test dummydata since Kuha Common 0.10.0 introduces backwards incompatible changes to mapping of
StudyGroup.study_group_identifier. See Kuha Common changelog for more information.
Note
The running instance of Kuha Document Store must also support Kuha Common >= 0.10.0. for the Client to work. Users should upgrade if needed.
0.5.1 (2019-04-11)
Kuha Common 0.9.1 improves handling of empty XML elements. Use it as a requirement in requirements.txt.
Add end-to-end test to ensure empty elements are handled correctly on upsert.
Call
kuha_common.cli_setup.settings.setup_document_store_query()inkuha_client.kuha_deleteto set base url tokuha_common.document_store.query.Query(Fixes #10)
0.5.0 (2019-03-20)
Require kuha_common 0.9.0.
Remove
kuha_client.kuha_client.AsyncKuhaClientsince its functionality can now be achieved withkuha_common.document_store.client.JSONStreamClient. Refactor HTTP functions to use that instead.
Make sure Document Store errors are properly logged out. (Fixes #9)
Update copyright headers to 2019.
0.4.0 (2019-01-17)
Support for DDI 3.1
Require kuha_common 0.8.0
0.3.1 (2018-08-30)
Check that the ObjectId that gets logged is not one that has been deleted before adding the ObjectId to FileLog. (Fixes #8)
Add debug log messages.
0.3.0 (2018-07-19)
0.2.4 (2018-05-25)
Fix call for FileLog.add_id(). (Fixes #6)
0.2.3 (2018-05-22)
Fix regression introduced by 0.2.2. (Fixes #5)
0.2.2 (2018-05-21)
Fix removing of absent StudyGroups when using file log. (Fixes #4)
0.2.1 (2018-05-16)
Fix callable module prog paths from help message.
0.2.0 (2018-05-16)
Complete rewrite of application logic.
Add tests.
Support updating and deleting Document Store records.
Implement file log for keeping track of previously processed files.
Use clients from kuha_common.client rather than requests-module.
Update all documentation to match current behaviour.
0.1.2 (2017-11-10)
Update documentation: CHANGES.rst
0.1.1 (2017-10-27)
Update documentation: configuration.rst, running.rst
0.1.0 (2017-10-25)
Initial release