Skip to content

Commit a5cc295

Browse files
committed
Merge branch 'release-1.3.0'
2 parents 73f9751 + 1afce98 commit a5cc295

File tree

67 files changed

+54631
-108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+54631
-108
lines changed

docs/source/authors_and_contributors.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ contribution, and may not be the current affiliation of a contributor.
1111
- Moritz Layer [1, 2]
1212
- Johanna Senk [1]
1313
- Simon Essink [1, 2]
14-
- Alexander van Meegen [1, 2]
14+
- Alexander van Meegen [1]
15+
- Aitor Morales-Gregorio [1]
1516
- Karolína Korvasova [1, 2]
1617
- Jari Pronold [1, 2]
1718
- Hannah Bos [1, 2]

docs/source/bib/nnmt.bib

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@ @article{amit1997
4040
journal = {Network: Computation in Neural Systems}
4141
}
4242

43+
@article{beaulieu2008,
44+
doi = {10.1109/tcomm.2008.060123},
45+
url = {https://doi.org/10.1109/tcomm.2008.060123},
46+
year = {2008},
47+
month = mar,
48+
publisher = {Institute of Electrical and Electronics Engineers ({IEEE})},
49+
volume = {56},
50+
number = {3},
51+
pages = {331--333},
52+
author = {N.C. Beaulieu},
53+
title = {Fast convenient numerical computation of lognormal characteristic functions},
54+
journal = {{IEEE} Transactions on Communications}
55+
}
56+
4357
@article{bos2016,
4458
doi = {10.1371/journal.pcbi.1005132},
4559
url = {https://doi.org/10.1371/journal.pcbi.1005132},
@@ -55,6 +69,19 @@ @article{bos2016
5569
journal = {{PLOS} Computational Biology}
5670
}
5771

72+
@article{brunel2000,
73+
doi = {10.1023/a:1008925309027},
74+
url = {https://doi.org/10.1023/a:1008925309027},
75+
year = {2000},
76+
publisher = {Springer Science and Business Media {LLC}},
77+
volume = {8},
78+
number = {3},
79+
pages = {183--208},
80+
author = {Nicolas Brunel},
81+
title = {Dynamics of Sparsely Connected Networks of Excitatory and Inhibitory Spiking Neurons},
82+
journal = {Journal of Computational Neuroscience}
83+
}
84+
5885
@article{fourcaud2002,
5986
doi = {10.1162/089976602320264015},
6087
url = {https://doi.org/10.1162/089976602320264015},
@@ -69,6 +96,16 @@ @article{fourcaud2002
6996
journal = {Neural Computation}
7097
}
7198

99+
@article{gewaltig2007,
100+
author = {Marc-Oliver Gewaltig and Markus Diesmann},
101+
title = {NEST (NEural Simulation Tool)},
102+
journal = {Scholarpedia},
103+
year = {2007},
104+
volume = {2},
105+
pages = {1430},
106+
number = {4}
107+
}
108+
72109
@article{grecco2018,
73110
title={Pint},
74111
author={Grecco, Hernan E.},
@@ -127,6 +164,18 @@ @article{layer2022
127164
doi = {10.3389/fninf.2022.835657},
128165
}
129166

167+
@article{layer2023,
168+
doi = {10.48550/ARXIV.2308.00421},
169+
url = {https://arxiv.org/abs/2308.00421},
170+
author = {Layer, Moritz and Helias, Moritz and Dahmen, David},
171+
keywords = {Disordered Systems and Neural Networks (cond-mat.dis-nn), Neurons and Cognition (q-bio.NC), FOS: Physical sciences, FOS: Physical sciences, FOS: Biological sciences, FOS: Biological sciences},
172+
title = {Beyond-mean-field theory for the statistics of neural coordination},
173+
publisher = {arXiv},
174+
journal={arXiv},
175+
year = {2023},
176+
copyright = {Creative Commons Attribution 4.0 International}
177+
}
178+
130179
@article{potjans2014,
131180
doi = {10.1093/cercor/bhs358},
132181
url = {https://doi.org/10.1093/cercor/bhs358},
@@ -141,6 +190,17 @@ @article{potjans2014
141190
journal = {Cerebral Cortex}
142191
}
143192

193+
@article{Saberali2012,
194+
doi = {10.1109/glocom.2012.6503436},
195+
url = {https://doi.org/10.1109/glocom.2012.6503436},
196+
year = {2012},
197+
month = dec,
198+
publisher = {{IEEE}},
199+
author = {Seyed Ali Saberali and Norman C. Beaulieu},
200+
title = {New approximations to the lognormal characteristic function},
201+
booktitle = {2012 {IEEE} Global Communications Conference ({GLOBECOM})}
202+
}
203+
144204
@article{sanzeni2020,
145205
doi = {10.1371/journal.pcbi.1008165},
146206
url = {https://doi.org/10.1371/journal.pcbi.1008165},

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
author = 'Moritz Layer, Johanna Senk, Simon Essink, Alexander van Meegen, Hannah Bos, Moritz Helias'
2727

2828
# The full version, including alpha/beta/rc tags
29-
release = '1.2.0'
29+
release = '1.3.0'
3030

3131

3232
# -- General configuration ---------------------------------------------------

docs/source/contributor_guide.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,3 +395,9 @@ a :ref:`release note <sec_release_notes>` should be added, and the list of
395395
:ref:`authors and contributors <sec_authors_and_contributors>`, as well as the
396396
:ref:`acknowledgements <sec_acknowledgements>` should be updated if required.
397397

398+
****************************
399+
How to publish a new release
400+
****************************
401+
402+
Please follow our :ref:`step-by-step guide <sec_how_to_make_a_new_release>` for
403+
publishing a new release.

docs/source/examples.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ Examples
1515
bos_2016_index.rst
1616
mapping_lif_rate_and_spatial_patterns_index.rst
1717
auto_examples/binary_rate_simulation/binary_sim_vs_thy.rst
18+
auto_examples/prediction_of_simulation_results/prediction_and_simulation_EI_network.rst
Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
.. _sec_how_to_make_a_new_release:
2+
3+
====================================
4+
How to publish a new release of NNMT
5+
====================================
6+
7+
1. Checkout the develop branch
8+
9+
.. code::
10+
11+
git checkout develop
12+
git pull
13+
14+
15+
2. Check that the code is working
16+
17+
Make sure the new feature you implemented does what it is supposed to do.
18+
19+
3. Check that code is tested
20+
21+
The point above should be done by writing tests that ensure this.
22+
23+
4. Check that code is well documented
24+
25+
Follow the guidelines in the docs for this.
26+
27+
5. Check the release notes
28+
29+
All changes need to be documented in the release notes.
30+
31+
6. Check that all tests run
32+
33+
.. code::
34+
35+
cd tests/
36+
pytest
37+
cd ../
38+
39+
7. Create a release branch
40+
41+
.. code::
42+
43+
git checkout -b release-<release_number>
44+
45+
46+
8. Fix anything left
47+
48+
9. Update version numbers to pre-format
49+
50+
In ``nnmt/__init__.py``, ``docs/source/conf.py``, and ``setup.py``.
51+
52+
**WARNING**: You can upload each file only once to testpypi, even if you delete them on testpypi. Therefore use version names like ``1.0.0a0``.
53+
54+
10. Create new conda environment and check local installation
55+
56+
.. code::
57+
58+
conda create -n temp0
59+
conda activate temp0
60+
conda install setuptools
61+
pip install .
62+
cd tests/
63+
pytest
64+
cd ../
65+
66+
11. Create sdist and wheel
67+
68+
Remove any old wheels
69+
70+
.. code::
71+
72+
rm -r dist/
73+
74+
Then check that ``setup.py`` contains all necessary data by running
75+
76+
.. code::
77+
78+
python setup.py check
79+
80+
If this works, you can create the sdist and wheel source distribution using
81+
82+
.. code::
83+
84+
python setup.py sdist bdist_wheel
85+
86+
which creates a new directory ``dist``.
87+
88+
12. Upload to test.pypi
89+
90+
Then install ``twine`` and upload to testpypi
91+
92+
**WARNING**: You can upload each file only once, even if you delete them on
93+
testpypi. Therefore use version names like ``1.0.0a``.
94+
95+
.. code::
96+
97+
conda install twine
98+
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
99+
100+
13. Create new conda env and test install from test.pyi
101+
102+
.. code::
103+
104+
conda create -n temp1
105+
conda activate temp1
106+
conda install pip
107+
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple nnmt==<release_number>
108+
cd tests/
109+
pytest
110+
cd ../
111+
112+
14. If this fails, fix problems, change version numbers to ``1.0.0b`` and repeat.
113+
114+
15. Update version numbers to final format
115+
116+
In ``nnmt/__init__.py``, ``docs/source/conf.py``, and ``setup.py``,
117+
118+
and commit
119+
120+
.. code::
121+
122+
git add nnmt/__init__.py docs/source/conf.py setup.py
123+
git commit -m 'Final update of version numbers'
124+
125+
16. Merge into ``master`` and ``develop`` and delete release branch
126+
127+
.. code::
128+
129+
git checkout master
130+
git pull
131+
git merge --no-ff release-<release_number>
132+
git push
133+
134+
git checkout develop
135+
git pull
136+
git merge --no-ff release-<release_number>
137+
git push
138+
139+
git checkout master
140+
git branch -d release-<release_number>
141+
142+
17. Create sdist and wheel
143+
144+
.. code::
145+
146+
conda activate temp0
147+
rm -r dist/
148+
python setup.py check
149+
python setup.py sdist bdist_wheel
150+
151+
18. Upload to test.pypi
152+
153+
.. code::
154+
155+
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
156+
157+
19. Create new conda env and test install from test.pypi
158+
159+
.. code::
160+
161+
conda create -n temp2
162+
conda activate temp2
163+
conda install pip
164+
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple nnmt==<release_number>
165+
cd tests/
166+
pytest
167+
cd ../
168+
169+
20. Upload to pypi
170+
171+
Finally, you can upload your package to pypi.
172+
173+
**WARNING**: This cannot be reversed, and the code cannot be changed
174+
afterwards, so the package needs to be in a final state.
175+
176+
.. code::
177+
178+
conda activate temp0
179+
twine upload dist/*
180+
181+
21. Test pip install
182+
183+
.. code:
184+
185+
conda create -n temp3
186+
conda activate temp3
187+
conda install pip
188+
pip install nnmt==<release_number>
189+
cd tests/
190+
pytest
191+
cd ../
192+
193+
22. Remove temporary conda environments
194+
195+
.. code::
196+
197+
conda activate base
198+
conda env remove -n temp0
199+
conda env remove -n temp1
200+
conda env remove -n temp2
201+
conda env remove -n temp3
202+
203+
23. Create Release on GitHub
204+
205+
Optional: Create tag from command line
206+
207+
.. code::
208+
209+
git tag -a v<release_number>
210+
git push origin --tags
211+
212+
Note that releases are a GitHub feature and can only be done on GitHub itself.
213+
214+
24. Upload compressed compy of the repository to Zenodo
215+
216+
25. Check readthedocs

docs/source/release_notes.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@
44
Release notes
55
=============
66

7+
**********
8+
NNMT 1.3.0
9+
**********
10+
11+
- The option to use a lognormal delay distribution has been added to the
12+
calcultion of the delay distribution matrix in ``nnmt.network_properties``.
13+
As the characteristic function of a lognormal distribution has no closed
14+
analytic form, the numerical integration proposed in :cite:t:`beaulieu2008`
15+
has been implemented.
16+
- Add functions for computing the cvs of lif neurons: :func:`nnmt.lif.exp.cvs`,
17+
:func:`nnmt.lif.exp._cvs`, and :func:`nnmt.lif.exp._cvs_single_population`.
18+
- Add functions for computing pairwise_effective_connectivity in linear
19+
response approximation: :func:`nnmt.lif.exp.pairwise_effective_connectivity`,
20+
:func:`nnmt.lif.exp._pairwise_effective_connectivity`.
21+
- Add functions for computing the spectral bound of the pairwise effective
22+
connectivity matrix: :func:`nnmt.lif.exp.spectral_bound`,
23+
:func:`nnmt.lif.exp._spectral_bound`.
24+
- Add functions for computing the pairwise covariances in linear response
25+
approximation: :func:`nnmt.lif.exp.pairwise_covariances`,
26+
:func:`nnmt.lif.exp._pairwise_covariances`.
27+
- Add an example on how to use NNMT to predict the firing rates, CVs, and
28+
pair-wise covariances of a simple E-I network. The results are then compared
29+
to a NEST simulation.
30+
731
**********
832
NNMT 1.2.0
933
**********

docs/source/tests.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ environment specified in the provided ``environment.yaml`` file, and running
1212
1313
pytest
1414
15-
from the root directory (the one containing ``tests/`` and ``nnmt/``). If you
16-
want to be more specific, you can, for example, only run the unit tests:
15+
from the ``test/`` directory. If you want to be more specific, you can, for
16+
example, only run the unit tests:
1717

1818
.. code::
1919
20-
pytest tests/unit/
20+
pytest unit/
2121
2222
Or just a single test:
2323

2424
.. code::
2525
26-
pytest tests/unit/lif/test_exp.py::Test_firing_rate_shift::test_correct_output
26+
pytest unit/lif/test_exp.py::Test_firing_rate_shift::test_correct_output
2727
2828
See the `pytest documentation <https://docs.pytest.org/en/6.2.x/#>`_ for all
2929
available options.

0 commit comments

Comments
 (0)