Kuha Client Changelog
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/ExtLink
text 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/@vocabURI
and/codeBook/stdyDscr/method/dataColl/collMode/concept/@vocabURI
correctly. (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-path
is now renamed to--file-cache
. Usage remains the same.Option
--remove-absent
is now renamed to--no-remove
. Usage is reversed: the sync entrypoint default is to remove absent records. The flag--no-remove
changes 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_sync
orpython -m kuha_client.sync
Drop
--source-file-type
configuration. 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_delete
to 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.AsyncKuhaClient
since 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