-
Notifications
You must be signed in to change notification settings - Fork 52
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] BUG: Update gid_ranges
after using clear_drives
#812
Conversation
gid_ranges
after using clear_drives
gid_ranges
after using clear_drives
gid_ranges
after using clear_drives
gid_ranges
after using clear_drives
Co-authored-by: Mainak Jas <[email protected]>
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.
Added some comments and questions.
hnn_core/network.py
Outdated
conn['src_type'] if conn['src_type'] not | ||
in self.external_drives.keys()] | ||
|
||
for cell_type in list(self.gid_ranges.keys()): |
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.
Probably a matter of semantics but are drive names also "cell types"? I think in other parts of the codebase "cell_types" usually just refers to the neocortical cell names? At least the Network["cell_types"] is only those cells. Maybe something like "range_name" would be clearer.
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.
yeah we have a bit of inconsistency here ... how about calling it cell_name
like we do in the rest of the repo. The variable name cell_type
and cell_template
are a bit interchangeable and confusing
hnn_core/tests/test_drives.py
Outdated
assert 'prox' not in net.external_drives | ||
assert 'prox' not in net.gid_ranges | ||
assert net._n_gids == n_gids | ||
|
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 we can test adding a new drive after clearing drives to make sure the Network still works after clearing the drives?
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.
Mostly a check that the ranges and positions are populated as expected after resetting them.
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.
Looks great!
Currently calling
net.clear_drives
does not update theNetwork
correctly. This PR adds implements these updates and adds a quick test to ensure the updates are applied.@gtdang feel free to merge when the checks are green!