Conversation
It's already part of the gut pr
…time_to_laboratory
# Conflicts: # docs/jsonBrowser/type.md # json_schema/type/biomaterial/specimen_from_organism.json # json_schema/type/protocol/biomaterial_collection/collection_protocol.json # json_schema/versions.json
|
Hi @hannes-ucsc |
There was a problem hiding this comment.
Pull request overview
This PR expands the metadata schema to support additional (mostly optional) tier-2 biomaterial and clinical fields (notably for Heart), introduces new biomaterial modules, and updates associated docs/tests and CI configuration to match the schema changes.
Changes:
- Added new schema properties across biomaterial modules/types (e.g., expanded medical tests/history, transplant metadata updates).
- Introduced new biomaterial modules (
blood_test,lifestyle) and wired them into existing schemas and docs. - Updated testing/tooling docs and CI to run Python tests with
pytest, plus updated some example project test JSONs.
Reviewed changes
Copilot reviewed 21 out of 25 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/schema_test_files/project/test_pass_project_0.json | Updates project example to schema v20 and adds required data_use_restriction. |
| tests/schema_test_files/project/test_fail_project_0.json | Updates failing project example to schema v20 and adds required data_use_restriction. |
| tests/README.md | Updates Node instructions and adds VS Code test-running guidance. |
| requirements.txt | Adds pytest for Python test execution. |
| package-lock.json | Adds a root lockfile (separate from tests/package-lock.json). |
| json_schema/versions.json | Registers new biomaterial modules in the version map. |
| json_schema/update_log.csv | Adds release-log entries for some schema changes. |
| json_schema/type/protocol/sequencing/library_preparation_protocol.json | Adds processing_time. |
| json_schema/type/protocol/biomaterial_collection/collection_protocol.json | Adds biopsy_procedure enum. |
| json_schema/type/biomaterial/specimen_from_organism.json | Changes transplant_organ to enum; adds transplant and other new fields. |
| json_schema/type/biomaterial/cell_suspension.json | Adds nuclei_yield. |
| json_schema/module/biomaterial/reproductive_history.json | Fixes describedBy pattern; adds menstrual_cycle_stage. |
| json_schema/module/biomaterial/medical_tests.json | Adds ECG/ECHO/MRI/MPS heart-related metrics. |
| json_schema/module/biomaterial/medical_history.json | Adds fasting time, disease history, device treatment, cardioplegia, and blood test module ref. |
| json_schema/module/biomaterial/lifestyle.json | New schema module for lifestyle/substance-use fields. |
| json_schema/module/biomaterial/human_specific.json | Updates BMI representation; adds waist metrics and lifestyle module ref. |
| json_schema/module/biomaterial/blood_test.json | New schema module for blood-test results and units. |
| docs/jsonBrowser/type.md | Updates generated type docs for new/changed fields. |
| docs/jsonBrowser/required_fields.md | Updates generated required-fields docs for new modules. |
| docs/jsonBrowser/module.md | Updates generated module docs for new/changed fields. |
| .vscode/settings.json | Adds local editor test runner + pytest configuration. |
| .pullapprove.yml | Adjusts reviewer lists/groups. |
| .gitignore | Adds *.pyc. |
| .github/workflows/schema-tests.yml | Switches Python test invocation to pytest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
json_schema/type/protocol/biomaterial_collection/collection_protocol.json
Outdated
Show resolved
Hide resolved
…cursor's Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
hannes-ucsc
left a comment
There was a problem hiding this comment.
I had to abandon my review because it appears that both this PR and https://github.com/HumanCellAtlas/metadata-schema/pull/1638/changes touch some of the same files. The overlap is significant, so I think we should focus on on PR at a time. I won't be able to review this again until the other has been merged.
| }, | ||
| "nuclei_yield": { | ||
| "description": "Number of nuclei sequenced per mg of tissue.", | ||
| "type": "integer", |
There was a problem hiding this comment.
| "type": "integer", | |
| "type": "integer", | |
| "minimum": 0, |
| }, | ||
| "fasting_time": { | ||
| "description": "Duration of the donor's fasting period (in hours) prior to sample collection.", | ||
| "type": "integer", |
There was a problem hiding this comment.
| "type": "integer", | |
| "type": "integer", | |
| "minimum": 0, |
| }, | ||
| "androstenedione": { | ||
| "description": "Androstenedione in the last blood test of the donor before collection.", | ||
| "type": "number", |
There was a problem hiding this comment.
| "type": "number", | |
| "type": "number", | |
| "minimum": 0, |
| }, | ||
| "dhea": { | ||
| "description": "Dehydroepiandrosterone (DHEA) in the last blood test of the donor before collection.", | ||
| "type": "number", |
There was a problem hiding this comment.
| "type": "number", | |
| "type": "number", | |
| "minimum": 0, |
| }, | ||
| "estrogen": { | ||
| "description": "Estrogen in the last blood test of the donor before collection.", | ||
| "type": "number", |
There was a problem hiding this comment.
| "type": "number", | |
| "type": "number", | |
| "minimum": 0, |
| }, | ||
| "free_fatty_acid": { | ||
| "description": "Free Fatty Acid (FFA) in the last blood test of the donor before collection.", | ||
| "type": "number", |
There was a problem hiding this comment.
| "type": "number", | |
| "type": "number", | |
| "minimum": 0, |
| }, | ||
| "haematocrit": { | ||
| "description": "Percentage of red blood cells in whole blood from the donor's last blood test prior to biopsy collection.", | ||
| "type": "number", |
There was a problem hiding this comment.
| "type": "number", | |
| "type": "number", | |
| "minimum": 0, |
| }, | ||
| "haemoglobin": { | ||
| "description": "Concentration of haemoglobin in whole blood from the donor's last blood test prior to biopsy collection.", | ||
| "type": "number", |
There was a problem hiding this comment.
| "type": "number", | |
| "type": "number", | |
| "minimum": 0, |
| }, | ||
| "hba1c": { | ||
| "description": "Concentration of glycated hemoglobin (HbA1c) from the donor's last blood test prior to biopsy collection.", | ||
| "type": "number", |
There was a problem hiding this comment.
| "type": "number", | |
| "type": "number", | |
| "minimum": 0, |
| }, | ||
| "homa_ir": { | ||
| "description": "Homeostatic Model Assessment of Insulin Resistance (HOMA-IR) in the last blood test of the donor before collection.", | ||
| "type": "number", |
There was a problem hiding this comment.
| "type": "number", | |
| "type": "number", | |
| "minimum": 0, |

Release notes
This PR adds the tier 2 fields requested by the Heart bionetwork (reference sheet here) - none of the fields added in this PR are required
Please note that the modules blood_test, lifestyle are introduced in the Adipose PR which will be merged before the Heart PR, I pulled them into this branch because I need to add fields to them
New optional fields
For
module/biomaterial/medical_history.json:For
module/biomaterial/lifestyle.json:For
module/biomaterial/medical_tests.json:For
module/biomaterial/blood_test.json:For
type/biomaterial/specimen_from_organism.json:Changes to existing fields
For
specimen_from_organism.json:Reviews requested
Need 4 Reviewers to approve because this is a major update