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]: Better argument names for add_tonic_bias() #354
[MRG]: Better argument names for add_tonic_bias() #354
Conversation
Great work @kenloi! I'll review the code soon, but you should check out the error log from travis. It seems the |
T = tstop | ||
if T < 0.: | ||
if tstop is None: | ||
tstop = self.cell_response.times[-1] |
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.
Maybe make self.cell_response.times[-1]
a variable like t_end
.
The error is actually a bit deep in the code base. Since the dictionary key is being changed to hnn-core/hnn_core/network_builder.py Line 391 in f84f3cf
Unpacks the dictionary such the key is a named argument. This means: Line 433 in f84f3cf
Is getting tstop as an argument, so you'll need to change the variable name there as well.
I'd recommend trying to run some simulations to make sure everything is functioning smoothly. You can copy code from the gamma example to test the function in a separate notebook. |
@kenloi when you make a fix, you should run tests locally rather than wait for Travis CI to fail. You can do that using: $ py.test . If you want to be be dropped into the $ py.test . --pdb Doing this has saved me a lot of time and it's why the unit tests exist! |
@ntolley Thanks for the pointers. I'll go through it again. @jasmainak Thank you for the suggestion. I'll make sure to run tests locally before submitting. |
perfect, let us know when you push the next update! |
Codecov Report
@@ Coverage Diff @@
## master #354 +/- ##
==========================================
+ Coverage 90.94% 90.96% +0.02%
==========================================
Files 13 13
Lines 2540 2547 +7
==========================================
+ Hits 2310 2317 +7
Misses 230 230
Continue to review full report at Codecov.
|
@kenloi once the PR is good to go for you, can you update the title to have the [MRG] as a prefix? Also, you'll need to update Also, make sure to build the docs locally to see how the $ make html-noplot to build without running examples, and/or $ make html to build everything. The html outputs will be inside the _build/ folder |
Hey @kenloi your last commit (20da1e5) included a bunch of unwanted files. No worries, here's what I'd do. Make a note of the intended changes for the last commit, then simply cut off the last commit using: git reset --hard HEAD~1 Then re-implement the intended changes and I recommend setting up an alias in your alias gad='git add -u' Then |
@cjayb Thanks for the suggestions. My earlier commit (48024b9), I ran both I tried looking up the module from my WSL bash shell and got the same ModuleNotFoundError. I opened a python IDE from powershell and tried importing mne there but I also got the same ModuleNotFoundError. Only after running a I'll give your suggestions a try to see if that fixes the problem. Any ideas as to what may have happened between my functioning commit and my updates to the documentation? |
This makes sense. It's not super well-documented, but the somato-example requires
This was the fatal mistake: the Once you've reset & committed only the desired changes, you'll have to do git push -f to force GitHub to accept the branch: the |
20da1e5
to
50b442f
Compare
@jasmainak I've submitted the final commit, updated the api docs, and fixed the title prefix to [MRG]. Please let me know if there's anything else and thank you for the guidance. @cjayb Thank you for your input! |
doc/whats_new.rst
Outdated
@@ -135,6 +137,7 @@ People who contributed to this release (in alphabetical order): | |||
- `Blake Caldwell`_ | |||
- `Christopher Bailey`_ | |||
- `Carmen Kohl`_ | |||
- `Kenneth Loi`_ |
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.
- `Kenneth Loi`_ |
this is contributors for 0.1 release. We'll add you to the contributor list for 0.2 :)
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 good other than minor nitpick
@jasmainak no problem! I can wait :) |
Congratulations @kenloi on your first contribution! 🎉 what's the next PR? :) |
maybe #306 is an easy one to knock off and get more comfortable with git while we find you one that is more "intermediate" level |
Thanks @jasmainak! #306 sounds good, I’ll give it a try. |
Closes #347
For the add_tonic_bias() method in the network class in network.py, I changed the T arg to tstop. In the method, I replaced all the T instances with the new tstop arg.
The _add_drives_from_params(net) function in drives.py calls the add_tonic_bias() method; thus I changed the args to match my changes to add_tonic_bias().
I didn't find any other instances where the add_tonic_bias() method was used so it should be fixed.