-
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] Update error message for adding drives #681
Conversation
This is looking good @tianqi-cheng! Take a look at the PR description, I edited it to say "Closes #668" on the first line. We do this so that we can keep track of which issue this PR is addressing. Github also pulls a little magic and will automatically close the issue when this PR is merged when you add that line |
Also we didn't get a chance to talk about unit tests (we will this Wednesday), but if you click on the "details" for the units tests you can get information on what's failing |
hnn_core/drives.py
Outdated
@@ -40,7 +40,7 @@ def _get_target_properties(weights_ampa, weights_nmda, synaptic_delays, | |||
if location == 'distal' and 'L5_basket' in target_populations: | |||
raise ValueError('When adding a distal drive, synaptic weight cannot ' | |||
'be defined for the L5_basket cell type as this ' | |||
'connection does not exist.') | |||
'connection does not exist. Please delete the L5_basket part from the code.') |
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 right here produces a "flake8" error. flake8 is basically a program that enforces certain rules for how code should be styled. Here the line is too long so you should break this string into 2 lines.
You can enable flake8 on VSCode so that it highlights areas that break PEP8 style conventions
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 think there is a more precise and explicit way to write this error message. What about something like this?
f"Due to physiological/anatomical constraints, a distal drive cannot target L5_basket cell types. L5_basket cell types must remain undefined by the user in all synaptic weights dictionaries for this drive ({drive_name})".
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 think there is a more precise and explicit way to write this error message. What about something like this?
f"Due to physiological/anatomical constraints, a distal drive cannot target L5_basket cell types. L5_basket cell types must remain undefined by the user in all synaptic weights dictionaries for this drive ({drive_name})".
Thank you for the suggestion. I will fix it!
Codecov ReportAll modified lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #681 +/- ##
=======================================
Coverage 91.38% 91.38%
=======================================
Files 25 25
Lines 4599 4599
=======================================
Hits 4203 4203
Misses 396 396
☔ View full report in Codecov by Sentry. |
Congrats on the first PR @tianqi-cheng!! Quick note for future PR's, we typically change the title from |
@tianqi-cheng you don't have your git set up properly. The commits don't link back to your profile. You should set up the email address correctly. @ntolley can guide you! |
Thank you for the suggestion! I will ask Nick about that. |
Closes #668.
Added "Please delete the L5_basket part from the code." to the error message.