-
Notifications
You must be signed in to change notification settings - Fork 358
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
Ensure Connect() does not allow passing parameters that need to be set at the synapse-model level #3021
Conversation
testsuite/pytests/sli2py_connect/test_common_properties_setting.py
Outdated
Show resolved
Hide resolved
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 PR prevents the scenario that users pass common synapse properties directly to the syn_spec
in Connect()
and don't notice that these are ignored by throwing an error suggesting to set the respective parameter via SetDefaults
on the synpase model, which is an important fix.
The mechanism and the test work like a charm and the code is clear and well-documented.
…g.py Co-authored-by: Agnes Korcsak-Gorzo <40828647+akorgor@users.noreply.github.com>
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.
@heplesser Thanks! This looks mostly good to me, I only have a few remarks/questions. See inline comments.
testsuite/pytests/sli2py_connect/test_common_properties_setting.py
Outdated
Show resolved
Hide resolved
testsuite/pytests/sli2py_connect/test_common_properties_setting.py
Outdated
Show resolved
Hide resolved
testsuite/pytests/sli2py_connect/test_common_properties_setting.py
Outdated
Show resolved
Hide resolved
… into fix_conn_common
Co-authored-by: Nicolai Haug <39106781+nicolossus@users.noreply.github.com>
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.
LGTM!
Until now, users could pass parameters shared by all synapses of a given type to the
syn_spec
inConnect()
. These parameters were silently ignored as illustrated by the example below, wherealpha
is not set to 10 either in the connection (which does not have that property) nor in the defaults.The PR also ports the pertaining tests to Python, in part simplifying and in part extending them.