Skip to content

Commit 99789af

Browse files
jasmainakcjaybntolley
authored
Release vp1 (#255)
* 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Nick Tolley <[email protected]>
1 parent 6a75dc7 commit 99789af

File tree

7 files changed

+68
-33
lines changed

7 files changed

+68
-33
lines changed

README.rst

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,17 @@ Installation
4242
============
4343

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

47-
$ conda install numpy matplotlib scipy
47+
$ pip install hnn_core
4848

49-
Additionally, you would need Neuron which is available here:
50-
`https://neuron.yale.edu/neuron/ <https://neuron.yale.edu/neuron/>`_.
51-
Note installing Neuron using the traditional installer may make it hard to manage
52-
within virtual environments such as Anaconda. For this reason, we recommend the
53-
pip installer:
54-
55-
$ pip install NEURON
49+
and it will install ``hnn-core`` along with the dependencies which are not already installed.
5650

57-
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.
51+
Note that if you installed Neuron using the traditional installer package, it is recommended
52+
to remove it first and unset ``PYTHONPATH`` and ``PYTHONHOME`` if they were set. This is
53+
because the pip installer works better with virtual environments such as the ones provided by ``conda``.
5854

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

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

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

6763
and it should not give any error messages.
6864

65+
**Parallel backends**
66+
67+
For further instructions on installation and usage of parallel backends for using more
68+
than one CPU core, refer to `parallel_backends`_
69+
70+
**Note for Windows users**
71+
72+
The pip installer for Neuron does not yet work for Windows. In this case, it is better to
73+
install ``hnn_core`` without the dependencies::
74+
75+
$ pip install hnn_core --no-deps
76+
77+
and then install the dependencies separately::
78+
79+
$ pip install scipy numpy matplotlib
80+
81+
and install Neuron using the traditional package installer available here
82+
`https://neuron.yale.edu/neuron/ <https://neuron.yale.edu/neuron/>`_.
83+
6984
Documentation and examples
7085
==========================
7186

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

8297
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>`_.
8398

84-
Parallel backends
85-
=================
86-
87-
For further instructions on installation and usage of parallel backends for using more than one core, refer to `parallel_backends`_
88-
8999
Bug reports
90100
===========
91101

doc/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
# -- Project information -----------------------------------------------------
2525

2626
project = 'hnn-core'
27-
copyright = '2019, Mainak Jas'
28-
author = 'Mainak Jas'
27+
copyright = '2021, HNN Developers'
28+
author = 'HNN Developers'
2929

3030
# The short X.Y version
31-
version = ''
31+
version = '0.1'
3232
# The full version, including alpha/beta/rc tags
3333
release = ''
3434

doc/whats_new.rst

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,28 @@ What's new?
77

88
.. currentmodule:: hnn_core
99

10-
.. _current:
10+
.. _current
1111
1212
Current
1313
-------
1414

1515
Changelog
1616
~~~~~~~~~
1717

18+
Bug
19+
~~~
20+
21+
API
22+
~~~
23+
24+
.. _0.1:
25+
26+
0.1
27+
---
28+
29+
Changelog
30+
~~~~~~~~~
31+
1832
- Add ability to simulate multiple trials in parallel using joblibs, by `Mainak Jas`_ in `#44 <https://github.com/jonescompneurolab/hnn-core/pull/44>`_
1933

2034
- 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>`_
@@ -91,10 +105,14 @@ API
91105

92106
- 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>`_
93107

94-
.. _Mainak Jas: http://jasmainak.github.io/
108+
People who contributed to this release (in alphabetical order):
109+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110+
95111
.. _Blake Caldwell: https://github.com/blakecaldwell
96-
.. _Ryan Thorpe: https://github.com/rythorpe
97112
.. _Christopher Bailey: https://github.com/cjayb
98-
.. _Nick Tolley: https://github.com/ntolley
99113
.. _Carmen Kohl: https://github.com/kohl-carmen
114+
.. _Mainak Jas: http://jasmainak.github.io/
115+
.. _Nick Tolley: https://github.com/ntolley
116+
.. _Ryan Thorpe: https://github.com/rythorpe
100117
.. _Samika Kanekar: https://github.com/samikane
118+
.. _Stephanie Jones: https://github.com/stephanie-r-jones

hnn_core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
from .basket import L2Basket, L5Basket
77
from .parallel_backends import MPIBackend, JoblibBackend
88

9-
__version__ = '0.1.dev0'
9+
__version__ = '0.1'

hnn_core/viz.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,6 @@ def plot_tfr_morlet(dpl, freqs, *, n_cycles=7., tmin=None, tmax=None,
339339
colormap='inferno', colorbar=True, show=True):
340340
"""Plot Morlet time-frequency representation of dipole time course
341341
342-
NB: Calls `~mne.time_frequency.tfr_array_morlet`, so ``mne`` must be
343-
installed.
344-
345342
Parameters
346343
----------
347344
dpl : instance of Dipole | list of Dipole instances

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=40.8.0", 'NEURON >=7.7']
3+
build-backend = "setuptools.build_meta:__legacy__"

setup.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,12 @@ def finalize_options(self):
5050

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

5554
if platform.system() == 'Windows':
55+
mod_path = op.join(op.dirname(__file__), 'mod')
5656
shell = True
5757
else:
58+
mod_path = op.join(op.dirname(__file__), 'hnn_core', 'mod')
5859
shell = False
5960

6061
process = subprocess.Popen(['nrnivmodl'], cwd=mod_path,
@@ -98,11 +99,17 @@ def run(self):
9899
'Operating System :: MacOS',
99100
],
100101
platforms='any',
102+
install_requires=[
103+
'numpy >=1.14',
104+
'NEURON >=7.7',
105+
'matplotlib',
106+
'scipy'
107+
],
101108
packages=find_packages(),
102-
package_data={'hnn_core':
103-
['param/*.json',
104-
'mod/*',
105-
'mod/x86_64/*',
106-
'mod/x86_64/.lib/*']},
109+
package_data={'hnn_core': [
110+
'param/*.json',
111+
'mod/*',
112+
'mod/x86_64/*',
113+
'mod/x86_64/.lib/*']},
107114
cmdclass={'build_py': build_py_mod, 'build_mod': BuildMod}
108115
)

0 commit comments

Comments
 (0)