Skip to content

Commit d5fc404

Browse files
author
Kyle
committed
Support NeuroConv 0.7.0
Changes from 0.6.1: - Bump neuroconv to 0.7.0 - Fix Table.js: value == '' incorrectly treated 0 as empty (strict equality) - Remove UnitColumn required constraint - Sync UnitColumns with Unit schema properties (frontend linked-table validation) - Pin dandi < 0.74.0 (0.74.0 renamed dandi-staging to dandi-sandbox) - Set DANDI_STAGING_API_KEY for dandi < 0.74 compatibility
1 parent 5658817 commit d5fc404

7 files changed

Lines changed: 23 additions & 6 deletions

File tree

.github/workflows/testing_dev_e2e_with_live_services.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
run: |
8080
touch .env
8181
echo DANDI_SANDBOX_API_KEY=${{ secrets.DANDI_SANDBOX_API_KEY }} >> .env
82+
echo DANDI_STAGING_API_KEY=${{ secrets.DANDI_SANDBOX_API_KEY }} >> .env
8283
8384
- if: matrix.os != 'ubuntu-latest'
8485
name: Run tests

environments/environment-Linux.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ dependencies:
1515
- flask-cors == 4.0.0
1616
- flask_restx == 1.1.0
1717
- werkzeug < 3.0 # werkzeug 3.0 deprecates features used by flask 2.3.2. Remove this when updating flask.
18-
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.1
18+
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.7.0
19+
- dandi < 0.74.0 # 0.74.0 renamed dandi-staging to dandi-sandbox
1920
- neo == 0.14.1 # 0.14.2 is not compatible with neuroconv < 0.7.5
2021
- scikit-learn == 1.4.0 # Tutorial data generation
2122
- tqdm_publisher >= 0.0.1 # Progress bars

environments/environment-MAC-apple-silicon.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ dependencies:
2323
- werkzeug < 3.0 # werkzeug 3.0 deprecates features used by flask 2.3.2. Remove this when updating flask.
2424
# NOTE: the NeuroConv wheel on PyPI includes sonpy which is not compatible with arm64, so build and install
2525
# NeuroConv from GitHub, which will remove the sonpy dependency when building from Mac arm64
26-
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.1
26+
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.7.0
27+
- dandi < 0.74.0 # 0.74.0 renamed dandi-staging to dandi-sandbox
2728
- neo == 0.14.1 # 0.14.2 is not compatible with neuroconv < 0.7.5
2829
- scikit-learn == 1.4.0 # Tutorial data generation
2930
- tqdm_publisher >= 0.0.1 # Progress bars

environments/environment-MAC-intel.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ dependencies:
1818
- flask-cors == 4.0.0
1919
- flask_restx == 1.1.0
2020
- werkzeug < 3.0 # werkzeug 3.0 deprecates features used by flask 2.3.2. Remove this when updating flask.
21-
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.1
21+
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.7.0
22+
- dandi < 0.74.0 # 0.74.0 renamed dandi-staging to dandi-sandbox
2223
- neo == 0.14.1 # 0.14.2 is not compatible with neuroconv < 0.7.5
2324
- scikit-learn == 1.4.0 # Tutorial data generation
2425
- tqdm_publisher >= 0.0.1 # Progress bars

environments/environment-Windows.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ dependencies:
1818
- flask-cors === 3.0.10
1919
- flask_restx == 1.1.0
2020
- werkzeug < 3.0 # werkzeug 3.0 deprecates features used by flask 2.3.2. Remove this when updating flask.
21-
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.1
21+
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.7.0
22+
- dandi < 0.74.0 # 0.74.0 renamed dandi-staging to dandi-sandbox
2223
- neo == 0.14.1 # 0.14.2 is not compatible with neuroconv < 0.7.5
2324
- scikit-learn == 1.4.0 # Tutorial data generation
2425
- tqdm_publisher >= 0.0.1 # Progress bars

src/electron/frontend/core/components/Table.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ export class Table extends LitElement {
377377
return;
378378
}
379379

380-
const isUndefined = value == "";
380+
const isUndefined = value === "" || value == null;
381381

382382
if (isUndefined && required) {
383383
instanceThis.#handleValidationResult(

src/pyflask/manageNeuroconv/manage_neuroconv.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,6 @@ def on_recording_interface(name, recording_interface):
619619

620620
# Configure electrode columns
621621
defs["UnitColumn"] = unitprops_def
622-
defs["UnitColumn"]["required"] = list(unitprops_def["properties"].keys())
623622

624623
new_units_properties = {
625624
properties["name"]: {key: value for key, value in properties.items() if key != "name"}
@@ -633,6 +632,19 @@ def on_recording_interface(name, recording_interface):
633632
"additionalProperties": True, # Allow for new columns
634633
}
635634

635+
# Ensure UnitColumns includes entries for all Unit schema properties
636+
# (needed for frontend linked-table validation in neuroconv >= 0.6.2)
637+
existing_unit_columns = metadata["Ecephys"].get("UnitColumns", [])
638+
existing_col_names = {col["name"] for col in existing_unit_columns}
639+
for prop_name, prop_info in new_units_properties.items():
640+
if prop_name not in existing_col_names:
641+
existing_unit_columns.append(
642+
{
643+
"name": prop_name,
644+
"description": prop_info.get("description", "No description."),
645+
}
646+
)
647+
636648
# TODO: generalize logging stuff
637649
log_base = GUIDE_ROOT_FOLDER / "logs"
638650
log_base.mkdir(exist_ok=True)

0 commit comments

Comments
 (0)