@@ -95,6 +95,50 @@ advise that you enable merge summaries within git:
95
95
96
96
See :ref: `configure-git ` for more detail.
97
97
98
+ Pre-commit hooks
99
+ ----------------
100
+
101
+ NiBabel uses pre-commit _ to help committers validate their changes
102
+ before committing. To enable these, you can use pipx _::
103
+
104
+ pipx run pre-commit install
105
+
106
+ Or install and run::
107
+
108
+ python -m pip install pre-commit
109
+ pre-commit install
110
+
111
+
112
+ Testing
113
+ =======
114
+
115
+ NiBabel uses tox _ to organize our testing and development workflows.
116
+ tox runs tests in isolated environments that we specify,
117
+ ensuring that we are able to test across many different environments,
118
+ and those environments do not depend on our local configurations.
119
+
120
+ If you have the pipx _ tool installed, then you may simply::
121
+
122
+ pipx run tox
123
+
124
+ Alternatively, you can install tox and run it::
125
+
126
+ python -m pip install tox
127
+ tox
128
+
129
+ This will run the tests in several configurations, with multiple sets of
130
+ optional dependencies.
131
+ If you have multiple versions of Python installed in your path, it will
132
+ repeat the process for each version of Python iin our supported range.
133
+ It may be useful to pick a particular version for rapid development::
134
+
135
+ tox -e py311-full-x64
136
+
137
+ This will run the environment using the Python 3.11 interpreter, with the
138
+ full set of optional dependencies that are available for 64-bit
139
+ interpreters. If you are using 32-bit Python, replace ``-x64 `` with ``-x86 ``.
140
+
141
+
98
142
Changelog
99
143
=========
100
144
@@ -123,3 +167,7 @@ Community guidelines
123
167
Please see `our community guidelines
124
168
<https://github.com/nipy/nibabel/blob/master/.github/CODE_OF_CONDUCT.md> `_.
125
169
Other projects call these guidelines the "code of conduct".
170
+
171
+ .. _tox : https://tox.wiki
172
+ .. _pipx : https://pypa.github.io/pipx/
173
+ .. _precommit : https://pre-commit.com/
0 commit comments