Releases: jonescompneurolab/hnn-core
v0.4.2
0.4.2 Patch Notes
Version 0.4.2 is a patch release that fixes two important bugs: one affecting LFP and CSD output (#1062) and another preventing users from upgrading to the recently released NEURON 8.2.7 (#1058), which also enables use of HNN-Core with Python 3.13. This also includes other, smaller bug fixes and changes.
If you have been using HNN-Core to simulate LFP or CSD output, we strongly recommend you update to this version.
We have also recently overhauled our HNN Frontpage and our new HNN Textbook website, so check them out!
New Features
-
We now provide
conda
packages that offer significantly easier installation of HNN-Core, including an option with all features included (including MPI!). See our Installation Guide for how to install them. -
We now support Python 3.13, in addition to previously supported Python versions.
Upcoming Deprecations
- In the next minor release (0.5.x), we will be dropping Python 3.8 support for two reasons:
- It has reached "end-of-life" and is no longer supported, including NOT receiving any future security upgrades (see https://devguide.python.org/versions/).
- NEURON 8.2.7 has dropped support for Python 3.8.
If you expect that you will still require hnn_core
using Python 3.8, please reach out to us on our Github Discussions page. We will likely be able to continue supporting your use-case.
Bug Fixes
-
Major bugfix: Cell positions were previously starting at origin (incorrect) instead of origin + their
pos_dict
locations (correct). This has been fixed. This change should not affect results from dipole or single-cell output, but will affect results from LFP or CSD output. Identified and fixed by Katharina Duecker in #1062. -
hnn_core/viz.py::plot_spikes_raster()
now correctly titles the plot according to if dipoles are overlaid or not, by Dylan Daniels in #1074. -
Update
hnn_core/mod/vecevent.mod
to a newer version from NEURON's source code, enabling use of NEURON's latest version (8.2.7) and Python's latest stable version (3.13). The prior version of this file would not correctly compile on Windows using NEURON 8.2.7. By Austin E. Soplata in #1058. -
Fix test breakage caused by upstream dependency change in
scipy.optimize
, by Austin E. Soplata in #1076.
Development Workflow Changes
-
hnn_core
code now follows the defaultruff
code formatting style, and all new contributions are expected to follow this style as well. Fortunately, there is a single command that developers need to run which automatically format their code appropriately (make format-overwrite
), see the new Quality Control section of our Contributing Guide for details. -
Updates to Linkcheck Workflow frequency so it only runs on every merge to
master
and on the 1st and 15th of every month, by Maira Usman in #1043 (new contributor!!!). -
Concurrency in Github Actions is now utilized: if you push a new commit to your existing PR branch while prior workflows are still running, the prior workflows are canceled (#1015).
-
You can now build and deploy new package distributions of
hnn_core
directly from Github to Pypi and TestPypi by pushed any new tag that begins withv
(#1073 and #1077). Documentation for how to make a release has not been updated yet, but will be soon. -
When a developer needs to update parameters of the "default model" used in HNN, there is now both documentation and commands to help guide them. See the new "Making changes to the default network" section of our Contributing Guide (#1068).
API Changes
-
hnn_core.CellResponse
now requires acell_type_names
argument, whereas before the argument was optional (#970). -
hnn_core/optimization/optimized_evoked.py::optimized_evoked
now enforces a minimum number of iterations, twelve (12). This is a temporary, possibly permanent, fix introduced in #1076.
People who contributed to this release (in alphabetical order of family name):
Changelog
-
Fix tiny typo in
pip
MPI install documentation, by Austin E. Soplata in #1072. (he's also responsible for the original typo...) -
Update the Linux path of our Unix unit tests to use
conda
for its MPI installation, NOT system packages. This makes our unit tests consistent with our recently-changed recommended installation pathways forpip
MPI on Linux. By Austin E. Soplata in #1071. -
Tiny docstring update to
jones_2009_model
that the "model" is from the Jones 2009 paper, but the "implementation" is from Neymotin 2020. Citations for both papers are included in the docstring. By Austin E. Soplata in #1056. -
Added support for "regeneration" of both required hierarchical JSON network files alongside documentation, by Austin E. Soplata in #1068.
-
Enable automated package release building and deployment via Github Actions to Pypi and TestPypi, by Austin E. Soplata in #1073 and hotfix in #1077.
-
Version downgraded from 0.5.0dev0 to 0.4.2.devX in preparation for this release (no PR).
-
Fix test breakage caused by upstream dependency change in
scipy.optimize
, by Austin E. Soplata in #1076. -
hnn_core/viz.py::plot_spikes_raster()
now correctly titles the plot according to if dipoles are overlaid or not, by Dylan Daniels in #1074. -
Update
hnn_core/mod/vecevent.mod
to a newer version from NEURON's source code, enabling use of NEURON's latest version (8.2.7) and Python's latest stable version (3.13), by Austin E. Soplata in #1058. -
Introduce concurrency controls to Github Actions, by Maira Usman in #1015.
-
Major bugfix: Cell positions were previously starting at origin (incorrect) instead of origin + their
pos_dict
locations (correct). This has been fixed. This change should not affect results from dipole or single-cell output, but will affect results from LFP or CSD output. Identified and fixed by Katharina Duecker in #1062. -
Updates to Linkcheck Workflow frequency so it only runs on every merge to
master
and on the 1st and 15th of every month, by Maira Usman in #1043 (new contributor!!!). -
Miscellaneous link updates/fixes needed due to our overhaul of our HNN Frontpage and our new HNN Textbook website, by Austin E. Soplata in #1055, #1059, #1063, and #1067.
-
Add support for
ruff format
, merge changes taken from running it, and require its use for new code contributions, by Austin E. Soplata in #934. -
Add
conda
package installation instructions, by Austin E. Soplata in #1051. -
Add and update "Cloud" usage instructions on install page to redirect to our new Textbook website, by Austin E. Soplata in #1046 and #1048.
-
Remove hardcoding of celltypes in
hnn_core.CellResponse
and add {func}~hnn_core.Network.rename_cell
, by Mohamed W. ElSayed in #702 and #970.
v0.4.1
v0.4.1
Version 0.4.1 is a bug-fixing patch release for version 0.4. This includes changes to importing of BatchSimulate
due to previously-undetected install/import issues (#1034), configuration of packaging metadata format (same PR), and elimination of a discrepancy in our method of cleaning local compiled files that led to architecture-specific files being included in the Pypi 0.4 release, which caused simulations on some platforms to fail (#1035 ). The public Pypi version has already been updated to 0.4.1.
For release notes about what is new for this version and 0.4, see https://github.com/jonescompneurolab/hnn-core/releases/tag/v0.4 .
v0.4
v0.4
v0.4 represents a major milestone in development of hnn_core
and the HNN ecosystem as a whole. v0.4 includes over two years of active development work by many people (>800 commits!), and brings with it many new and exciting features, including significant improvements to robustness, testing, and bug-fixing.
New Features
-
hnn_core
now includes a fully-tested and robust GUI of its own. Thehnn_core
GUI was present as a prototype in v0.3, but it is now ready for production. New features and visual improvements will still be coming to it in the future, such as the ability to use optimization. See our new Install page for ways to install it, and we have already begun incorporating it into a new, fresh series of tutorials for our upcoming revamp of the HNN website. If you have installed it, you can start the GUI usinghnn-gui
in your terminal/command prompt window. -
The
BatchSimulate
class: Thanks to [Abdul Samad Siddiqui][] and Google Summer of Code 2024, there is now the capability to run "batches" of simulations across multiple parameter sets, enabling easy analysis and simulation of behavior across parameter sweeps. See our example for more details. Note that currently, only itsloky
backend is supported, and the"hnn-core[parallel]"
dependencies must be installed for it to be used. -
Significant improvements to the API, documentation, and pedagogical examples especially for Optimization, among others.
-
Calcium concentration can now be recorded: recorded calcium concentration from either the soma,
or all sections, are enabled by settingrecord_ca
tosoma
orall
in
hnn_core.simulate_dipole
. Recordings are accessed through
hnn_core.CellResponse.ca
. -
There is now a new class
hnn_core.viz.NetworkPlotter
which can be used to visualize an entire network in 3D, including firing animations; see our example of how to use it here. -
There is now a new function
hnn_core.viz.plot_drive_strength
for illustrating the absolute or relative amount of strength that a particular drive provides to different cell types. -
A very large amount of polishing, bug fixes, general improvements, etc.
Deprecations
- The new Python 3.13 is not supported by
hnn_core
at this time, due to NEURON's current lack of support for it. This will change in the near future. We still support 3.8 through 3.12 (inclusively).
Upcoming Deprecations
- Both
hnn_core.viz.plot_laminar_lfp
andhnn_core.viz.plot_dipole
will have theirtmin
andtmax
arguments removed in the future. Please set the x-axis limits using methods called directly on the existingmatplotlib
objects, or usingmatplotlib.pyplot.xlim
. hnn_core.Network
's argument oflegacy_mode
for importing old param files will be removed in the future.hnn_core.Network.add_tonic_bias
's argument ofcell_type
, along with setting the argumentamplitude
to a single float, will be removed in the future. Instead, set theamplitude
argument to a dictionary as described in the docstring.hnn_core.simulate_dipole
's argument ofpostproc
for post-processing will be removed in the future. Instead, use explicit smoothing and scaling viahnn_core.Dipole
methods.
API Changes
- New argument to
hnn_core.Network
initialization: you can now setmesh_shape
to easily make a grid of different sizes ofNetwork
s. hnn_core.Cell
initialization argumenttopology
has had both its name changed tocell_tree
and its data type significantly changed; see the API docs ofCell
for details.hnn_core.jones_2009_model
and other built-in Network Models includinghnn_core.law_2021_model
andhnn_core.calcium_model
all accept the aforementionedmesh_shape
argument likehnn_core.Network
.- The API for optimization has changed significantly. Instead of running the function
optimize_evoked
obtained usingfrom hnn_core.optimization import optimize_evoked
, you should use the newhnn_core.optimization.Optimizer
class and its methods; see our example of evoked-response optimization here. hnn_core.viz.plot_spikes_hist
now accepts more arguments, includinginvert_spike_types
,color
, and any**kwargs_hist
which can be applied tomatplotlib.axes.Axes.hist
. See the docstring for details.hnn_core.viz.plot_spikes_raster
now accepts many more arguments, includingcell_types
,colors
,show_legend
,marker_size
,dpl
, andoverlay_dipoles
. See the docstring for details.hnn_core.viz.plot_cell_morphology
now accepts more arguments, includingcolor
and several arguments related to its position and viewing window, includingpos
,xlim
,ylim
, andzlim
. See the docstring for details.hnn_core.viz.plot_laminar_csd
now accepts more arguments, includingvmin
,vmax
,sink
, andinterpolation
. See the docstring for details.hnn_core.parallel_backends.MPIBackend
now accepts many more arguments, includinguse_hwthreading_if_found
,sensible_default_cores
,override_hwthreading_option
, andoverride_oversubscribe_option
. See the docstring for details; the ability to customize it has been greatly increased.hnn_core.read_params
now accepts a new argumentfile_contents
which lets you pass in network configuration contents using a string.
People who contributed to this release (in alphabetical order of family name):
- Huzi Cheng
- [Tianqi Cheng][]
- [George Dang][]
- Dylan Daniels
- [Camilo Diaz][]
- [Katharina Duecker][]
- [Yaroslav Halchenko][]
- Mainak Jas
- [Dikshant Jha][]
- [Stephanie R. Jones][]
- [Shehroz Kashif][]
- Rajat Partani
- [Carolina Fernandez Pujol][]
- [Dan Toms][]
- [Abdul Samad Siddiqui][]
- [Austin E. Soplata][]
- [Ryan Thorpe][]
- Nick Tolley
[Ryan Tho...