|
1 |
| -.. External links in this file are done manually instead of using Sphinx stuff |
2 |
| - like :doc:, :ref:, toctree etc. because GitHub also renders this file as |
3 |
| - reStructuredText when it shows its "guidelines for contributing" link when |
4 |
| - you make a new issue or pull request, and Sphinx things like toctree don't |
5 |
| - work there. See: https://github.com/blog/1184-contributing-guidelines |
| 1 | +For contributing CKAN (whether code, bug reports, translations, documentation, |
| 2 | +etc.) see our contributing guidelines: |
6 | 3 |
|
7 |
| -==================== |
8 |
| -Contributing to CKAN |
9 |
| -==================== |
10 |
| - |
11 |
| -.. _CKAN repo on GitHub: https://github.com/okfn/ckan |
12 |
| -.. _CKAN issue tracker: https://github.com/okfn/ckan/issues |
13 |
| -.. _docs.ckan.org: http://docs.ckan.org |
14 |
| - |
15 |
| -CKAN is free open source software and code contributions are welcome, whether |
16 |
| -they're bug reports, source code, documentation or translations. The sections |
17 |
| -below will walk you through our processes for making different kinds of |
18 |
| -contributions to CKAN. |
19 |
| - |
20 |
| -.. contents:: |
21 |
| - :local: |
22 |
| - :depth: 1 |
23 |
| - |
24 |
| - |
25 |
| ----------------- |
26 |
| -Reporting Issues |
27 |
| ----------------- |
28 |
| - |
29 |
| -If you've found a bug in CKAN, open a new issue on CKAN's `GitHub Issues`_ (try |
30 |
| -searching first to see if there's already an issue for your bug). |
31 |
| - |
32 |
| -.. _GitHub Issues: https://github.com/okfn/ckan/issues |
33 |
| - |
34 |
| - |
35 |
| ----------------- |
36 |
| -Translating CKAN |
37 |
| ----------------- |
38 |
| - |
39 |
| -For contributing translations to CKAN, see |
40 |
| -`Translating CKAN <http://docs.ckan.org/en/latest/i18n.html>`_. |
41 |
| - |
42 |
| -.. toctree:: |
43 |
| - :hidden: |
44 |
| - |
45 |
| - i18n |
46 |
| - |
47 |
| -.. _coding standards: |
48 |
| - |
49 |
| ----------------- |
50 |
| -Coding Standards |
51 |
| ----------------- |
52 |
| - |
53 |
| -When writing code for CKAN, try to respect our coding standards: |
54 |
| - |
55 |
| -.. toctree:: |
56 |
| - :hidden: |
57 |
| - |
58 |
| - ckan-coding-standards |
59 |
| - python-coding-standards |
60 |
| - html-coding-standards |
61 |
| - css-coding-standards |
62 |
| - javascript-coding-standards |
63 |
| - testing-coding-standards |
64 |
| - upgrading-dependencies |
65 |
| - |
66 |
| -* `CKAN coding standards <http://docs.ckan.org/en/latest/ckan-coding-standards.html>`_ |
67 |
| -* `Python coding standards <http://docs.ckan.org/en/latest/python-coding-standards.html>`_ |
68 |
| -* `HTML coding standards <http://docs.ckan.org/en/latest/html-coding-standards.html>`_ |
69 |
| -* `CSS coding standards <http://docs.ckan.org/en/latest/css-coding-standards.html>`_ |
70 |
| -* `JavaScript coding standards <http://docs.ckan.org/en/latest/javascript-coding-standards.html>`_ |
71 |
| -* `Testing coding standards <http://docs.ckan.org/en/latest/testing-coding-standards.html>`_ |
72 |
| -* `Upgrading CKAN's dependencies <http://docs.ckan.org/en/latest/upgrading-dependencies.html>`_ |
73 |
| - |
74 |
| - |
75 |
| ---------------- |
76 |
| -Commit Messages |
77 |
| ---------------- |
78 |
| - |
79 |
| -Generally, follow the `commit guidelines from the Pro Git book`_: |
80 |
| - |
81 |
| -- Try to make each commit a logically separate, digestible changeset. |
82 |
| - |
83 |
| -- The first line of the commit message should concisely summarise the |
84 |
| - changeset. |
85 |
| - |
86 |
| -- Optionally, follow with a blank line and then a more detailed explanation of |
87 |
| - the changeset. |
88 |
| - |
89 |
| -- Use the imperative present tense as if you were giving commands to the |
90 |
| - codebase to change its behaviour, e.g. *Add tests for...*, *make xyzzy do |
91 |
| - frotz...*, this helps to make the commit message easy to read. |
92 |
| - |
93 |
| -.. _commit guidelines from the Pro Git book: http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines |
94 |
| - |
95 |
| -If your commit has an issue in the `CKAN issue tracker`_ put the issue number |
96 |
| -at the start of the first line of the commit message like this: ``[#123]``. |
97 |
| -This makes the CKAN release manager's job much easier! |
98 |
| - |
99 |
| -Here's an example of a good CKAN commit message:: |
100 |
| - |
101 |
| - [#2505] Update source install instructions |
102 |
| - |
103 |
| - Following feedback from markw (see #2406). |
104 |
| - |
105 |
| - |
106 |
| - |
107 |
| - |
108 |
| -------------------------------- |
109 |
| -Frontend Development Guidelines |
110 |
| -------------------------------- |
111 |
| - |
112 |
| -.. toctree:: |
113 |
| - :hidden: |
114 |
| - |
115 |
| - frontend-development |
116 |
| - templating |
117 |
| - resources |
118 |
| - template-tutorial |
119 |
| - template-blocks |
120 |
| - javascript-module-tutorial |
121 |
| - |
122 |
| -* `Frontend Development <http://docs.ckan.org/en/latest/frontend-development.html>`_ |
123 |
| -* `Templating <http://docs.ckan.org/en/latest/templating.html>`_ |
124 |
| -* `Resources <http://docs.ckan.org/en/latest/resources.html>`_ |
125 |
| -* `Template Tutorial <http://docs.ckan.org/en/latest/template-tutorial.html>`_ |
126 |
| -* `Template Blocks <http://docs.ckan.org/en/latest/template-blocks.html>`_ |
127 |
| -* `JavaScript Module Tutorial <http://docs.ckan.org/en/latest/javascript-module-tutorial.html>`_ |
128 |
| - |
129 |
| - |
130 |
| ---------------------- |
131 |
| -Writing Documentation |
132 |
| ---------------------- |
133 |
| - |
134 |
| -The quickest and easiest way to contribute documentation to CKAN is to sign up |
135 |
| -for a free GitHub account and simply edit the `CKAN Wiki <https://github.com/okfn/ckan/wiki>`_. |
136 |
| -Docs started on the wiki can make it onto `docs.ckan.org`_ later. |
137 |
| - |
138 |
| -**Tip**: Use the reStructuredText markup format when creating a wiki page, |
139 |
| -since reStructuredText is the format that docs.ckan.org uses, this will make |
140 |
| -moving the documentation from the wiki into docs.ckan.org later easier. |
141 |
| - |
142 |
| -For how to contribute to the offical CKAN documentation at docs.ckan.org, see |
143 |
| -the `documentation guidelines <http://docs.ckan.org/en/latest/documentation-guidelines.html>`_. |
144 |
| - |
145 |
| -.. toctree:: |
146 |
| - :hidden: |
147 |
| - |
148 |
| - documentation-guidelines |
149 |
| - |
150 |
| - |
151 |
| -.. _making a pull request: |
152 |
| - |
153 |
| ---------------------- |
154 |
| -Making a Pull Request |
155 |
| ---------------------- |
156 |
| - |
157 |
| -Once you've written some CKAN code or documentation, you can submit it for |
158 |
| -review and merge into the central CKAN git repository by making a pull request. |
159 |
| -This section will walk you through the steps for making a pull request. |
160 |
| - |
161 |
| - |
162 |
| -#. Create a git branch |
163 |
| - |
164 |
| - Each logically separate piece of work (e.g. a new feature, a bug fix, a new |
165 |
| - docs page, or a set of improvements to a docs page) should be developed on |
166 |
| - its own branch forked from the master branch. |
167 |
| - |
168 |
| - The name of the branch should include the issue number (if this work has an |
169 |
| - issue in the `CKAN issue tracker`_), and a brief one-line synopsis of the work, |
170 |
| - for example:: |
171 |
| - |
172 |
| - 2298-add-sort-by-controls-to-search-page |
173 |
| - |
174 |
| - |
175 |
| -#. Fork CKAN on GitHub |
176 |
| - |
177 |
| - Sign up for a free account on GitHub and |
178 |
| - `fork CKAN <https://help.github.com/articles/fork-a-repo>`_, so that you |
179 |
| - have somewhere to publish your work. |
180 |
| - |
181 |
| - Add your CKAN fork to your local CKAN git repo as a git remote. Replace |
182 |
| - ``USERNAME`` with your GitHub username:: |
183 |
| - |
184 |
| - git remote add my_fork https://github.com/USERNAME/ckan |
185 |
| - |
186 |
| - |
187 |
| -#. Commit and push your changes |
188 |
| - |
189 |
| - Commit your changes on your feature branch, and push your branch to GitHub. |
190 |
| - For example, make sure you're currently on your feature branch then run |
191 |
| - these commands:: |
192 |
| - |
193 |
| - git add doc/my_new_feature.rst |
194 |
| - git commit -m "Add docs for my new feature" |
195 |
| - git push my_fork my_branch |
196 |
| - |
197 |
| - When writing your git commit messages, try to follow the `Commit Messages`_ |
198 |
| - guidelines. |
199 |
| - |
200 |
| - |
201 |
| -#. Send a pull request |
202 |
| - |
203 |
| - Once your work on a branch is complete and is ready to be merged into the |
204 |
| - master branch, `create a pull request on GitHub`_. A member of the CKAN |
205 |
| - team will review your work and provide feedback on the pull request page. |
206 |
| - The reviewer may ask you to make some changes. Once your pull request has |
207 |
| - passed the review, the reviewer will merge your code into the master branch |
208 |
| - and it will become part of CKAN! |
209 |
| - |
210 |
| - When submitting a pull request: |
211 |
| - |
212 |
| - - Your branch should contain one logically separate piece of work, and not |
213 |
| - any unrelated changes. |
214 |
| - |
215 |
| - - You should have good commit messages, see `Commit Messages`_. |
216 |
| - |
217 |
| - - Your branch should contain new or changed tests for any new or changed |
218 |
| - code, and all the CKAN tests should pass on your branch, see |
219 |
| - `Testing CKAN <http://docs.ckan.org/en/latest/test.html>`_. |
220 |
| - |
221 |
| - - Your branch should contain new or updated documentation for any new or |
222 |
| - updated code, see `Writing Documentation`_. |
223 |
| - |
224 |
| - - Your branch should be up to date with the master branch of the central |
225 |
| - CKAN repo, so pull the central master branch into your feature branch |
226 |
| - before submitting your pull request. |
227 |
| - |
228 |
| - For long-running feature branches, it's a good idea to pull master into |
229 |
| - the feature branch periodically so that the two branches don't diverge too |
230 |
| - much. |
231 |
| - |
232 |
| -.. _create a pull request on GitHub: https://help.github.com/articles/creating-a-pull-request |
233 |
| - |
234 |
| - |
235 |
| -Merging a Pull Request |
236 |
| -====================== |
237 |
| - |
238 |
| -If you're reviewing a pull request for CKAN, when merging a branch into master: |
239 |
| - |
240 |
| -- Use the ``--no-ff`` option in the ``git merge`` command, |
| 4 | +http://docs.ckan.org/en/latest/contributing |
0 commit comments