Skip to content

Commit b0cfbcc

Browse files
committed
Merge remote-tracking branch 'upstream/main' into Fix_Improper_Method_Call
2 parents 975b517 + b3d202f commit b0cfbcc

File tree

13 files changed

+98
-293
lines changed

13 files changed

+98
-293
lines changed

README.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
.. image:: https://codecov.io/gh/nipy/nipy/branch/main/graph/badge.svg
55
:target: https://app.codecov.io/gh/nipy/nipy/branch/main
66

7-
.. Following contents should be from LONG_DESCRIPTION in nipy/info.py
8-
9-
107
====
118
NIPY
129
====

doc/devel/guidelines/make_release.rst

Lines changed: 11 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,6 @@ A guide to making a nipy release
66

77
A guide for developers who are doing a nipy release
88

9-
.. _release-tools:
10-
11-
Release tools
12-
=============
13-
14-
Run::
15-
16-
make check-version-info
17-
18-
This installs the code from a git archive, from the repository, and for
19-
in-place use, and runs the ``get_info()`` function to confirm that
20-
installation is working and information parameters are set correctly. Look for the output at the end, which should look something like::
21-
22-
########
23-
Versions
24-
########
25-
26-
nipy - zip: 0.5.0
27-
nipy - install: 0.5.0
28-
nipy - editable: 0.5.0
29-
30-
where the `0.5.0` should be the version in `nipy/info.py`.
31-
329
.. _release-checklist:
3310

3411
Release checklist
@@ -56,20 +33,16 @@ Release checklist
5633

5734
* Check the copyright years in ``doc/conf.py`` and ``LICENSE``
5835

59-
* Refresh the ``README.rst`` text from the ``LONG_DESCRIPTION`` in ``info.py``
60-
by running ``make refresh-readme``.
61-
62-
Check the output of::
36+
* Check the output of::
6337

6438
rst2html.py README.rst > ~/tmp/readme.html
6539

6640
because this will be the output used by PyPI_
6741

68-
* Check the dependencies listed in ``nipy/info.py`` (e.g.
69-
``NUMPY_MIN_VERSION``) and in ``requirements.txt`` and in
70-
``doc/users/installation.rst``. They should at least match. Do they still
71-
hold? Make sure ``.travis.yml`` is testing these minimum dependencies
72-
specifically.
42+
* Check the dependencies listed in ``pyproject.toml`` and in
43+
``requirements.txt`` and in ``doc/users/installation.rst``. They should at
44+
least match. Do they still hold? Make sure ``.travis.yml`` is testing these
45+
minimum dependencies specifically.
7346

7447
* Check the examples in python 2 and python 3, by
7548
running something like::
@@ -131,17 +104,15 @@ Doing the release
131104

132105
* The release should now be ready.
133106

134-
* Edit :file:`nipy/info.py` to set ``_version_extra`` to ``''``; commit.
107+
* Edit :file:`nipy/__init__.py` to set ``version`` to e.g. ``0.5.2``; commit.
135108
Then::
136109

137110
make source-release
138111

139112
* For the wheel build / upload, follow the `wheel builder README`_
140-
instructions again. Edit the ``.travis.yml`` and ``appveyor.yml`` files (if
141-
present) to give the release tag to build. Check the build has passed on
142-
the Travis-CI interface at https://travis-ci.org/MacPython/nipy-wheels. Now
143-
follow the instructions in the page above to download the built wheels to a
144-
local machine and upload to PyPI.
113+
instructions again. Push. Check the build has passed on the Github
114+
interface. Now follow the instructions in the page above to download the
115+
built wheels to a local machine and upload to PyPI.
145116

146117
* Once everything looks good, you are ready to upload the source release to
147118
PyPI. See `setuptools intro`_. Make sure you have a file ``\$HOME/.pypirc``,
@@ -174,23 +145,12 @@ Doing the release
174145
further substantial development (often called 'trunk') and another for
175146
maintenance releases.
176147

177-
* Branch to maintenance::
178-
179-
git co -b maint/0.5.x
180-
181-
Set ``_version_extra`` back to ``.dev1`` and bump ``_version_micro`` by
182-
1. Thus the maintenance series will have version numbers like - say
183-
- '0.5.1.dev1' until the next maintenance release - say '0.5.1'.
184-
Commit. Don't forget to push upstream with something like::
185-
186-
git push upstream maint/0.2.x --set-upstream
187-
188148
* Start next development series::
189149

190150
git co main-master
191151

192-
then restore ``.dev`` to ``_version_extra``, and bump
193-
``_version_minor`` by 1. Thus the development series ('trunk') will
152+
then restore ``.dev`` to ``__version__``, and bump
153+
the minor version by 1. Thus the development series ('trunk') will
194154
have a version number here of '0.3.0.dev' and the next full release
195155
will be '0.3.0'.
196156

nipy/__init__.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
""" Nipy
2+
3+
Nipy is a library for neuroimaging analysis.
4+
"""
15

26
import os
37

4-
from .info import LONG_DESCRIPTION as __doc__
5-
from .info import STATUS as __status__
6-
from .info import URL as __url__
7-
from .info import __version__
8+
__version__ = "0.5.1.dev1"
89

910

1011
def _test_local_install():
@@ -32,10 +33,3 @@ def _test_local_install():
3233

3334
# Cleanup namespace
3435
del _test_local_install
35-
# If this file is exec after being imported, the following lines will
36-
# fail
37-
try:
38-
del version
39-
del Tester
40-
except:
41-
pass

nipy/algorithms/statistics/formula/formulae.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def __add__(self, other):
202202

203203

204204
def terms(names, **kwargs):
205-
''' Return list of terms with names given by `names`
205+
r''' Return list of terms with names given by `names`
206206
207207
This is just a convenience in defining a set of terms, and is the
208208
equivalent of ``sympy.symbols`` for defining symbols in sympy.
@@ -215,7 +215,7 @@ def terms(names, **kwargs):
215215
names : str or sequence of str
216216
If a single str, can specify multiple ``Term``s with string
217217
containing space or ',' as separator.
218-
\\**kwargs : keyword arguments
218+
\*\*kwargs : keyword arguments
219219
keyword arguments as for ``sympy.symbols``
220220
221221
Returns

nipy/core/reference/coordinate_map.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2301,22 +2301,22 @@ def make_cmap(self, domain_N, xform, inv_xform=None):
23012301
inv_xform)
23022302

23032303
def __call__(self, *args, **kwargs):
2304-
""" Create affine or non-affine coordinate map
2304+
r""" Create affine or non-affine coordinate map
23052305
23062306
Parameters
23072307
----------
2308-
\\*args :
2308+
\*args :
23092309
Arguments to ``make_affine`` or ``make_cmap`` methods. We check the
23102310
first argument to see if it is a scalar or an affine, and pass the
2311-
\\*args, \\*\\*kwargs to ``make_cmap`` or ``make_affine``
2311+
\*args, \*\*kwargs to ``make_cmap`` or ``make_affine``
23122312
respectively
2313-
\\*\\*kwargs:
2313+
\*\*kwargs:
23142314
See above
23152315
23162316
Returns
23172317
-------
23182318
cmap : ``CoordinateMap`` or ``AffineTransform``
2319-
Affine if the first \\*arg was an affine array, otherwise a
2319+
Affine if the first \*arg was an affine array, otherwise a
23202320
Coordinate Map.
23212321
"""
23222322
arg0 = np.asarray(args[0])

nipy/info.py

Lines changed: 3 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -1,172 +1,8 @@
1-
""" This file contains defines parameters for nipy that we use to fill
2-
settings in setup.py, the nipy top-level docstring, and for building the
3-
docs. In setup.py in particular, we exec this file, so it cannot import nipy
1+
""" Data package information
42
"""
53

6-
# nipy version information. An empty _version_extra corresponds to a
7-
# full release. '.devN' as a _version_extra string means this is a development
8-
# version
9-
# See: https://www.python.org/dev/peps/pep-0440
10-
_version_major = 0
11-
_version_minor = 5
12-
_version_micro = 1
13-
_version_extra = '.dev1' # For development
14-
# _version_extra = 'rc1' # For release candidate
15-
# _version_extra = '' # For release
16-
17-
# Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z"
18-
__version__ = f"{_version_major}.{_version_minor}.{_version_micro}{_version_extra}"
19-
20-
CLASSIFIERS = ["Development Status :: 3 - Alpha",
21-
"Environment :: Console",
22-
"Intended Audience :: Science/Research",
23-
"License :: OSI Approved :: BSD License",
24-
"Operating System :: OS Independent",
25-
"Programming Language :: Python",
26-
"Topic :: Scientific/Engineering"]
27-
28-
description = 'A python package for analysis of neuroimaging data'
29-
30-
# Note: this long_description is the canonical place to edit this text.
31-
# It also appears in README.rst, but it should get there by running
32-
# ``tools/refresh_readme.py`` which pulls in this version.
33-
long_description = \
34-
"""
35-
====
36-
NIPY
37-
====
38-
39-
Neuroimaging tools for Python.
40-
41-
The aim of NIPY is to produce a platform-independent Python environment for
42-
the analysis of functional brain imaging data using an open development model.
43-
44-
In NIPY we aim to:
45-
46-
1. Provide an open source, mixed language scientific programming environment
47-
suitable for rapid development.
48-
49-
2. Create software components in this environment to make it easy to develop
50-
tools for MRI, EEG, PET and other modalities.
51-
52-
3. Create and maintain a wide base of developers to contribute to this
53-
platform.
54-
55-
4. To maintain and develop this framework as a single, easily installable
56-
bundle.
57-
58-
NIPY is the work of many people. We list the main authors in the file
59-
``AUTHOR`` in the NIPY distribution, and other contributions in ``THANKS``.
60-
61-
Website
62-
=======
63-
64-
Current information can always be found at the `NIPY project website
65-
<http://nipy.org/nipy>`_.
66-
67-
Mailing Lists
68-
=============
69-
70-
For questions on how to use nipy or on making code contributions, please see
71-
the ``neuroimaging`` mailing list:
72-
73-
https://mail.python.org/mailman/listinfo/neuroimaging
74-
75-
Please report bugs at github issues:
76-
77-
https://github.com/nipy/nipy/issues
78-
79-
You can see the list of current proposed changes at:
80-
81-
https://github.com/nipy/nipy/pulls
82-
83-
Code
84-
====
85-
86-
You can find our sources and single-click downloads:
87-
88-
* `Main repository`_ on Github;
89-
* Documentation_ for all releases and current development tree;
90-
* Download the `current development version`_ as a tar/zip file;
91-
* Downloads of all `available releases`_.
92-
93-
.. _main repository: https://github.com/nipy/nipy
94-
.. _Documentation: http://nipy.org/nipy
95-
.. _current development version: https://github.com/nipy/nipy/archive/main.zip
96-
.. _available releases: http://pypi.python.org/pypi/nipy
97-
98-
Tests
99-
=====
100-
101-
To run nipy's tests, you will need to install the pytest_ Python testing
102-
package::
103-
104-
pip install pytest
105-
106-
Then::
107-
108-
pytest nipy
109-
110-
You can run the doctests along with the other tests with::
111-
112-
pip install pytest-doctestplus
113-
114-
Then::
115-
116-
pytest --doctest-plus nipy
117-
118-
Installation
119-
============
120-
121-
See the latest `installation instructions`_.
122-
123-
License
124-
=======
125-
126-
We use the 3-clause BSD license; the full license is in the file ``LICENSE`` in
127-
the nipy distribution.
128-
129-
.. links:
130-
.. _python: http://python.org
131-
.. _numpy: http://numpy.org
132-
.. _scipy: http://scipy.org
133-
.. _sympy: http://sympy.org
134-
.. _nibabel: http://nipy.org/nibabel
135-
.. _ipython: http://ipython.org
136-
.. _matplotlib: http://matplotlib.org
137-
.. _pytest: http://pytest.org
138-
.. _installation instructions: http://nipy.org/nipy/users/installation.html
139-
"""
140-
141-
# minimum versions
142-
# Update in readme text above
143-
# Update in requirements.txt
144-
NUMPY_MIN_VERSION='1.22'
145-
SCIPY_MIN_VERSION = '1.8'
146-
NIBABEL_MIN_VERSION = '4.0'
147-
SYMPY_MIN_VERSION = '1.9'
148-
MAYAVI_MIN_VERSION = '4.7'
149-
CYTHON_MIN_VERSION = '0.12.1'
150-
151-
NAME = 'nipy'
152-
MAINTAINER = "nipy developers"
153-
MAINTAINER_EMAIL = "neuroimaging@python.org"
154-
DESCRIPTION = description
155-
LONG_DESCRIPTION = long_description
156-
URL = "http://nipy.org/nipy"
157-
DOWNLOAD_URL = "http://github.com/nipy/nipy/archives/main"
158-
LICENSE = "BSD license"
159-
CLASSIFIERS = CLASSIFIERS
160-
AUTHOR = "nipy developmers"
161-
AUTHOR_EMAIL = "neuroimaging@python.org"
162-
PLATFORMS = "OS Independent"
163-
MAJOR = _version_major
164-
MINOR = _version_minor
165-
MICRO = _version_micro
166-
ISRELEASE = _version_extra == ''
167-
VERSION = __version__
168-
REQUIRES = ["numpy", "scipy", "sympy", "nibabel"]
169-
STATUS = 'beta'
4+
# For compatibility
5+
from . import __version__
1706

1717
# Versions and locations of optional data packages
1728
NIPY_DATA_URL= 'http://nipy.org/data-packages/'

nipy/modalities/fmri/design.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def stack_contrasts(contrasts, name, keys):
402402

403403

404404
def stack_designs(*pairs):
405-
""" Stack a sequence of design / contrast dictionary pairs
405+
r""" Stack a sequence of design / contrast dictionary pairs
406406
407407
Uses multiple calls to :func:`stack2designs`
408408

0 commit comments

Comments
 (0)