-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selectively Enable Source Data Interfaces #502
Conversation
Looks like validation isn't filtering out the unselected ones otherwise, the appearance of the selector feels fine and the earlier pages, though on initial appearance are a little odd looking outside the context of the session manager, are at least consistent with the later sections (including the later 'localized' global metadata popups) |
Ah good catch. Should be a simple fix, might've gotten mixed up in the merge |
Hmmm I'm not able to replicate this. Maybe you can show me at our meeting? Are there two sessions or just one here? |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@CodyCBakerPhD Alright tests should pass now. |
@garrettmflynn A couple of conflicts with |
for more information, see https://pre-commit.ci
Workflow: select several interfaces -> define several sessions -> specify a mixture of source files and disabled interfaces for each session -> try to proceed Screen appears as but received error Exception on /neuroconv/metadata [POST]
Traceback (most recent call last):
File "D:\anaconda3\envs\nwb-guide\lib\site-packages\flask\app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "D:\anaconda3\envs\nwb-guide\lib\site-packages\flask\app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "D:\anaconda3\envs\nwb-guide\lib\site-packages\flask_restx\api.py", line 404, in wrapper
resp = resource(*args, **kwargs)
File "D:\anaconda3\envs\nwb-guide\lib\site-packages\flask\views.py", line 109, in view
return current_app.ensure_sync(self.dispatch_request)(**kwargs)
File "D:\anaconda3\envs\nwb-guide\lib\site-packages\flask_restx\resource.py", line 46, in dispatch_request
resp = meth(*args, **kwargs)
File "D:\GitHub\nwb-guide\pyflask\apis\neuroconv.py", line 84, in post
return get_metadata_schema(neuroconv_api.payload.get("source_data"), neuroconv_api.payload.get("interfaces"))
File "D:\GitHub\nwb-guide\pyflask\manageNeuroconv\manage_neuroconv.py", line 254, in get_metadata_schema
converter = instantiate_custom_converter(source_data, interfaces)
File "D:\GitHub\nwb-guide\pyflask\manageNeuroconv\manage_neuroconv.py", line 217, in instantiate_custom_converter
return CustomNWBConverter(source_data)
File "D:\GitHub\neuroconv\src\neuroconv\nwbconverter.py", line 64, in __init__
self._validate_source_data(source_data=source_data, verbose=self.verbose)
File "D:\GitHub\neuroconv\src\neuroconv\nwbconverter.py", line 107, in _validate_source_data
validate(instance=source_data, schema=self.get_source_schema())
File "D:\anaconda3\envs\nwb-guide\lib\site-packages\jsonschema\validators.py", line 1306, in validate
raise error
jsonschema.exceptions.ValidationError: Additional properties are not allowed ('__disabled' was unexpected) Any ideas? |
Forgot to remove the semi-private (__) properties. Should work now that they aren't sent to the server |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
LGTM |
This PR generally allows for removing non-required schema object properties (e.g. Interfaces on the source data page) so that they are saved but not passed to subsequent parts of the workflow such as the server.
Specifically, this has been tested with regard to selective enabling / disabling Interfaces across several sessions.
A uniform accordion-style rendering system is now used across all forms, including Global forms like NWBFile and Subject Global Metadata, allowing for us to display the status (error, warning, valid) of those forms as we go.
User Testing Issues