Skip to content

Commit

Permalink
Release vp1 (#255)
Browse files Browse the repository at this point in the history
* DOC: update version

* DOC: update what's new

* ENH: add install requires

* DOC: Update install instructions

* Comments by Chris

Co-authored-by: Christopher J. Bailey <bailey.cj@gmail.com>

* Cosmit

* DOC: mne is not needed any more

* Fix mod path for windows install

* add pyproject.toml for NEURON build dependency

Co-authored-by: Christopher J. Bailey <bailey.cj@gmail.com>
Co-authored-by: Nick Tolley <nic.m.tolley@gmail.com>
  • Loading branch information
3 people committed Mar 4, 2021
1 parent 6a75dc7 commit 99789af
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 33 deletions.
42 changes: 26 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,17 @@ Installation
============

We recommend the `Anaconda Python distribution <https://www.anaconda.com/products/individual>`_.
To install ``hnn-core``, you first need to install its dependencies::
To install ``hnn-core``, simply do::

$ conda install numpy matplotlib scipy
$ pip install hnn_core

Additionally, you would need Neuron which is available here:
`https://neuron.yale.edu/neuron/ <https://neuron.yale.edu/neuron/>`_.
Note installing Neuron using the traditional installer may make it hard to manage
within virtual environments such as Anaconda. For this reason, we recommend the
pip installer:

$ pip install NEURON
and it will install ``hnn-core`` along with the dependencies which are not already installed.

Since ``hnn-core`` does not yet have a stable release, we recommend installing the nightly version. This may change in the future if more users start using it.
Note that if you installed Neuron using the traditional installer package, it is recommended
to remove it first and unset ``PYTHONPATH`` and ``PYTHONHOME`` if they were set. This is
because the pip installer works better with virtual environments such as the ones provided by ``conda``.

To install the latest version of the code (nightly) do::
If you want to track the latest developments of ``hnn-core``, you can install the current version of the code (nightly) with::

$ pip install --upgrade https://api.github.com/repos/jonescompneurolab/hnn-core/zipball/master

Expand All @@ -66,6 +62,25 @@ To check if everything worked fine, you can do::

and it should not give any error messages.

**Parallel backends**

For further instructions on installation and usage of parallel backends for using more
than one CPU core, refer to `parallel_backends`_

**Note for Windows users**

The pip installer for Neuron does not yet work for Windows. In this case, it is better to
install ``hnn_core`` without the dependencies::

$ pip install hnn_core --no-deps

and then install the dependencies separately::

$ pip install scipy numpy matplotlib

and install Neuron using the traditional package installer available here
`https://neuron.yale.edu/neuron/ <https://neuron.yale.edu/neuron/>`_.

Documentation and examples
==========================

Expand All @@ -81,11 +96,6 @@ and executing the scripts using the ``%run``-magic::

When executed in this manner, the scripts will execute entirely, after which all plots will be shown. For an even more interactive experience, in which you execute code and interrogate plots in sequential blocks, we recommend editors such as `VS Code <https://code.visualstudio.com>`_ and `Spyder <https://docs.spyder-ide.org/current/index.html>`_.

Parallel backends
=================

For further instructions on installation and usage of parallel backends for using more than one core, refer to `parallel_backends`_

Bug reports
===========

Expand Down
6 changes: 3 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
# -- Project information -----------------------------------------------------

project = 'hnn-core'
copyright = '2019, Mainak Jas'
author = 'Mainak Jas'
copyright = '2021, HNN Developers'
author = 'HNN Developers'

# The short X.Y version
version = ''
version = '0.1'
# The full version, including alpha/beta/rc tags
release = ''

Expand Down
26 changes: 22 additions & 4 deletions doc/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,28 @@ What's new?

.. currentmodule:: hnn_core

.. _current:
.. _current
Current
-------

Changelog
~~~~~~~~~

Bug
~~~

API
~~~

.. _0.1:

0.1
---

Changelog
~~~~~~~~~

- Add ability to simulate multiple trials in parallel using joblibs, by `Mainak Jas`_ in `#44 <https://github.com/jonescompneurolab/hnn-core/pull/44>`_

- Rhythmic inputs can now be turned off by setting their conductance weights to 0 instead of setting their start times to exceed the simulation stop time, by `Ryan Thorpe`_ in `#105 <https://github.com/jonescompneurolab/hnn-core/pull/105>`_
Expand Down Expand Up @@ -91,10 +105,14 @@ API

- Force conversion to nAm (from fAm) for output of :func:`~hnn_core.dipole.simulate_dipole` regardless of ``postproc``-argument, which now only controls parameter file-based smoothing and scaling, by `Christopher Bailey`_ in `#264 <https://github.com/jonescompneurolab/hnn-core/pull/264>`_

.. _Mainak Jas: http://jasmainak.github.io/
People who contributed to this release (in alphabetical order):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. _Blake Caldwell: https://github.com/blakecaldwell
.. _Ryan Thorpe: https://github.com/rythorpe
.. _Christopher Bailey: https://github.com/cjayb
.. _Nick Tolley: https://github.com/ntolley
.. _Carmen Kohl: https://github.com/kohl-carmen
.. _Mainak Jas: http://jasmainak.github.io/
.. _Nick Tolley: https://github.com/ntolley
.. _Ryan Thorpe: https://github.com/rythorpe
.. _Samika Kanekar: https://github.com/samikane
.. _Stephanie Jones: https://github.com/stephanie-r-jones
2 changes: 1 addition & 1 deletion hnn_core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
from .basket import L2Basket, L5Basket
from .parallel_backends import MPIBackend, JoblibBackend

__version__ = '0.1.dev0'
__version__ = '0.1'
3 changes: 0 additions & 3 deletions hnn_core/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,6 @@ def plot_tfr_morlet(dpl, freqs, *, n_cycles=7., tmin=None, tmax=None,
colormap='inferno', colorbar=True, show=True):
"""Plot Morlet time-frequency representation of dipole time course
NB: Calls `~mne.time_frequency.tfr_array_morlet`, so ``mne`` must be
installed.
Parameters
----------
dpl : instance of Dipole | list of Dipole instances
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=40.8.0", 'NEURON >=7.7']
build-backend = "setuptools.build_meta:__legacy__"
19 changes: 13 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ def finalize_options(self):

def run(self):
print("=> Building mod files ...")
mod_path = op.join(op.dirname(__file__), 'hnn_core', 'mod')

if platform.system() == 'Windows':
mod_path = op.join(op.dirname(__file__), 'mod')
shell = True
else:
mod_path = op.join(op.dirname(__file__), 'hnn_core', 'mod')
shell = False

process = subprocess.Popen(['nrnivmodl'], cwd=mod_path,
Expand Down Expand Up @@ -98,11 +99,17 @@ def run(self):
'Operating System :: MacOS',
],
platforms='any',
install_requires=[
'numpy >=1.14',
'NEURON >=7.7',
'matplotlib',
'scipy'
],
packages=find_packages(),
package_data={'hnn_core':
['param/*.json',
'mod/*',
'mod/x86_64/*',
'mod/x86_64/.lib/*']},
package_data={'hnn_core': [
'param/*.json',
'mod/*',
'mod/x86_64/*',
'mod/x86_64/.lib/*']},
cmdclass={'build_py': build_py_mod, 'build_mod': BuildMod}
)

0 comments on commit 99789af

Please sign in to comment.