1
0
Fork 0
Query and export implementations for the RSE group data model from https://concepts.datalad.org/s/demo-rse-group
Find a file
Michał Szczepanik fb5b766334 feat: add option for inject_links_pid to use only cache
The `--record-cache` argument in `inject_links_pid` was available but
the cache was never used by the command. Given that this command
normally requests records to be looked up from the Pool by class (not by
single PID) it is not obvious what a full implementation of cache should
look like (commands which fetch one PID at a time can consult cache
first and API only if not cached).

This commit adds partial, but hopefully intuitive cache handling. If the
option `--only-from-cache` is given, then no requests to the API will be
made; instead, all cached records (and cached records only) will be
scanned, filtered by class name (if requested), checked whether they
link the given object, and injected.

No writing to cache is done. If the `--only-from-cache` option is not
used, the cache is ignored (as previously).

This "inject from cache" was motivated by the following use case:
extending Person records with their Project roles. This can be done as
follows: Fetch project records, inline `associated_with::roles`, save in
cache, then run inject-links-pid --only-from-cache to inject projects
with roles inlined (inline-records currently can't deal with nested
properties).
2026-03-09 12:26:02 +01:00
query_rse_group feat: add option for inject_links_pid to use only cache 2026-03-09 12:26:02 +01:00
.changelog.md.j2 initial commit 2026-01-12 10:42:14 +01:00
.gitignore chore: instruct Git to ignore pycache 2026-03-07 07:07:12 +01:00
pyproject.toml build: increase minimum Python version (match dependencies) 2026-03-07 07:07:50 +01:00
README.md initial commit 2026-01-12 10:42:14 +01:00

(Demo) query and exporter implementations for the RSE group data model

Data model

https://concepts.datalad.org/s/demo-rse-group