Closed katduecker closed 2 months ago
Hey, I have now taken on this pull request. I'm thinking about the options for the deprecation cycle of defining tmin and tmax for plot_dipole et al.
I'm happy to make all of these clear in the tutorials when I'm done!
I think we should not change behavior while deprecating ...
tmin and tmax should be set to None by default. If it is not None, then raise deprecation warning telling the user that they should set directly with plt.xlim() and plt.ylim() to avoid this warning
if it is None, then use the times attribute: extracellular.times, cell_response.times, dipole.times etc.
do the hdf5
files now save times
attribute @ntolley ? This was a concern raised by @rythorpe
Thanks for taking over the PR @katduecker !
Hi all,
I've been trying to push the changes but it keeps failing the CircleCI. I wonder if that is because of a deprecation?
The build_docs test gets stuck when running plot_firing_pattern.py. This is the associated error message.
When I run plot_firing_pattern.py locally, the spike raster is plotted, but I receive this deprecation warning.
It seems that cell_response.times (loaded in from the .txt file) is empty, but net.cell_response.times contains the time points from 0 to tstop. Any ideas on what's going on and why the plot works locally, but not when doing the unit test?
Thanks!
@katduecker I am able to reproduce locally. Are you sure you have the editable hnn-core
version that you are testing? You can check by:
import hnn_core
hnn_core.__version__
hnn_core.__path__
it should point to your github folder not to the anaconda folder.
Thanks Mainak. I reinstalled the developer version, cherry picked the PR and added my changes. Now it can't load custom mechanisms.. this is in files that I haven't even edited, so I'm not sure what's causing this
When I run "make test" locally, this error does not come up. I see a bunch of errors with lines being too long etc, but I think that's other people's work as I haven't worked on those scripts...
I do have two local installation of HNN dev (not sure if that's smart?) - one that I'm working on and what that I'm using. However, when I open a jupyter notebook inside the folder that I'm pushing to my repository, it gives me the right path (the version I'm currently working on).
Thanks for your help!
Did you look at the contributing guide ?
You need to run the command:
python setup.py build_mod
You don't need two local installations :) Just switch branches on git ... once you have a developer install, you can switch between different versions simply by switching branches.
In case you want to maintain a copy of hnn-core installation for reproducibility reasons, I would recommend creating a separate conda environment for your project and installing hnn-core there.
@katduecker I think one reason the tests are failing is because the GUI code depends on some of these plotting functions:
Try running pytest test_gui.py
to see if you can reproduce the error locally
@katduecker I think I figured out the issue. If you're not planning on working on this over the weekend then we can sort things our in person on Monday.
The cleanest solution would be to git reset --hard
this branch to the last commit, and then copy in the changes directly. The approach we took (copying in the entire files you had backed up) failed because the master branch was updated since the time you had backed up those files.
If you don't want to mess with the git reset
business the alternative is to make a new commit where you copy read_dipole
and read_dipole_txt
directly from the master branch and paste it into your code. This will remove these functions from the diff, since these were the ones that were updated in the master branch most recently.
@ntolley thanks so much, that makes sense! I'll get everything ready for Monday up to the point where I'd commit the changes so that we could talk this over before I do to avoid further problems?
Due to issues when resetting to the commits from this PR, I have opened a new PR #769
Continues the PR #683 Closes #544