Skip to content

Commit 4209daf

Browse files
committed
update version policy to use effver
1 parent 38a2417 commit 4209daf

File tree

1 file changed

+46
-72
lines changed

1 file changed

+46
-72
lines changed

docs/developers/contributing.rst

Lines changed: 46 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -261,90 +261,64 @@ Merging pull requests
261261
~~~~~~~~~~~~~~~~~~~~~
262262

263263
Pull requests submitted by an external contributor should be reviewed and approved by at least
264-
one core developers before being merged. Ideally, pull requests submitted by a core developer
265-
should be reviewed and approved by at least one other core developers before being merged.
264+
one core developer before being merged. Ideally, pull requests submitted by a core developer
265+
should be reviewed and approved by at least one other core developer before being merged.
266266

267267
Pull requests should not be merged until all CI checks have passed (GitHub Actions
268268
Codecov) against code that has had the latest main merged in.
269269

270270
Compatibility and versioning policies
271271
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
272272

273-
Because Zarr is a data storage library, there are two types of compatibility to
274-
consider: API compatibility and data format compatibility.
275-
276-
API compatibility
277-
"""""""""""""""""
278-
279-
All functions, classes and methods that are included in the API
280-
documentation (files under ``docs/api/*.rst``) are considered as part of the Zarr **public API**,
281-
except if they have been documented as an experimental feature, in which case they are part of
282-
the **experimental API**.
283-
284-
Any change to the public API that does **not** break existing third party
285-
code importing Zarr, or cause third party code to behave in a different way, is a
286-
**backwards-compatible API change**. For example, adding a new function, class or method is usually
287-
a backwards-compatible change. However, removing a function, class or method; removing an argument
288-
to a function or method; adding a required argument to a function or method; or changing the
289-
behaviour of a function or method, are examples of **backwards-incompatible API changes**.
290-
291-
If a release contains no changes to the public API (e.g., contains only bug fixes or
292-
other maintenance work), then the micro version number should be incremented (e.g.,
293-
2.2.0 -> 2.2.1). If a release contains public API changes, but all changes are
294-
backwards-compatible, then the minor version number should be incremented
295-
(e.g., 2.2.1 -> 2.3.0). If a release contains any backwards-incompatible public API changes,
296-
the major version number should be incremented (e.g., 2.3.0 -> 3.0.0).
297-
298-
Backwards-incompatible changes to the experimental API can be included in a minor release,
299-
although this should be minimised if possible. I.e., it would be preferable to save up
300-
backwards-incompatible changes to the experimental API to be included in a major release, and to
301-
stabilise those features at the same time (i.e., move from experimental to public API), rather than
302-
frequently tinkering with the experimental API in minor releases.
273+
Versioning
274+
""""""""""
275+
The Zarr library uses a version identifier with the form ``<major>.<minor>.<patch>``, where each of value is
276+
an integer. For example, when this document was written the version of Zarr was ``3.0.4``. A release of the Zarr library is associated with a new
277+
version identifier. That new identifier is generated by incrementing exactly one of the components of the previous version identifier by 1. When incrementing the ``major``
278+
component of the version identifier, the ``minor`` and ``patch`` components are set to 0.
279+
280+
Releases are classified by the library changes contained in that release. This classification determines which
281+
component of the version identifier is incremented on release.
282+
283+
* ``major`` releases (for example, ``2.18.0`` -> ``3.0.0``) are for major API changes that will require extensive adaptation efforts from many users and downstream projects.
284+
For example, breaking changes to widely-used user-facing APIs should only be applied in a major release.
285+
286+
287+
Users and downstream projects should carefully consider the impact of a major release before adopting it.
288+
In advance of a major release, developers should communicate the scope of the upcoming changes, and help users prepare for them.
289+
290+
* ``minor`` releases (or example, ``3.0.0`` -> ``3.1.0``) are for minor changes that do not require significant effort from most users or downstream
291+
downstream projects to respond to. API changes are possible in minor releases if the burden on users imposed by those changes is sufficiently small.
292+
For example, a recently released API may need fixes or refinements that are breaking, but low impact
293+
due to the recency of the feature. Such API changes are permitted in a minor release.
294+
295+
296+
Minor releases are safe for most users and downstream projects to adopt.
297+
298+
299+
* ``patch`` releases (for example, ``3.1.0`` -> ``3.1.1``) are for changes with very low likelihood of
300+
breaking code for a downstream project or user.
301+
302+
303+
Users should always feel safe upgrading to a the latest patch release.
304+
305+
Note that this versioning scheme is not consistent with `Semantic Versioning <https://semver.org/>`_. The Zarr library
306+
may release breaking changes in ``minor`` releases, or even ``patch`` releases under exceptional circumstances.
307+
But we should strive to avoid doing so. A better model for our versioning scheme is `Intended Effort Versioning <https://jacobtomlinson.dev/effver/>`_, or "EffVer".
308+
The guiding principle off EffVer is to categorize releases based on the *expected effort required to upgrade to that release*.
309+
303310

304311
Data format compatibility
305-
"""""""""""""""""""""""""
306-
307-
The data format used by Zarr is defined by a specification document, which should be
308-
platform-independent and contain sufficient detail to construct an interoperable
309-
software library to read and/or write Zarr data using any programming language. The
310-
latest version of the specification document is available on the
311-
`Zarr specifications website <https://zarr-specs.readthedocs.io>`_.
312-
313-
Here, **data format compatibility** means that all software libraries that implement a
314-
particular version of the Zarr storage specification are interoperable, in the sense
315-
that data written by any one library can be read by all others. It is obviously
316-
desirable to maintain data format compatibility wherever possible. However, if a change
317-
is needed to the storage specification, and that change would break data format
318-
compatibility in any way, then the storage specification version number should be
319-
incremented (e.g., 2 -> 3).
320-
321-
The versioning of the Zarr software library is related to the versioning of the storage
322-
specification as follows. A particular version of the Zarr library will
323-
implement a particular version of the storage specification. For example, Zarr version
324-
2.2.0 implements the Zarr storage specification version 2. If a release of the Zarr
325-
library implements a different version of the storage specification, then the major
326-
version number of the Zarr library should be incremented. E.g., if Zarr version 2.2.0
327-
implements the storage spec version 2, and the next release of the Zarr library
328-
implements storage spec version 3, then the next library release should have version
329-
number 3.0.0. Note however that the major version number of the Zarr library may not
330-
always correspond to the spec version number. For example, Zarr versions 2.x, 3.x, and
331-
4.x might all implement the same version of the storage spec and thus maintain data
332-
format compatibility, although they will not maintain API compatibility.
333-
334-
When to make a release
335-
~~~~~~~~~~~~~~~~~~~~~~
312+
^^^^^^^^^^^^^^^^^^^^^^^^^
313+
314+
The Zarr library is an implementation of a file format standard defined externally -- see the `Zarr specifications website <https://zarr-specs.readthedocs.io>`_ for the list of Zarr file format specifications.
336315

337-
Ideally, any bug fixes that don't change the public API should be released as soon as
338-
possible. It is fine for a micro release to contain only a single bug fix.
339316

340-
When to make a minor release is at the discretion of the core developers. There are no
341-
hard-and-fast rules, e.g., it is fine to make a minor release to make a single new
342-
feature available; equally, it is fine to make a minor release that includes a number of
343-
changes.
317+
If an existing Zarr file format version changes, or a new version of the Zarr file format is released, then the Zarr library will generally require changes. It is very likely that
318+
a new Zarr file format will require extensive breaking changes to the Zarr library, and so support for a new Zarr file format in the Zarr library will almost certainly come in a
319+
major version. For some period of time after the Zarr library adds support for a new Zarr file format,
320+
there may be a period of accelerated changes as developers refine APIs that were added to support the new format. Breaking changes may more frequent until a new API is fully stabilized, and these breaking changes may occur in ``minor`` releases.
344321

345-
Major releases obviously need to be given careful consideration, and should be done as
346-
infrequently as possible, as they will break existing code and/or affect data
347-
compatibility in some way.
348322

349323
Release procedure
350324
~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)