-
Notifications
You must be signed in to change notification settings - Fork 55
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
[MRG] GUI new json loading #837
[MRG] GUI new json loading #837
Conversation
5a9a16c
to
bc8164b
Compare
@@ -1493,10 +1498,8 @@ def get_cell_param_default_value(cell_type_key, param_dict): | |||
|
|||
def add_drive_tab(params, log_out, drives_out, drive_widgets, drive_boxes, | |||
tstop, layout): | |||
net = jones_2009_model(params) | |||
|
|||
drive_specs = _extract_drive_specs_from_hnn_params( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can likely deprecate (or just remove since it's private) this function in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Just need to check if it's only use is in the GUI.
hnn_core/param/jones2009_base.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps there should be a test to make sure this is synchronized with the file in hnn_data
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea. I'll make it an issue.
gui._simulate_upload_connectivity(file2_url) | ||
# now connectivity is refreshed. | ||
assert gui.connectivity_widgets[0][0].children[1].value == 0.01 | ||
assert gui.drive_widgets[-1]['tstop'].value == 250. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would be a good one to keep for the poisson drive in file2
to make sure it's loaded properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The weight check is currently preserved on line 116. However the stop time check is not because tstop isn't currently saved with the Network configurations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that this was referring to the stop time of the drive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh you're right! hmm... I can add it back in. I'm curious if the drive widget will set it to the tstop widget if the config tstop is greater than the the widget...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the test but set it to 170 instead of 250. The logic sets the drive tstop to the GUI's widget tstop value if the drive tstop value is larger. We currently don't save a universal tstop value to Network object, so the GUI doesn't set its tstop widget from Network configuration files.
This may change in the future if we want to save a stop value with a Network.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with the changes on my end! Just a few test suggestions otherwise good to go
Rebase failed
…param structure with dict_to_network function
Separated connectivity upload tests from test_gui_upload_params to be able to develop and test the load connectivity behavior in isolation.
…impact the connectivity
…new configuration format
…etwork using the gui param attribute. Replaced jones_2009_model function with dict_to_network because it supports the new param/config format.
…widget The new config files may not have a tstop value encoded for certain drives. This would cause an error if a None type is passed into the default_data through the update method. The update_nested_dict function does not pass None types by default.
3cd58d5
to
ded6d01
Compare
…ui.params attribute updates on connection file upload
Changed the configuration/parameter file format support of the GUI.
split from #808