Add --create-change-set and --post-change-set option to dtc-subcommand auto-curate #34

Merged
cmo merged 39 commits from change-set-2 into master 2026-03-10 01:14:09 +00:00

39 commits

Author SHA1 Message Date
Christian Monch
181813ab44 create a virtual environment before running tests
All checks were successful
Test execution / Test-all (push) Successful in 30s
2026-03-10 02:11:47 +01:00
Christian Monch
792f8195c3 install the package before running the tests
Some checks failed
Test execution / Test-all (push) Failing after 18s
2026-03-10 02:09:23 +01:00
Christian Monch
58fbe82228 set up git identity before running tests
Some checks failed
Test execution / Test-all (push) Failing after 23s
2026-03-10 02:05:57 +01:00
Christian Monch
bc344d1823 do not specify python version for tests explicitly
Some checks failed
Test execution / Test-all (push) Failing after 22s
This lets the runner select a version that is locally
available.
2026-03-10 02:01:18 +01:00
Christian Monch
5aab35589a use python version 3.11.2 for tests
Some checks failed
Test execution / Test-all (push) Failing after 13s
2026-03-10 02:00:11 +01:00
Christian Monch
479957f5e0 fix test workflow
Some checks failed
Test execution / Test-all (push) Failing after 13s
2026-03-10 01:49:04 +01:00
Christian Monch
778d078ff0 ensure auto-curate tests work with dirty stores 2026-03-10 01:49:04 +01:00
Christian Monch
321f41ce38 update locked package versions
Ensure that linkml 1.10.0 is used.
2026-03-10 01:49:04 +01:00
Christian Monch
6e08b90683 ensure that tests work with additional records
This commit makes the tests robust against the
presence of other test artifacts in the test store
2026-03-10 01:49:04 +01:00
Christian Monch
09bb5a39e6 add tests for --post-change-set 2026-03-10 01:49:04 +01:00
Christian Monch
453b5d7e3e add tests for --create-change-set
This commit adds tests for the create change
set-option of auto-curate.
2026-03-10 01:49:04 +01:00
Christian Monch
74386e48d6 use non-prefix IRI for annotations 2026-03-10 01:49:04 +01:00
Christian Monch
a1f0db54c0 fix intra repo path and repo initialization
This commit fixes two errors in auto-curate
that are related to change set-creation. The
first error was that a git repository might not
be initialized. The second error was the faulty
calculation of the intra-repository path of
records.
2026-03-10 01:49:04 +01:00
Christian Monch
e553382e74 update metavars for auto-curate options -e and -i 2026-03-10 01:49:04 +01:00
Christian Monch
2ffeb186ec remove code duplication in test code
This commit factors out a function that reads
records from a dumpthings-recorddir backend.
2026-03-10 01:49:04 +01:00
Christian Monch
b412498267 add tests for post-records and get-records
Add tests for post-records that check the
write-interface. Some tests use get-records
to fetch records for validation.

Add the `Document`-class to test schema.
2026-03-10 01:49:04 +01:00
Christian Monch
18789d46f0 update comment 2026-03-10 01:49:03 +01:00
Christian Monch
9f39aa0f7d add basic tests
This commit adds a basic test using `post-records`
and `get-records`.
2026-03-10 01:49:03 +01:00
Christian Monch
deb44758e4 improve error handling and reporting in post-records 2026-03-10 01:49:03 +01:00
Christian Monch
bef9e5b342 fix an error in the test schema 2026-03-10 01:49:03 +01:00
Christian Monch
f78112c344 add dump-things-server test fixtures
This commit adds fixtures that generate a test
dump-things-server that contains one collection,
i.e., `collection_1`. The collection uses a
`record-dir`-backend and the schema
`pyclient_testschema.yaml`.
2026-03-10 01:49:03 +01:00
Christian Monch
927ae3ca57 add a minimal schema for tests 2026-03-10 01:49:03 +01:00
Christian Monch
eb72828d20 update --post-change-set option help-text 2026-03-10 01:49:03 +01:00
Christian Monch
383bad7ce8 update doc-string of auto-curate 2026-03-10 01:49:03 +01:00
Christian Monch
8e1b0cdcce update CHANGELOG.md 2026-03-10 01:49:03 +01:00
Christian Monch
24ac61707a clean up auto-curate
This commit unifies the handling of "normal"
curation, change-set-creation and change-set-posting.
inbox inclusion- and exclusion-lists are now
honored in all three operation modes, i.e., in
curating, change-set-creation, and change-set-posting.

The commit also fixes some errors.
2026-03-10 01:49:03 +01:00
Christian Monch
e3e192457c rename --change-set to --create-change-set
Rename `--change-set` to `--create-change-set`. Improve
validity check to change-set operations when
`--list-records` or `--list-labels` is defined.
2026-03-10 01:49:03 +01:00
Christian Monch
a5040bc78d add --post-change-set option for dtc auto-curate 2026-03-10 01:49:03 +01:00
Christian Monch
95733fd885 store annotations in change sets
The annotations that are removed from incoming records
are now stored in change sets and can therefore be
added when the change set is posted. This keeps the
diff small and content-related, while preserveing the
annotations.
2026-03-10 01:49:03 +01:00
Christian Monch
866c36c776 fix CHANGELOG.md format 2026-03-10 01:49:03 +01:00
Christian Monch
41ef7df867 update CHANGELOG.md 2026-03-10 01:49:03 +01:00
Christian Monch
e20ee4d03b add exception details to error info in post-records 2026-03-10 01:49:03 +01:00
Christian Monch
8df6a20822 add dry-run prefix to dry-run output in post-records 2026-03-10 01:49:03 +01:00
Christian Monch
611fd61369 ensure change set records end with newline 2026-03-10 01:49:03 +01:00
Christian Monch
47f208e2f3 add --change-set description to CHANGELOG.md 2026-03-10 01:49:03 +01:00
Christian Monch
dd52754887 add --dry-run handling to change-set code 2026-03-10 01:49:03 +01:00
Christian Monch
1c45839cfb add change set creation
Create a changeset that contains a one-level
hierarchy. The first level is the `label` of the
inbox. Below that level all changes from the
respective inbox are stored in individual files.
The file names are created from the PIDs of the
incoming records by replacing `-` with `--` and
`/` with `-_`.

The double replacements is necessary to prevent
name collisions that could otherwise occur if
the replacement for `/` is part of a PID.
2026-03-10 01:49:03 +01:00
Christian Monch
327f37b438 add *-class and --dry-run option to post-records 2026-03-10 01:49:03 +01:00
Christian Monch
55531be39f remove unused index from auto-curate code 2026-03-10 01:49:03 +01:00