@@ -199,3 +199,121 @@ The documentation can be built by running::
199
199
$ tox -e docs
200
200
201
201
The resulting built documentation will be available in the ``.tox/docs/tmp/html `` folder.
202
+
203
+ Development best practices, policies and procedures
204
+ ---------------------------------------------------
205
+
206
+ The following information is mainly for core developers, but may also be of interest to
207
+ contributors.
208
+
209
+ Merging pull requests
210
+ ~~~~~~~~~~~~~~~~~~~~~
211
+
212
+ If at all possible, pull requests submitted by an external contributor should be
213
+ reviewed and approved by all core developers before being merged. Pull requests
214
+ submitted by a core developer should be reviewed and approved by all other core
215
+ developers before being merged.
216
+
217
+ Pull requests should not be merged until all CI checks have passed (Travis, AppVeyor,
218
+ Coveralls) against code that has had the latest master merged in.
219
+
220
+ Compatibility and versioning policies
221
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
222
+
223
+ Because Zarr is a data storage library, there are two types of compatibility to
224
+ consider: API compatibility and data format compatibility.
225
+
226
+ Here we consider all functions, classes and methods that do not begin with an
227
+ underscore as part of the Zarr public API. Any change to the public API that does **not **
228
+ break existing third party code importing Zarr, or cause third party code to behave in
229
+ a different way, is a **backwards-compatible API change **. For example, adding a new
230
+ function, class or method is usually a backwards compatible change. However, removing a
231
+ function, class or method; removing an argument to a function or method; adding a
232
+ required argument to a function or method; or changing the behaviour of a function or
233
+ method, are examples of **backwards-incompatible API changes **.
234
+
235
+ If a release contains no changes to the public API (e.g., contains only bug fixes or
236
+ other maintenance work), then the micro version number should be incremented (e.g.,
237
+ 2.2.0 -> 2.2.1). If a release contains API changes, but all API changes are
238
+ backwards-compatible, then the minor version number should be incremented
239
+ (e.g., 2.2.1 -> 2.3.0). If a release contains any backwards-incompatible API changes,
240
+ the major version number should be incremented (e.g., 2.3.0 -> 3.0.0).
241
+
242
+ Exceptions can be made for any function, class or method which has been documented as
243
+ an experimental feature, i.e., backwards-incompatible changes can be included in a
244
+ minor release, although this should be avoided wherever possible.
245
+
246
+ The data format used by Zarr is defined by a specification document, which should be
247
+ platform-independent and contain sufficient detail to construct an interoperable
248
+ software library to read and/or write Zarr data using any programming language. The
249
+ latest version of the specification document is available from the :ref: `spec ` page.
250
+ Here, **data format compatibility ** means that all software libraries that implement a
251
+ particular version of the Zarr storage specification are interoperable, in the sense
252
+ that data written by any one library could be read by all others. It is obviously
253
+ desirable to maintain data format compatibility wherever possible. However, if a change
254
+ is needed to the storage specification, and that change would break data format
255
+ compatibility in any way, then the storage specification version number should be
256
+ incremented (e.g., 2 -> 3).
257
+
258
+ The versioning of the Zarr software library is related to the versioning of the storage
259
+ specification as follows. A particular version of the Zarr library will
260
+ implement a particular version of the storage specification. For example, Zarr version
261
+ 2.2.0 implements the Zarr storage specification version 2. If a release of the Zarr
262
+ library implements a different version of the storage specification, then the major
263
+ version number of the Zarr library should be incremented. E.g., if Zarr version 2.2.0
264
+ implements the storage spec version 2, and the next release of the Zarr library
265
+ implements storage spec version 3, then the next library release should have version
266
+ number 3.0.0. Note however that the major version number of the Zarr library may not
267
+ always correspond to the spec version number. For example, Zarr versions 2.x, 3.x, and
268
+ 4.x might all implement the same version of the storage spec and thus maintain data
269
+ format compatibility, although they will not maintain API compatibility.
270
+
271
+ Note that the Zarr test suite includes a data fixture and tests to try and ensure that
272
+ data format compatibility is not accidentally broken. See the
273
+ :func: `test_format_compatibility ` function in the :mod: `zarr.tests.test_storage ` module
274
+ for details.
275
+
276
+ When to make a release
277
+ ~~~~~~~~~~~~~~~~~~~~~~
278
+
279
+ Ideally, any bug fixes that don't change the public API should be released as soon as
280
+ possible. It is fine for a micro release to contain only a single bug fix.
281
+
282
+ When to make a minor release is at the discretion of the core developers. There are no
283
+ hard-and-fast rules, e.g., it is fine to make a minor release to make a single new
284
+ feature available; equally, it is fine to make a minor release that includes a number of
285
+ changes.
286
+
287
+ Major releases obviously need to be given careful consideration, and should be done as
288
+ infrequently as possible, as they will break existing code and/or affect data
289
+ compatibility in some way.
290
+
291
+ Release procedure
292
+ ~~~~~~~~~~~~~~~~~
293
+
294
+ Checkout and update the master branch::
295
+
296
+ $ git checkout master
297
+ $ git pull
298
+
299
+ Verify all tests pass on all supported Python versions, and docs build::
300
+
301
+ $ tox
302
+
303
+ Tag the version (where "X.X.X" stands for the version number, e.g., "2.2.0")::
304
+
305
+ $ version=X.X.X
306
+ $ git tag -a v$version -m v$version
307
+ $ git push --tags
308
+
309
+ Release source code to PyPI::
310
+
311
+ $ python setup.py register sdist
312
+ $ twine upload dist/zarr-${version}.tar.gz
313
+
314
+ Obtain checksum for release to conda-forge::
315
+
316
+ $ openssl sha256 dist/zarr-${version}.tar.gz
317
+
318
+ Release to conda-forge by making a pull request against the zarr-feedstock conda-forge
319
+ repository, incrementing the version number.
0 commit comments