Skip to content
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

Hopefully RTD works #36

Merged
merged 12 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dendrify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
update_default_params)
from .equations import library
from .neuronmodel import NeuronModel, PointNeuronModel

__version__ = '2.1.4'
__author__ = 'Michalis Pagkalos'
__email__ = '[email protected]'
19 changes: 10 additions & 9 deletions dendrify/neuronmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,16 @@ def config_dspikes(self, event_name: str,
for comp in self._compartments:
if isinstance(comp, Dendrite) and comp._dspike_params:
event_id = f"{event_name}_{comp.name}"
dt = defaultclock.dt
d = {f"Vth_{event_id}": threshold,
f"duration_rise_{event_id}": comp._timestep(duration_rise, dt),
f"duration_fall_{event_id}": comp._timestep(duration_fall, dt),
f"E_rise_{event_name}": comp._ionic_param(reversal_rise),
f"E_fall_{event_name}": comp._ionic_param(reversal_fall),
f"offset_fall_{event_id}": comp._timestep(offset_fall, dt),
f"refractory_{event_id}": comp._timestep(refractory, dt)}
comp._dspike_params[event_id].update(d)
if event_id in comp._dspike_params:
dt = defaultclock.dt
d = {f"Vth_{event_id}": threshold,
f"duration_rise_{event_id}": comp._timestep(duration_rise, dt),
f"duration_fall_{event_id}": comp._timestep(duration_fall, dt),
f"E_rise_{event_name}": comp._ionic_param(reversal_rise),
f"E_fall_{event_name}": comp._ionic_param(reversal_fall),
f"offset_fall_{event_id}": comp._timestep(offset_fall, dt),
f"refractory_{event_id}": comp._timestep(refractory, dt)}
comp._dspike_params[event_id].update(d)

def make_neurongroup(self,
N: int,
Expand Down
9 changes: 9 additions & 0 deletions docs_sphinx/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Release notes
=============

Version 2.1.4
-------------
* Fixed a bug that raised an error when config_dspikes was called multiple times
to configure different dSpike types. Thank you Tim Bax for discovering and
reporting this issue.
* Checked compatibility with Brian 2.7.0.
* Added package metadata (e.g. dendrify.__version__ works now).
* Minor documentation improvements.

Version 2.1.3
-------------
* Changed package requirements to fix installation conflicts with Brian 2.6.0.
Expand Down
11 changes: 8 additions & 3 deletions docs_sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import sys
import os, sys

sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath('../../..'))



# -- Project information -------------------------------------------------------
project = 'Dendrify'
copyright = '2024, Michalis Pagkalos'
author = 'Michalis Pagkalos'
release = '2.1.3'
release = '2.1.4'
# release = re.search(
# r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
# io.open('dendrify/__init__.py', encoding='utf_8_sig').read()
# ).group(1)


# -- General configuration -----------------------------------------------------
Expand Down
Binary file modified docs_sphinx/source/examples/_static/comp_backprop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs_sphinx/source/examples/comp_backprop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ In this example we show:
# Run simulation
net = b.Network(neuron, ap_reset, M)
net.run(10*ms)
neuron.I_ext_soma = 150*pA
neuron.I_ext_soma = 115*pA
net.run(100*ms)
neuron.I_ext_soma = 0*pA
net.run(60*ms)
Expand Down
2 changes: 1 addition & 1 deletion examples_new/comp_backprop.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
# Run simulation
net = b.Network(neuron, ap_reset, M)
net.run(10*ms)
neuron.I_ext_soma = 150*pA
neuron.I_ext_soma = 115*pA
net.run(100*ms)
neuron.I_ext_soma = 0*pA
net.run(60*ms)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import find_packages, setup
VERSION = '2.1.4'

VERSION = '2.1.3'
DESCRIPTION = 'A package for adding dendrites to SNNs'
with open("README.rst") as f:
LONG_DESCRIPTION = f.read()
Expand All @@ -15,7 +15,7 @@
long_description_content_type="text/x-rst; charset=UTF-8",
long_description=LONG_DESCRIPTION,
packages=find_packages(),
install_requires=['brian2==2.6.0'],
install_requires=['brian2==2.7.0'],
keywords=['python', 'brian2', 'dendrites', 'SNNs', 'network models'],
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down