Skip to content

Commit e73df40

Browse files
committed
Split contributing guide in to contrib/maint guides
1 parent 0c1aad5 commit e73df40

File tree

3 files changed

+133
-133
lines changed

3 files changed

+133
-133
lines changed

docs/developers/contributing.rst

Lines changed: 1 addition & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _dev-guide-contributing:
22

3-
Contributing to Zarr
3+
Contributior's guide
44
====================
55

66
Zarr is a community maintained project. We welcome contributions in the form of bug
@@ -225,135 +225,3 @@ Hatch can also be used to serve continuously updating version of the documentati
225225
during development at `http://0.0.0.0:8000/ <http://0.0.0.0:8000/>`_. This can be done by running::
226226

227227
$ hatch --env docs run serve
228-
229-
Development best practices, policies and procedures
230-
---------------------------------------------------
231-
232-
The following information is mainly for core developers, but may also be of interest to
233-
contributors.
234-
235-
Merging pull requests
236-
~~~~~~~~~~~~~~~~~~~~~
237-
238-
Pull requests submitted by an external contributor should be reviewed and approved by at least
239-
one core developers before being merged. Ideally, pull requests submitted by a core developer
240-
should be reviewed and approved by at least one other core developers before being merged.
241-
242-
Pull requests should not be merged until all CI checks have passed (GitHub Actions
243-
Codecov) against code that has had the latest main merged in.
244-
245-
Compatibility and versioning policies
246-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
247-
248-
Because Zarr is a data storage library, there are two types of compatibility to
249-
consider: API compatibility and data format compatibility.
250-
251-
API compatibility
252-
"""""""""""""""""
253-
254-
All functions, classes and methods that are included in the API
255-
documentation (files under ``docs/api/*.rst``) are considered as part of the Zarr **public API**,
256-
except if they have been documented as an experimental feature, in which case they are part of
257-
the **experimental API**.
258-
259-
Any change to the public API that does **not** break existing third party
260-
code importing Zarr, or cause third party code to behave in a different way, is a
261-
**backwards-compatible API change**. For example, adding a new function, class or method is usually
262-
a backwards-compatible change. However, removing a function, class or method; removing an argument
263-
to a function or method; adding a required argument to a function or method; or changing the
264-
behaviour of a function or method, are examples of **backwards-incompatible API changes**.
265-
266-
If a release contains no changes to the public API (e.g., contains only bug fixes or
267-
other maintenance work), then the micro version number should be incremented (e.g.,
268-
2.2.0 -> 2.2.1). If a release contains public API changes, but all changes are
269-
backwards-compatible, then the minor version number should be incremented
270-
(e.g., 2.2.1 -> 2.3.0). If a release contains any backwards-incompatible public API changes,
271-
the major version number should be incremented (e.g., 2.3.0 -> 3.0.0).
272-
273-
Backwards-incompatible changes to the experimental API can be included in a minor release,
274-
although this should be minimised if possible. I.e., it would be preferable to save up
275-
backwards-incompatible changes to the experimental API to be included in a major release, and to
276-
stabilise those features at the same time (i.e., move from experimental to public API), rather than
277-
frequently tinkering with the experimental API in minor releases.
278-
279-
Data format compatibility
280-
"""""""""""""""""""""""""
281-
282-
The data format used by Zarr is defined by a specification document, which should be
283-
platform-independent and contain sufficient detail to construct an interoperable
284-
software library to read and/or write Zarr data using any programming language. The
285-
latest version of the specification document is available on the
286-
`Zarr specifications website <https://zarr-specs.readthedocs.io>`_.
287-
288-
Here, **data format compatibility** means that all software libraries that implement a
289-
particular version of the Zarr storage specification are interoperable, in the sense
290-
that data written by any one library can be read by all others. It is obviously
291-
desirable to maintain data format compatibility wherever possible. However, if a change
292-
is needed to the storage specification, and that change would break data format
293-
compatibility in any way, then the storage specification version number should be
294-
incremented (e.g., 2 -> 3).
295-
296-
The versioning of the Zarr software library is related to the versioning of the storage
297-
specification as follows. A particular version of the Zarr library will
298-
implement a particular version of the storage specification. For example, Zarr version
299-
2.2.0 implements the Zarr storage specification version 2. If a release of the Zarr
300-
library implements a different version of the storage specification, then the major
301-
version number of the Zarr library should be incremented. E.g., if Zarr version 2.2.0
302-
implements the storage spec version 2, and the next release of the Zarr library
303-
implements storage spec version 3, then the next library release should have version
304-
number 3.0.0. Note however that the major version number of the Zarr library may not
305-
always correspond to the spec version number. For example, Zarr versions 2.x, 3.x, and
306-
4.x might all implement the same version of the storage spec and thus maintain data
307-
format compatibility, although they will not maintain API compatibility.
308-
309-
When to make a release
310-
~~~~~~~~~~~~~~~~~~~~~~
311-
312-
Ideally, any bug fixes that don't change the public API should be released as soon as
313-
possible. It is fine for a micro release to contain only a single bug fix.
314-
315-
When to make a minor release is at the discretion of the core developers. There are no
316-
hard-and-fast rules, e.g., it is fine to make a minor release to make a single new
317-
feature available; equally, it is fine to make a minor release that includes a number of
318-
changes.
319-
320-
Major releases obviously need to be given careful consideration, and should be done as
321-
infrequently as possible, as they will break existing code and/or affect data
322-
compatibility in some way.
323-
324-
Release procedure
325-
~~~~~~~~~~~~~~~~~
326-
327-
.. note::
328-
329-
Most of the release process is now handled by GitHub workflow which should
330-
automatically push a release to PyPI if a tag is pushed.
331-
332-
Before releasing, make sure that all pull requests which will be
333-
included in the release have been properly documented in
334-
`docs/release.rst`.
335-
336-
To make a new release, go to
337-
https://github.com/zarr-developers/zarr-python/releases and
338-
click "Draft a new release". Choose a version number prefixed
339-
with a `v` (e.g. `v0.0.0`). For pre-releases, include the
340-
appropriate suffix (e.g. `v0.0.0a1` or `v0.0.0rc2`).
341-
342-
343-
Set the description of the release to::
344-
345-
See release notes https://zarr.readthedocs.io/en/stable/release.html#release-0-0-0
346-
347-
replacing the correct version numbers. For pre-release versions,
348-
the URL should omit the pre-release suffix, e.g. "a1" or "rc1".
349-
350-
Click on "Generate release notes" to auto-file the description.
351-
352-
After creating the release, the documentation will be built on
353-
https://readthedocs.io. Full releases will be available under
354-
`/stable <https://zarr.readthedocs.io/en/stable>`_ while
355-
pre-releases will be available under
356-
`/latest <https://zarr.readthedocs.io/en/latest>`_.
357-
358-
Also review and merge the https://github.com/conda-forge/zarr-feedstock
359-
pull request that will be automatically generated.

docs/developers/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ Developer's Guide
66
:maxdepth: 1
77

88
contributing
9+
maintaining
910
release
1011
roadmap

docs/developers/maintaining.rst

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
Maintainer's guide
2+
------------------
3+
4+
The following information is mainly for core developers, but may also be of interest to
5+
contributors.
6+
7+
Merging pull requests
8+
~~~~~~~~~~~~~~~~~~~~~
9+
10+
Pull requests submitted by an external contributor should be reviewed and approved by at least
11+
one core developers before being merged. Ideally, pull requests submitted by a core developer
12+
should be reviewed and approved by at least one other core developers before being merged.
13+
14+
Pull requests should not be merged until all CI checks have passed (GitHub Actions
15+
Codecov) against code that has had the latest main merged in.
16+
17+
Compatibility and versioning policies
18+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19+
20+
Because Zarr is a data storage library, there are two types of compatibility to
21+
consider: API compatibility and data format compatibility.
22+
23+
API compatibility
24+
"""""""""""""""""
25+
26+
All functions, classes and methods that are included in the API
27+
documentation (files under ``docs/api/*.rst``) are considered as part of the Zarr **public API**,
28+
except if they have been documented as an experimental feature, in which case they are part of
29+
the **experimental API**.
30+
31+
Any change to the public API that does **not** break existing third party
32+
code importing Zarr, or cause third party code to behave in a different way, is a
33+
**backwards-compatible API change**. For example, adding a new function, class or method is usually
34+
a backwards-compatible change. However, removing a function, class or method; removing an argument
35+
to a function or method; adding a required argument to a function or method; or changing the
36+
behaviour of a function or method, are examples of **backwards-incompatible API changes**.
37+
38+
If a release contains no changes to the public API (e.g., contains only bug fixes or
39+
other maintenance work), then the micro version number should be incremented (e.g.,
40+
2.2.0 -> 2.2.1). If a release contains public API changes, but all changes are
41+
backwards-compatible, then the minor version number should be incremented
42+
(e.g., 2.2.1 -> 2.3.0). If a release contains any backwards-incompatible public API changes,
43+
the major version number should be incremented (e.g., 2.3.0 -> 3.0.0).
44+
45+
Backwards-incompatible changes to the experimental API can be included in a minor release,
46+
although this should be minimised if possible. I.e., it would be preferable to save up
47+
backwards-incompatible changes to the experimental API to be included in a major release, and to
48+
stabilise those features at the same time (i.e., move from experimental to public API), rather than
49+
frequently tinkering with the experimental API in minor releases.
50+
51+
Data format compatibility
52+
"""""""""""""""""""""""""
53+
54+
The data format used by Zarr is defined by a specification document, which should be
55+
platform-independent and contain sufficient detail to construct an interoperable
56+
software library to read and/or write Zarr data using any programming language. The
57+
latest version of the specification document is available on the
58+
`Zarr specifications website <https://zarr-specs.readthedocs.io>`_.
59+
60+
Here, **data format compatibility** means that all software libraries that implement a
61+
particular version of the Zarr storage specification are interoperable, in the sense
62+
that data written by any one library can be read by all others. It is obviously
63+
desirable to maintain data format compatibility wherever possible. However, if a change
64+
is needed to the storage specification, and that change would break data format
65+
compatibility in any way, then the storage specification version number should be
66+
incremented (e.g., 2 -> 3).
67+
68+
The versioning of the Zarr software library is related to the versioning of the storage
69+
specification as follows. A particular version of the Zarr library will
70+
implement a particular version of the storage specification. For example, Zarr version
71+
2.2.0 implements the Zarr storage specification version 2. If a release of the Zarr
72+
library implements a different version of the storage specification, then the major
73+
version number of the Zarr library should be incremented. E.g., if Zarr version 2.2.0
74+
implements the storage spec version 2, and the next release of the Zarr library
75+
implements storage spec version 3, then the next library release should have version
76+
number 3.0.0. Note however that the major version number of the Zarr library may not
77+
always correspond to the spec version number. For example, Zarr versions 2.x, 3.x, and
78+
4.x might all implement the same version of the storage spec and thus maintain data
79+
format compatibility, although they will not maintain API compatibility.
80+
81+
When to make a release
82+
~~~~~~~~~~~~~~~~~~~~~~
83+
84+
Ideally, any bug fixes that don't change the public API should be released as soon as
85+
possible. It is fine for a micro release to contain only a single bug fix.
86+
87+
When to make a minor release is at the discretion of the core developers. There are no
88+
hard-and-fast rules, e.g., it is fine to make a minor release to make a single new
89+
feature available; equally, it is fine to make a minor release that includes a number of
90+
changes.
91+
92+
Major releases obviously need to be given careful consideration, and should be done as
93+
infrequently as possible, as they will break existing code and/or affect data
94+
compatibility in some way.
95+
96+
Release procedure
97+
~~~~~~~~~~~~~~~~~
98+
99+
.. note::
100+
101+
Most of the release process is now handled by GitHub workflow which should
102+
automatically push a release to PyPI if a tag is pushed.
103+
104+
Before releasing, make sure that all pull requests which will be
105+
included in the release have been properly documented in
106+
`docs/release.rst`.
107+
108+
To make a new release, go to
109+
https://github.com/zarr-developers/zarr-python/releases and
110+
click "Draft a new release". Choose a version number prefixed
111+
with a `v` (e.g. `v0.0.0`). For pre-releases, include the
112+
appropriate suffix (e.g. `v0.0.0a1` or `v0.0.0rc2`).
113+
114+
115+
Set the description of the release to::
116+
117+
See release notes https://zarr.readthedocs.io/en/stable/release.html#release-0-0-0
118+
119+
replacing the correct version numbers. For pre-release versions,
120+
the URL should omit the pre-release suffix, e.g. "a1" or "rc1".
121+
122+
Click on "Generate release notes" to auto-file the description.
123+
124+
After creating the release, the documentation will be built on
125+
https://readthedocs.io. Full releases will be available under
126+
`/stable <https://zarr.readthedocs.io/en/stable>`_ while
127+
pre-releases will be available under
128+
`/latest <https://zarr.readthedocs.io/en/latest>`_.
129+
130+
Also review and merge the https://github.com/conda-forge/zarr-feedstock
131+
pull request that will be automatically generated.

0 commit comments

Comments
 (0)