@@ -40,14 +40,12 @@ Requirements
4040
4141 * Python _ 3.8 or later
4242 * numpy _ >= 1.19.5
43- * quantities _ >= 0.12 .1
44- * nose _ >= 1.1.2 (for running tests)
43+ * quantities _ >= 0.14 .1
44+ * pytest (for running tests)
4545 * Sphinx _ (for building documentation)
46- * (optional) coverage _ >= 2.85 (for measuring test coverage)
47- * (optional) scipy >= 0.12 (for MatlabIO)
48- * (optional) h5py >= 2.5 (for KwikIO)
49- * (optional) nixio (for NixIO)
50- * (optional) pillow (for TiffIO)
46+
47+ There are many optional dependencies for different IO modules (see below).
48+ If you don't install these, tests for those modules will be skipped.
5149
5250We strongly recommend you develop within a virtual environment (from virtualenv, venv or conda).
5351
@@ -65,26 +63,20 @@ To get a local copy of the repository::
6563 $ git clone [email protected] :<username>/python-neo.git 6664
6765Now you need to make sure that the ``neo `` package is on your PYTHONPATH.
68- You can do this either by installing Neo::
66+ You can do this by installing Neo with the *editable * option,
67+ which avoids reinstalling when there are changes in the code::
6968
7069 $ cd python-neo
71- $ python3 setup.py install
72-
73- (if you do this, you will have to re-run ``setup.py install `` any time you make
74- changes to the code) *or * by creating symbolic links from somewhere on your
75- PYTHONPATH, for example::
76-
77- $ ln -s python-neo/neo
78- $ export PYTHONPATH=/some/directory:${PYTHONPATH}
70+ $ pip install -e .
7971
80- An alternate solution is to install Neo with the * develop * option, this avoids
81- reinstalling when there are changes in the code ::
72+ To install all dependencies needed for testing, including optional dependencies
73+ for IO modules, run ::
8274
83- $ sudo python setup.py develop
75+ $ pip install -e .[test]
8476
85- or using the "-e" option to pip ::
77+ or if using the zsh shell ::
8678
87- $ pip install -e python-neo
79+ $ pip install -e ".[test]"
8880
8981To update to the latest version from the repository::
9082
@@ -97,20 +89,15 @@ Running the test suite
9789Before you make any changes, run the test suite to make sure all the tests pass
9890on your system::
9991
100- $ cd neo/test
101- $ python3 -m unittest discover
102-
103- If you have nose installed::
104-
105- $ nosetests
92+ $ pytest
10693
10794At the end, if you see "OK", then all the tests
10895passed (or were skipped because certain dependencies are not installed),
10996otherwise it will report on tests that failed or produced errors.
11097
11198To run tests from an individual file::
11299
113- $ python3 test_analogsignal.py
100+ $ pytest test_analogsignal.py
114101
115102
116103Writing tests
@@ -123,7 +110,7 @@ check that the test now passes.
123110
124111To see how well the tests cover the code base, run::
125112
126- $ nosetests --with-coverage --cover-package =neo --cover-erase
113+ $ pytest --cov =neo
127114
128115
129116Working on the documentation
@@ -221,11 +208,11 @@ Making a release
221208
222209 Add a section in :file: `/doc/source/whatisnew.rst ` for the release.
223210
224- First check that the version string (in :file: `neo/version.py `) is correct.
211+ First check that the version string (in :file: `pyproject.toml `) is correct.
225212
226- To build a source package ::
213+ To build source and wheel packages ::
227214
228- $ python setup.py sdist
215+ $ python -m build
229216
230217
231218Tag the release in the Git repository and push it::
@@ -237,7 +224,7 @@ Tag the release in the Git repository and push it::
237224
238225To upload the package to `PyPI `_ (the members of the `maintainers team `_ have the necessary permissions to do this)::
239226
240- $ twine upload dist/neo-0.X.Y.tar.gz
227+ $ twine upload dist/neo-0.X.Y.tar.gz dist/neo-0.X.Y-py3-none-any.whl
241228
242229.. talk about readthedocs
243230
0 commit comments