|
| 1 | +Contributing to Zarr |
| 2 | +==================== |
| 3 | + |
| 4 | +Zarr is a community maintained project. We welcome contributions in the form of bug |
| 5 | +reports, bug fixes, documentation, enhancement proposals and more. This page provides |
| 6 | +information on how best to contribute. |
| 7 | + |
| 8 | +Asking for help |
| 9 | +--------------- |
| 10 | + |
| 11 | +If you have a question about how to use Zarr, please post your question on |
| 12 | +StackOverflow using the `"zarr" tag <https://stackoverflow.com/questions/tagged/zarr>`_ |
| 13 | +. If you don't get a response within a day or two, feel free to raise a `GitHub issue |
| 14 | +<https://github.com/alimanfoo/zarr/issues/new>`_ including a link to your StackOverflow |
| 15 | +question. We will try to respond to questions as quickly as possible, but please bear |
| 16 | +in mind that there may be periods where we have limited time to answer questions |
| 17 | +due to other commitments. |
| 18 | + |
| 19 | +Bug reports |
| 20 | +----------- |
| 21 | + |
| 22 | +If you find a bug, please raise a `GitHub issue |
| 23 | +<https://github.com/alimanfoo/zarr/issues/new>`_. Please include the following items in |
| 24 | +a bug report: |
| 25 | + |
| 26 | +1. A minimal, self-contained snippet of Python code reproducing the problem. You can |
| 27 | + format the code nicely using markdown, e.g.:: |
| 28 | + |
| 29 | + |
| 30 | + ```python |
| 31 | + >>> import zarr |
| 32 | + >>> g = zarr.group() |
| 33 | + ... |
| 34 | + ``` |
| 35 | + |
| 36 | +2. Information about the version of Zarr, along with versions of dependencies and the |
| 37 | + Python interpreter, and installation information. The version of Zarr can be obtained |
| 38 | + from the ``zarr.__version__`` property. Please also state how Zarr was installed, |
| 39 | + e.g., "installed via pip into a virtual environment", or "installed using conda". |
| 40 | + Information about other packages installed can be obtained by executing ``pip list`` |
| 41 | + (if using pip to install packages) or ``conda list`` (if using conda to install |
| 42 | + packages) from the operating system command prompt. The version of the Python |
| 43 | + interpreter can be obtained by running a Python interactive session, e.g.:: |
| 44 | + |
| 45 | + $ python |
| 46 | + Python 3.6.1 (default, Mar 22 2017, 06:17:05) |
| 47 | + [GCC 6.3.0 20170321] on linux |
| 48 | + |
| 49 | +3. An explanation of why the current behaviour is wrong/not desired, and what you |
| 50 | + expect instead. |
| 51 | + |
| 52 | +Enhancement proposals |
| 53 | +--------------------- |
| 54 | + |
| 55 | +If you have an idea about a new feature or some other improvement to Zarr, please raise a |
| 56 | +`GitHub issue <https://github.com/alimanfoo/zarr/issues/new>`_ first to discuss. |
| 57 | + |
| 58 | +We very much welcome ideas and suggestions for how to improve Zarr, but please bear in |
| 59 | +mind that we are likely to be conservative in accepting proposals for new features. The |
| 60 | +reasons for this are that we would like to keep the Zarr code base lean and focused on |
| 61 | +a core set of functionalities, and available time for development, review and maintenance |
| 62 | +of new features is limited. But if you have a great idea, please don't let that stop |
| 63 | +you posting it on GitHub, just please don't be offended if we respond cautiously. |
| 64 | + |
| 65 | +Working with the code |
| 66 | +--------------------- |
| 67 | + |
| 68 | +Forking |
| 69 | +~~~~~~~ |
| 70 | + |
| 71 | +The Zarr source code is hosted on GitHub at the following location: |
| 72 | + |
| 73 | +* `https://github.com/zarr-developers/zarr <https://github.com/zarr-developers/zarr>`_ |
| 74 | + |
| 75 | +You will need your own fork to work on the code. Go to the link above and hit |
| 76 | +the "Fork" button. Then clone your fork to your local machine:: |
| 77 | + |
| 78 | + $ git clone [email protected]:your-user-name/zarr.git |
| 79 | + $ cd zarr |
| 80 | + $ git remote add upstream [email protected]:zarr-developers/zarr.git |
| 81 | + |
| 82 | +Creating a development environment |
| 83 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 84 | + |
| 85 | +To work with the Zarr source code, it is recommended to set up a Python virtual |
| 86 | +environment and install all Zarr dependencies using the same versions as are used by |
| 87 | +the core developers and continuous integration services. Assuming you have a Python |
| 88 | +3 interpreter already installed, and have also installed the virtualenv package, and |
| 89 | +you have cloned the Zarr source code and your current working directory is the root of |
| 90 | +the repository, you can do something like the following:: |
| 91 | + |
| 92 | + $ mkdir -p ~/pyenv/zarr-dev |
| 93 | + $ virtualenv --no-site-packages --python=/usr/bin/python3.6 ~/pyenv/zarr-dev |
| 94 | + $ source ~/pyenv/zarr-dev/bin/activate |
| 95 | + $ pip install -r requirements_dev.txt |
| 96 | + |
| 97 | +To verify that your development environment is working, you can run the unit test suite:: |
| 98 | + |
| 99 | + $ pytest -v zarr |
| 100 | + |
| 101 | + |
0 commit comments