Skip to content

Commit

Permalink
Merge branch 'main' into update-list-to-support-raw-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD authored Apr 17, 2024
2 parents 1a8d8d7 + 8dc7d73 commit 0272ff0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions pyflask/manageNeuroconv/manage_neuroconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def get_metadata_schema(source_data: Dict[str, dict], interfaces: dict) -> Dict[
ecephys_properties["ElectrodeColumns"] = {
"type": "array",
"minItems": 0,
"items": {"$ref": "#/properties/Ecephys/properties/definitions/ElectrodeColumn"},
"items": {"$ref": "#/properties/Ecephys/definitions/ElectrodeColumn"},
}

ecephys_schema["required"].append("ElectrodeColumns")
Expand All @@ -429,7 +429,7 @@ def get_metadata_schema(source_data: Dict[str, dict], interfaces: dict) -> Dict[
ecephys_properties["UnitColumns"] = {
"type": "array",
"minItems": 0,
"items": {"$ref": "#/properties/Ecephys/properties/definitions/UnitColumn"},
"items": {"$ref": "#/properties/Ecephys/definitions/UnitColumn"},
}

schema["properties"]["Ecephys"]["required"].append("UnitColumns")
Expand Down Expand Up @@ -463,7 +463,7 @@ def on_sorting_interface(name, sorting_interface):
"maxItems": n_units,
"items": {
"allOf": [
{"$ref": "#/properties/Ecephys/properties/definitions/Unit"},
{"$ref": "#/properties/Ecephys/definitions/Unit"},
{"required": list(map(lambda info: info["name"], unit_columns))},
]
},
Expand Down Expand Up @@ -499,7 +499,7 @@ def on_recording_interface(name, recording_interface):
"maxItems": n_electrodes,
"items": {
"allOf": [
{"$ref": "#/properties/Ecephys/properties/definitions/Electrode"},
{"$ref": "#/properties/Ecephys/definitions/Electrode"},
{"required": list(map(lambda info: info["name"], electrode_columns))},
]
},
Expand All @@ -521,7 +521,7 @@ def on_recording_interface(name, recording_interface):
# Delete Ecephys metadata if no interfaces processed
if has_ecephys:

defs = ecephys_properties["definitions"]
defs = ecephys_schema["definitions"]

electrode_def = defs["Electrodes"]

Expand Down
4 changes: 2 additions & 2 deletions schemas/json/ecephys_metadata_schema_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/properties/Ecephys/properties/definitions/Device"
"$ref": "#/properties/Ecephys/definitions/Device"
},
"default": [
{
Expand All @@ -22,7 +22,7 @@
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/properties/Ecephys/properties/definitions/ElectrodeGroup"
"$ref": "#/properties/Ecephys/definitions/ElectrodeGroup"
},
"default": [
{
Expand Down

0 comments on commit 0272ff0

Please sign in to comment.