Skip to content

Commit f0e3626

Browse files
authored
Merge pull request #1647 from HumanCellAtlas/iz-hotfix-linting
[hotfix] fix linting errors
2 parents 0025897 + b26ab71 commit f0e3626

8 files changed

Lines changed: 57 additions & 29 deletions

File tree

.github/workflows/schema-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
defaults:
3232
run:
3333
working-directory: tests
34+
env:
35+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
3436
steps:
3537
- uses: actions/checkout@v3
3638
- name: Use Node.js
@@ -41,4 +43,4 @@ jobs:
4143
cache-dependency-path: tests/package-lock.json
4244
- run: npm ci
4345
- run: npm run build --if-present
44-
- run: npm test
46+
- run: npm test

changelog.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,28 @@ Starting after v5.0.0 release, updates will be declared for schemas independentl
66
and (starting with v4.0.0) this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). Unreleased changes may be indicated under the `Unreleased` heading.
77

88
## [Unreleased](https://github.com/HumanCellAtlas/metadata-schema/tree/staging)
9+
## [Released](https://github.com/HumanCellAtlas/metadata-schema/)
10+
11+
### [module/biomaterial/residence.json - v1.0.4] - 2026-02-09
12+
### Fixed
13+
Fixed describedBy pattern and type keyword to country_territory
14+
15+
### [module/biomaterial/medical_history.json - v9.1.4] - 2026-02-09
16+
### Added
17+
Added items keyword to diet_specific
18+
19+
### [module/ontology/file_format_ontology.json - v2.0.0] - 2026-02-09
20+
### Fixed
21+
Fixed class from format:1915 to EDAM:1915
22+
23+
### [module/biomaterial/human_specific.json - v1.6.4] - 2026-02-09
24+
### Fixed
25+
Fixed describedBy pattern and type keyword to country_territory
26+
27+
### [type/biomaterial/donor_organism.json - v18.3.4] - 2026-02-09
28+
### Fixed
29+
Fixed describedBy pattern and type keyword to country_territory
30+
931

1032
### [module/biomaterial/medical_history.json - v9.1.0] - 2026-02-03
1133
### Added
@@ -15,8 +37,6 @@ Added household_smoking_exposure, vaping_status and marijuana_inhaled_status
1537
### Added
1638
Added household_smoking_exposure, vaping_status and marijuana_inhaled_status
1739

18-
## [Released](https://github.com/HumanCellAtlas/metadata-schema/)
19-
2040
### [module/biomaterial/medical_history.json - v9.0.0] - 2025-12-15
2141
### Deprecated
2242
Deprecated alcohol_history

docs/jsonBrowser/module.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Location: module/ontology/file_format_ontology.json
244244
Property name | Description | Type | Required? | Object reference? | User friendly name | Allowed values | Example
245245
--- | --- | --- | --- | --- | --- | --- | ---
246246
text | The name of the file format. | string | yes | | File format | | FASTQ; JSON
247-
ontology | An ontology term identifier in the form prefix:accession. | string | no | | File format ontology ID | | format:1930; format:3464
247+
ontology | An ontology term identifier in the form prefix:accession. | string | no | | File format ontology ID | | EDAM:1930; EDAM:3464
248248
ontology_label | The preferred label for the ontology term referred to in the ontology field. This may differ from the user-supplied value in the text field. | string | no | | File format ontology label | | FASTQ; JSON
249249

250250
## Enrichment ontology<a name='Enrichment ontology'></a>
@@ -600,7 +600,7 @@ Location: module/biomaterial/residence.json
600600

601601
Property name | Description | Type | Required? | Object reference? | User friendly name | Allowed values | Example
602602
--- | --- | --- | --- | --- | --- | --- | ---
603-
country_territory | Country or territory of donor's residence. | | no | | Country | Afghanistan, Albania, Algeria, American Samoa, Andorra, Angola, Anguilla, Antarctica, Antigua and Barbuda, Argentina, Armenia, Aruba, Ashmore and Cartier Islands, Australia, Austria, Azerbaijan, Bahamas, Bahrain, Baker Island, Bangladesh, Barbados, Bassas da India, Belarus, Belgium, Belize, Benin, Bermuda, Bhutan, Bolivia, Borneo, Bosnia and Herzegovina, Botswana, Bouvet Island, Brazil, British Virgin Islands, Brunei, Bulgaria, Burkina Faso, Burundi, Cambodia, Cameroon, Canada, Cape Verde, Cayman Islands, Central African Republic, Chad, Chile, China, Christmas Island, Clipperton Island, Cocos Islands, Colombia, Comoros, Cook Islands, Coral Sea Islands, Costa Rica, Cote d'Ivoire, Croatia, Cuba, Curacao, Cyprus, Czechia, Democratic Republic of the Congo, Denmark, Djibouti, Dominica, Dominican Republic, Ecuador, Egypt, El Salvador, Equatorial Guinea, Eritrea, Estonia, Eswatini, Ethiopia, Europa Island, Falkland Islands (Islas Malvinas), Faroe Islands, Fiji, Finland, France, French Guiana, French Polynesia, French Southern and Antarctic Lands, Gabon, Gambia, Gaza Strip, Georgia, Germany, Ghana, Gibraltar, Glorioso Islands, Greece, Greenland, Grenada, Guadeloupe, Guam, Guatemala, Guernsey, Guinea, Guinea-Bissau, Guyana, Haiti, Heard Island and McDonald Islands, Honduras, Hong Kong, Howland Island, Hungary, Iceland, India, Indonesia, Iran, Iraq, Ireland, Isle of Man, Israel, Italy, Jamaica, Jan Mayen, Japan, Jarvis Island, Jersey, Johnston Atoll, Jordan, Juan de Nova Island, Kazakhstan, Kenya, Kerguelen Archipelago, Kingman Reef, Kiribati, Kosovo, Kuwait, Kyrgyzstan, Laos, Latvia, Lebanon, Lesotho, Liberia, Libya, Liechtenstein, Line Islands, Lithuania, Luxembourg, Macau, Madagascar, Malawi, Malaysia, Maldives, Mali, Malta, Marshall Islands, Martinique, Mauritania, Mauritius, Mayotte, Mexico, Micronesia, Federated States of, Midway Islands, Moldova, Monaco, Mongolia, Montenegro, Montserrat, Morocco, Mozambique, Myanmar, Namibia, Nauru, Navassa Island, Nepal, Netherlands, New Caledonia, New Zealand, Nicaragua, Niger, Nigeria, Niue, Norfolk Island, North Korea, North Macedonia, Northern Mariana Islands, Norway, Oman, Pakistan, Palau, Palmyra Atoll, Panama, Papua New Guinea, Paracel Islands, Paraguay, Peru, Philippines, Pitcairn Islands, Poland, Portugal, Puerto Rico, Qatar, Republic of the Congo, Reunion, Romania, Russia, Rwanda, Saint Barthelemy, Saint Helena, Saint Kitts and Nevis, Saint Lucia, Saint Martin, Saint Pierre and Miquelon, Saint Vincent and the Grenadines, Samoa, San Marino, Sao Tome and Principe, Saudi Arabia, Senegal, Serbia, Seychelles, Sierra Leone, Singapore, Sint Maarten, Slovakia, Slovenia, Solomon Islands, Somalia, South Africa, South Georgia and the South Sandwich Islands, South Korea, South Sudan, Spain, Spratly Islands, Sri Lanka, State of Palestine, Sudan, Suriname, Svalbard, Sweden, Switzerland, Syria, Taiwan, Tajikistan, Tanzania, Thailand, Timor-Leste, Togo, Tokelau, Tonga, Trinidad and Tobago, Tromelin Island, Tunisia, Turkey, Turkmenistan, Turks and Caicos Islands, Tuvalu, Uganda, Ukraine, United Arab Emirates, United Kingdom, Uruguay, USA, Uzbekistan, Vanuatu, Venezuela, Viet Nam, Virgin Islands, Wake Island, Wallis and Futuna, West Bank, Western Sahara, Yemen, Zambia, Zimbabwe | Singapore; United Kingdom; Brazil; Australia; Nigeria
603+
country_territory | Country or territory of donor's residence. | string | no | | Country | Afghanistan, Albania, Algeria, American Samoa, Andorra, Angola, Anguilla, Antarctica, Antigua and Barbuda, Argentina, Armenia, Aruba, Ashmore and Cartier Islands, Australia, Austria, Azerbaijan, Bahamas, Bahrain, Baker Island, Bangladesh, Barbados, Bassas da India, Belarus, Belgium, Belize, Benin, Bermuda, Bhutan, Bolivia, Borneo, Bosnia and Herzegovina, Botswana, Bouvet Island, Brazil, British Virgin Islands, Brunei, Bulgaria, Burkina Faso, Burundi, Cambodia, Cameroon, Canada, Cape Verde, Cayman Islands, Central African Republic, Chad, Chile, China, Christmas Island, Clipperton Island, Cocos Islands, Colombia, Comoros, Cook Islands, Coral Sea Islands, Costa Rica, Cote d'Ivoire, Croatia, Cuba, Curacao, Cyprus, Czechia, Democratic Republic of the Congo, Denmark, Djibouti, Dominica, Dominican Republic, Ecuador, Egypt, El Salvador, Equatorial Guinea, Eritrea, Estonia, Eswatini, Ethiopia, Europa Island, Falkland Islands (Islas Malvinas), Faroe Islands, Fiji, Finland, France, French Guiana, French Polynesia, French Southern and Antarctic Lands, Gabon, Gambia, Gaza Strip, Georgia, Germany, Ghana, Gibraltar, Glorioso Islands, Greece, Greenland, Grenada, Guadeloupe, Guam, Guatemala, Guernsey, Guinea, Guinea-Bissau, Guyana, Haiti, Heard Island and McDonald Islands, Honduras, Hong Kong, Howland Island, Hungary, Iceland, India, Indonesia, Iran, Iraq, Ireland, Isle of Man, Israel, Italy, Jamaica, Jan Mayen, Japan, Jarvis Island, Jersey, Johnston Atoll, Jordan, Juan de Nova Island, Kazakhstan, Kenya, Kerguelen Archipelago, Kingman Reef, Kiribati, Kosovo, Kuwait, Kyrgyzstan, Laos, Latvia, Lebanon, Lesotho, Liberia, Libya, Liechtenstein, Line Islands, Lithuania, Luxembourg, Macau, Madagascar, Malawi, Malaysia, Maldives, Mali, Malta, Marshall Islands, Martinique, Mauritania, Mauritius, Mayotte, Mexico, Micronesia, Federated States of, Midway Islands, Moldova, Monaco, Mongolia, Montenegro, Montserrat, Morocco, Mozambique, Myanmar, Namibia, Nauru, Navassa Island, Nepal, Netherlands, New Caledonia, New Zealand, Nicaragua, Niger, Nigeria, Niue, Norfolk Island, North Korea, North Macedonia, Northern Mariana Islands, Norway, Oman, Pakistan, Palau, Palmyra Atoll, Panama, Papua New Guinea, Paracel Islands, Paraguay, Peru, Philippines, Pitcairn Islands, Poland, Portugal, Puerto Rico, Qatar, Republic of the Congo, Reunion, Romania, Russia, Rwanda, Saint Barthelemy, Saint Helena, Saint Kitts and Nevis, Saint Lucia, Saint Martin, Saint Pierre and Miquelon, Saint Vincent and the Grenadines, Samoa, San Marino, Sao Tome and Principe, Saudi Arabia, Senegal, Serbia, Seychelles, Sierra Leone, Singapore, Sint Maarten, Slovakia, Slovenia, Solomon Islands, Somalia, South Africa, South Georgia and the South Sandwich Islands, South Korea, South Sudan, Spain, Spratly Islands, Sri Lanka, State of Palestine, Sudan, Suriname, Svalbard, Sweden, Switzerland, Syria, Taiwan, Tajikistan, Tanzania, Thailand, Timor-Leste, Togo, Tokelau, Tonga, Trinidad and Tobago, Tromelin Island, Tunisia, Turkey, Turkmenistan, Turks and Caicos Islands, Tuvalu, Uganda, Ukraine, United Arab Emirates, United Kingdom, Uruguay, USA, Uzbekistan, Vanuatu, Venezuela, Viet Nam, Virgin Islands, Wake Island, Wallis and Futuna, West Bank, Western Sahara, Yemen, Zambia, Zimbabwe | Singapore; United Kingdom; Brazil; Australia; Nigeria
604604
region | Region of donor's residence. | string | no | | Region | | Massachusetts; Catalonia; Ondo; Ontario
605605
locality | Nearest city, town, or village to location of donor's residence. | string | no | | Locality | | Singapore; Cambridge; Boston; Kingston
606606
duration | Duration of residence, in years, rounded up to the nearest whole number. | string | no | | Duration of residence | | 20; 37; 45-65

json_schema/module/biomaterial/medical_history.json

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -176,18 +176,21 @@
176176
"type": "array",
177177
"user_friendly": "Diet Specific",
178178
"example": "gluten_free; fodmap; baby_formula; breastfeeding; elimination; keto; paleo",
179-
"enum": [
180-
"vegan",
181-
"vegetarian",
182-
"omnivore",
183-
"gluten_free",
184-
"fodmap",
185-
"baby_formula",
186-
"breastfeeding",
187-
"elimination",
188-
"keto",
189-
"paleo"
190-
],
179+
"items": {
180+
"type": "string",
181+
"enum": [
182+
"vegan",
183+
"vegetarian",
184+
"omnivore",
185+
"gluten_free",
186+
"fodmap",
187+
"baby_formula",
188+
"breastfeeding",
189+
"elimination",
190+
"keto",
191+
"paleo"
192+
]
193+
},
191194
"bionetworks": ["gut"]
192195
}
193196
},

json_schema/module/biomaterial/residence.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"describedBy": {
1616
"description": "The URL reference to the schema.",
1717
"type": "string",
18-
"pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/biomaterial/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/human_specific"
18+
"pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/biomaterial/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/residence"
1919
},
2020
"schema_version": {
2121
"description": "The version number of the schema in major.minor.patch format.",
@@ -25,6 +25,7 @@
2525
},
2626
"country_territory": {
2727
"description": "Country or territory of donor's residence.",
28+
"type": "string",
2829
"enum": [
2930
"Afghanistan",
3031
"Albania",

json_schema/module/ontology/file_format_ontology.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
"type": "string",
3232
"graph_restriction": {
3333
"ontologies" : ["obo:edam"],
34-
"classes": ["format:1915"],
34+
"classes": ["EDAM:1915"],
3535
"relations": ["rdfs:subClassOf"],
3636
"direct": false,
3737
"include_self": false
3838
},
39-
"example": "format:1930; format:3464",
39+
"example": "EDAM:1930; EDAM:3464",
4040
"user_friendly": "File format ontology ID"
4141
},
4242
"ontology_label": {

json_schema/versions.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"last_update_date": "2026-02-03T18:05:22Z",
2+
"last_update_date": "2026-02-09T12:55:32Z",
33
"version_numbers": {
44
"core": {
55
"biomaterial": {
@@ -26,13 +26,13 @@
2626
"disease_profile": "1.1.0",
2727
"familial_relationship": "6.0.3",
2828
"growth_conditions": "6.4.2",
29-
"human_specific": "1.6.0",
30-
"medical_history": "9.1.0",
29+
"human_specific": "1.6.4",
30+
"medical_history": "9.1.4",
3131
"medical_tests": "1.0.0",
3232
"mouse_specific": "1.0.8",
3333
"preservation_storage": "6.1.1",
3434
"reproductive_history": "1.0.0",
35-
"residence": "1.0.0",
35+
"residence": "1.0.4",
3636
"state_of_specimen": "6.0.0",
3737
"timecourse": "2.0.2"
3838
},
@@ -47,7 +47,7 @@
4747
"enrichment_ontology": "1.2.6",
4848
"ethnicity_ontology": "5.3.9",
4949
"file_content_ontology": "2.0.0",
50-
"file_format_ontology": "1.0.0",
50+
"file_format_ontology": "2.0.0",
5151
"gender_identity_ontology": "1.0.0",
5252
"instrument_ontology": "5.3.6",
5353
"length_unit_ontology": "5.3.5",
@@ -98,7 +98,7 @@
9898
"biomaterial": {
9999
"cell_line": "16.0.0",
100100
"cell_suspension": "14.1.0",
101-
"donor_organism": "18.3.0",
101+
"donor_organism": "18.3.4",
102102
"imaged_specimen": "3.5.0",
103103
"organoid": "11.5.0",
104104
"specimen_from_organism": "11.1.0"

src/schema_linter.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
# Property attributes
3333

34-
property_attributes = ['description', 'type', 'pattern', 'example', 'enum', '$ref', 'user_friendly', 'items', 'guidelines', 'format', 'comment', 'maximum', 'minimum', 'oneOf', 'oneOf', 'bionetworks', 'minLength']
34+
property_attributes = ['description', 'type', 'pattern', 'example', 'enum', '$ref', 'user_friendly', 'items', 'guidelines', 'format', 'comment', 'maximum', 'minimum', 'oneOf', 'oneOf', 'anyOf', 'bionetworks', 'minLength']
3535

3636
ontology_attributes = ['graph_restriction', 'ontologies', 'classes', 'relations', 'direct', 'include_self']
3737

@@ -142,7 +142,9 @@ def lintSchema(self, path, ols_api):
142142
# Property must contain type attribute
143143
oneOf_types = [t['type'] for t in properties[property]['oneOf'] if 'type' in t.keys()] if \
144144
'oneOf' in properties[property].keys() else []
145-
if 'type' not in properties[property].keys() and not oneOf_types:
145+
anyOf_types = [t['type'] for t in properties[property]['anyOf'] if 'type' in t.keys()] if \
146+
'anyOf' in properties[property].keys() else []
147+
if 'type' not in properties[property].keys() and not oneOf_types and not anyOf_types:
146148
errors.append(schema_filename + ".json: Keyword `type` missing from property `" + property + "`.")
147149

148150
else:
@@ -319,7 +321,7 @@ def get_json_from_file(self, filename, warn = False):
319321

320322
if __name__ == "__main__":
321323
# As of November 2024, we are now using the OLS4 for ontology checkup
322-
ols_api = 'https://www.ebi.ac.uk/ols/api'
324+
ols_api = 'http://www.ebi.ac.uk/ols/api'
323325

324326
schema_path = '../json_schema' if cwd == 'src' else 'json_schema'
325327
jsons = [os.path.join(dirpath, f)

0 commit comments

Comments
 (0)