|
| 1 | +============================ |
| 2 | +Contributing to intake-xarray |
| 3 | +============================ |
| 4 | + |
| 5 | +Contributions are highly welcomed and appreciated. Every little help counts, |
| 6 | +so do not hesitate! |
| 7 | + |
| 8 | +.. contents:: Contribution links |
| 9 | + :depth: 2 |
| 10 | + |
| 11 | + |
| 12 | +.. _submitfeedback: |
| 13 | + |
| 14 | +Feature requests and feedback |
| 15 | +----------------------------- |
| 16 | + |
| 17 | +Do you like intake-xarray? Share some love on Twitter or in your blog posts! |
| 18 | + |
| 19 | +We'd also like to hear about your propositions and suggestions. Feel free to |
| 20 | +`submit them as issues <https://github.com/intake/intake-xarray>`_ and: |
| 21 | + |
| 22 | +* Explain in detail how they should work. |
| 23 | +* Keep the scope as narrow as possible. This will make it easier to implement. |
| 24 | + |
| 25 | + |
| 26 | +.. _reportbugs: |
| 27 | + |
| 28 | +Report bugs |
| 29 | +----------- |
| 30 | + |
| 31 | +Report bugs for intake-stac in the `issue tracker <https://github.com/intake/intake-xarray>`_. |
| 32 | + |
| 33 | +If you are reporting a bug, please include: |
| 34 | + |
| 35 | +* Your operating system name and version. |
| 36 | +* Any details about your local setup that might be helpful in troubleshooting, |
| 37 | + specifically the Python interpreter version, installed libraries, and intake-stac |
| 38 | + version. |
| 39 | +* Detailed steps to reproduce the bug. |
| 40 | + |
| 41 | +If you can write a demonstration test that currently fails but should pass |
| 42 | +(xfail), that is a very useful commit to make as well, even if you cannot |
| 43 | +fix the bug itself. |
| 44 | + |
| 45 | + |
| 46 | +.. _fixbugs: |
| 47 | + |
| 48 | +Fix bugs |
| 49 | +-------- |
| 50 | + |
| 51 | +Look through the `GitHub issues for bugs <https://github.com/intake/intake-xarray/labels/type:%20bug>`_. |
| 52 | + |
| 53 | +Talk to developers to find out how you can fix specific bugs. |
| 54 | + |
| 55 | + |
| 56 | +Write documentation |
| 57 | +------------------- |
| 58 | + |
| 59 | +intake-xarray could always use more documentation. What exactly is needed? |
| 60 | + |
| 61 | +* More complementary documentation. Have you perhaps found something unclear? |
| 62 | +* Docstrings. There can never be too many of them. |
| 63 | +* Blog posts, articles and such -- they're all very appreciated. |
| 64 | + |
| 65 | +You can also edit documentation files directly in the GitHub web interface, |
| 66 | +without using a local copy. This can be convenient for small fixes. |
| 67 | + |
| 68 | +.. note:: |
| 69 | + Build the documentation locally with the following command: |
| 70 | + |
| 71 | + .. code:: bash |
| 72 | +
|
| 73 | + $ conda env create -f docs/environment.yml |
| 74 | + $ cd docs |
| 75 | + $ make html |
| 76 | +
|
| 77 | + The built documentation should be available in the ``docs/_build/``. |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + .. _`pull requests`: |
| 82 | +.. _pull-requests: |
| 83 | + |
| 84 | + |
| 85 | +Preparing Pull Requests |
| 86 | +----------------------- |
| 87 | + |
| 88 | + |
| 89 | +#. Fork the |
| 90 | + `intake-xarray GitHub repository <https://github.com/intake/intake-xarray>`__. It's |
| 91 | + fine to use ``intake-xarray`` as your fork repository name because it will live |
| 92 | + under your user. |
| 93 | + |
| 94 | + |
| 95 | +#. Clone your fork locally using `git <https://git-scm.com/>`_ and create a branch:: |
| 96 | + |
| 97 | + $ git clone [email protected]:YOUR_GITHUB_USERNAME/intake-xarray.git |
| 98 | + $ cd intake-xarray |
| 99 | + |
| 100 | + # now, to fix a bug or add feature create your own branch off "master": |
| 101 | + |
| 102 | + $ git checkout -b your-bugfix-feature-branch-name master |
| 103 | + |
| 104 | + |
| 105 | +#. Install development version in a conda environment:: |
| 106 | + |
| 107 | + $ conda env create -f ci/environment-py39.yml |
| 108 | + $ conda activate test_env |
| 109 | + $ pip install . -e |
| 110 | + |
| 111 | + |
| 112 | +#. Run all the tests |
| 113 | + |
| 114 | + Now running tests is as simple as issuing this command:: |
| 115 | + |
| 116 | + $ pytest --verbose |
| 117 | + |
| 118 | + |
| 119 | + This command will run tests via the "pytest" tool |
| 120 | + |
| 121 | + |
| 122 | +#. Commit and push once your tests pass and you are happy with your change(s):: |
| 123 | + |
| 124 | + $ git commit -a -m "<commit message>" |
| 125 | + $ git push -u |
| 126 | + |
| 127 | + |
| 128 | +#. Finally, submit a pull request through the GitHub website using this data:: |
| 129 | + |
| 130 | + head-fork: YOUR_GITHUB_USERNAME/intake-xarray |
| 131 | + compare: your-branch-name |
| 132 | + |
| 133 | + base-fork: intake/intake-xarray |
| 134 | + base: master |
| 135 | + |
| 136 | + |
| 137 | + .. _`release a new version`: |
| 138 | +.. _release-a-new-version: |
| 139 | + |
| 140 | + |
| 141 | +Release a new version |
| 142 | +--------------------- |
| 143 | + |
| 144 | +intake-xarray uses the pypipublish GitHub action to publish new versions on PYPI. Just create a new tag `git tag 0.4.1`, `git push upstream --tags`, then create a release by visiting https://github.com/intake/intake-xarray/releases/new. When the release is created the version will automatically be uploaded to https://pypi.org/project/intake-xarray/. |
| 145 | + |
0 commit comments