|
1 | 1 | .. _dev-guide-contributing: |
2 | 2 |
|
3 | | -Contributing to Zarr |
| 3 | +Contributior's guide |
4 | 4 | ==================== |
5 | 5 |
|
6 | 6 | 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 |
225 | 225 | during development at `http://0.0.0.0:8000/ <http://0.0.0.0:8000/>`_. This can be done by running:: |
226 | 226 |
|
227 | 227 | $ 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. |
0 commit comments