This PR makes a number of modifications to the handling of DOI transactions within both the sqlite3 database and the transaction history on disk to better accommodate scheduled synchronizations with DataCite via cron.
The DOI service now checks to see if there are any changes between a current transaction and the last available record from the transaction history/database before committing. If there have been no changes, including in the stored DataCite JSON label, the transaction is ignored to avoid clogging the database with redundant transactions:
INFO __main__:perform_import_to_database Record for DOI 10.26007/xbsh-x639 (urn:nasa:pds:compil-comet:halebopp::1.0) has not changed, skipping...
INFO __main__:perform_import_to_database Record for DOI 10.26007/yr7t-1378 (DS1-C-IDS-3-RDR-BORRELLY-V1.0) has not changed, skipping...
INFO __main__:perform_import_to_database Record for DOI 10.26007/mwyz-6q32 (DS1-C-MICAS-5-BORRELLY-DEM-V1.0) has not changed, skipping...
INFO __main__:perform_import_to_database Record for DOI 10.26007/9dtm-ym89 (EAR-C-5-DDR-PCC-V1.0) has not changed, skipping...
Some updates have also been made to better accommodate DOI records submitted by SBN with their own prefixes.
This PR also address several bugs discovered in the service since the last release, including:
A fix to allow input spreadsheets to provide a "titles" column, instead of strictly enforcing "title"
A fix to the semantic version sorting done when attempting to derive the newest LIDVID from a list of identifiers associated to a record
⚙️ Test Data and/or Report
Unit tests have been updated to account for changes to transaction classes. Unit tests for transaction classes have been updated to test the new duplicate entry checks.
tox.log
♻️ Related Issues
Partially resolves #312 (cron script still to be developed and installed)
🗒️ Summary
This PR makes a number of modifications to the handling of DOI transactions within both the sqlite3 database and the transaction history on disk to better accommodate scheduled synchronizations with DataCite via cron.
The DOI service now checks to see if there are any changes between a current transaction and the last available record from the transaction history/database before committing. If there have been no changes, including in the stored DataCite JSON label, the transaction is ignored to avoid clogging the database with redundant transactions:
Some updates have also been made to better accommodate DOI records submitted by SBN with their own prefixes.
This PR also address several bugs discovered in the service since the last release, including:
⚙️ Test Data and/or Report
Unit tests have been updated to account for changes to transaction classes. Unit tests for transaction classes have been updated to test the new duplicate entry checks. tox.log
♻️ Related Issues
Partially resolves #312 (cron script still to be developed and installed)