Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3c596f0
convert: Brainstorm-E split migrators (treatment→manip, ontology_tabl…
claude Jun 19, 2026
32606a9
Fix Code Analyzer alert: expand inline if/elseif in getCharField
claude Jun 19, 2026
a6b8508
ci: V_epsilon corpus discovery through the Brainstorm-E split (#3)
claude Jun 19, 2026
0c60b23
Fix runCorpusDiscovery signature: declare options for the name-value arg
claude Jun 19, 2026
d2035e6
ci: make V_epsilon the main migration/validation target (replaces V_d…
claude Jun 19, 2026
56e09c1
convert: split migrators emit session_relative_reference anchor (no m…
claude Jun 20, 2026
0a3cfd3
Clean up two Code Analyzer findings in the split migrators
claude Jun 20, 2026
ed271ad
convert: fix the two largest E-split quarantine causes from the corpu…
claude Jun 20, 2026
1393d83
convert: split ontology_table_row's real char-field layout into per-c…
claude Jun 20, 2026
19c215c
Fix codespell: rename nd/nm to node/label (codespell read 'nd' as 'and')
claude Jun 20, 2026
d01fa15
Fix parse error: remove stray end left by the extractRows rewrite
claude Jun 20, 2026
3f1a32f
ci: validate corpus against the matching did-schema E branch, not main
claude Jun 21, 2026
2cd9dc1
convert: defer stimulus_bath to the NDI layer with a clear reason
claude Jun 21, 2026
427a9f4
Fix Code Analyzer: stimulus_bath deferral stub uses the idiomatic alw…
claude Jun 21, 2026
5720ba7
convert: generalize the idempotency short-circuit to the target version
claude Jun 21, 2026
ca0ec76
migrators_e: write categorical value into the concrete class block
claude Jun 22, 2026
47ddbd2
migrators_e: add subject_group -> subject(is_group) migrator + tests
claude Jun 22, 2026
683a0ec
test: run the 20211116 corpus against V_epsilon
claude Jun 22, 2026
4c636d5
convert: drop stray empty blocks for non-hosting chain classes
claude Jun 22, 2026
35721f0
migrators_e: add treatment_drug / virus_injection / treatment_transfe…
claude Jun 22, 2026
6d778f8
ci: gate the Soph corpus back off
claude Jun 22, 2026
ab68a4e
migrators_e: fix treatment injection/bath to emit schema-valid bodies
claude Jun 22, 2026
3a7ca01
test: emit a per-term routing inventory from corpus discovery (#3 rou…
claude Jun 22, 2026
ea081eb
did(legacy): accept did2-form superclasses in validate_doc_vs_schema
claude Jun 22, 2026
1c1145e
test: echo routing inventory to stdout (CI log)
claude Jun 23, 2026
3065c7a
test: add reference-integrity sweep to corpus discovery (#2)
claude Jun 23, 2026
ace5796
test: rename refErr -> refReportErr (codespell false positive on "ref…
claude Jun 23, 2026
643f1ef
migrators_e: tighten ontology_table_row routing to kill substring mis…
claude Jun 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions .github/workflows/test-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,33 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Check out did-schema (sibling, for V_delta validation)
- name: Check out did-schema (sibling, for V_epsilon validation)
uses: actions/checkout@v4
with:
repository: Waltham-Data-Science/did-schema
ref: main
# Track the matching did-schema E branch: the Brainstorm-E classes
# (observation property classes, shape library, session_relative_
# reference, subject_statement, etc.) live on this branch and are
# not yet on did-schema main. Revert to `main` once DID-schema#62
# merges. Falls back to main off-PR (e.g. direct pushes to V2).
ref: ${{ github.head_ref || 'main' }}
path: did-schema

- name: Assemble V_epsilon schema set (stable + draft)
# V_epsilon replaces V_delta as the migration/validation target.
# The schema cache loads a single flat dir of *.json, but the
# Brainstorm-E observation/manipulation classes live in
# V_epsilon/draft while base/element/etc. live in V_epsilon/stable
# (class names are disjoint across tiers), so combine both tiers
# into one directory for DID_SCHEMA_PATH.
run: |
mkdir -p "${GITHUB_WORKSPACE}/epsilon-schemas"
cp did-schema/schemas/V_epsilon/stable/*.json "${GITHUB_WORKSPACE}/epsilon-schemas/"
cp did-schema/schemas/V_epsilon/draft/*.json "${GITHUB_WORKSPACE}/epsilon-schemas/"

- name: Export DID_SCHEMA_PATH
run: |
echo "DID_SCHEMA_PATH=${GITHUB_WORKSPACE}/did-schema/schemas/V_delta/stable" \
echo "DID_SCHEMA_PATH=${GITHUB_WORKSPACE}/epsilon-schemas" \
>> "$GITHUB_ENV"

- name: Set up MATLAB
Expand Down
22 changes: 20 additions & 2 deletions src/did/+did/database.m
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,19 @@ function validate_doc_vs_schema(database_obj, docProps, schemaStruct, all_ids)
for i = 1 : numel(superFullNames)
[~,superNames{i}] = fileparts(superFullNames{i}); % keep compatibility with Matlab 2019a
end
% did2-form documents carry superclass names directly in
% `.class_name` (e.g. {class_name:'base'}) and have no
% `.definition` path. Fall back to those names so the legacy
% validator recognises did2-shaped documents during the
% v1->v2 transition (otherwise superNames is empty and every
% such doc fails the superclasses check spuriously).
if isempty(superNames)
try
superNames = {classProps.superclasses.class_name};
catch
superNames = {};
end
end
if ~iscell(superNames), superNames = {superNames}; end
superNames = unique(superNames);
schemaFields = fieldnames(schemaStruct);
Expand Down Expand Up @@ -1238,8 +1251,13 @@ function validate_doc_vs_schema(database_obj, docProps, schemaStruct, all_ids)
assert(areSame,'DID:Database:ValidationSuperClasses', ...
'Dissimilar superclasses defined/found for %s ("%s" <=> "%s")', ...
doc_name, expectedStr, superNamesStr);
% Recursively validate all superNames against this doc:
for idx = 1 : numel(superNames)
% Recursively validate all superclasses against this
% doc. Bound by superFullNames (the `.definition`
% paths): did2-form docs expose names but no paths, so
% superFullNames is empty and the deeper recursion is
% skipped -- the concrete class is still validated, and
% the superclasses-name check above already passed.
for idx = 1 : numel(superFullNames)
% First get the superClass' definition struct
defStruct = database_obj.get_document_schema(superFullNames{idx});
% Extract validation file from definition
Expand Down
Loading
Loading