Add option to skip posting of records to curated area, if a "similar" record already exists #37

Merged
cmo merged 7 commits from post-only-changed into master 2026-03-31 15:08:13 +00:00

7 commits

Author SHA1 Message Date
Christian Monch
23714d4f8f add tests for --only-if-modifying in auto-curate
All checks were successful
Test execution / Test-all (push) Successful in 37s
2026-03-31 17:05:16 +02:00
Christian Monch
1ebc58f38c add tests for --only-if-modifying in post_records
All checks were successful
Test execution / Test-all (push) Successful in 37s
2026-03-31 10:12:08 +02:00
Christian Monch
ccf810aec7 replace --ignore-spec with --jsonpath-spec
All checks were successful
Test execution / Test-all (push) Successful in 38s
Use `jsonpath_ng` to implement comparsion with
ignored record elements.
2026-03-30 22:00:51 +02:00
Christian Monch
4512c19d30 add --only-if-modifying to auto-curate
All checks were successful
Test execution / Test-all (push) Successful in 34s
2026-03-28 09:17:01 +01:00
Christian Monch
469da83534 fix help text of --only-if-modifying in post-records 2026-03-27 15:49:25 +01:00
Christian Monch
bd231d21de add --only-if-modifying option to post-records
All checks were successful
Test execution / Test-all (push) Successful in 33s
This commit adds the flag --only-if-modifying to
the dtc subcommand `post-records`. If `--curate`
is provided, it will check whether an identical
record already exists in the curated area of the
collection, and ---if the record already exists---
refuse to overwrite it.

Record matching can be "relaxed" by exluding
elements from the matching process. This can be
done using the option `--ignore-spec`.
2026-03-27 13:19:13 +01:00
Christian Monch
f0e3ad6eda add RecordComparer-class
All checks were successful
Test execution / Test-all (push) Successful in 33s
This commit adds the class RecordComparer. Instances
of this class can compare dictionaries, while
ignoring certain elements.

This can be useful, for example, to determine if
two records are equal, except for the content of
the key 'annotations'.
2026-03-27 09:58:54 +01:00