Browse Source

Split up contributing guidelines

They were getting quite long. They've been split up in several
subsections. Some of them are borrowing heavily from the Django docs.
master
Maik Hoepfel 13 years ago
parent
commit
a4c4d5aaad

+ 5
- 260
CONTRIBUTING.rst View File

@@ -1,262 +1,7 @@
1
-============
2
-Contributing
3
-============
1
+=====================
2
+Contributing to Oscar
3
+=====================
4 4
 
5
-Some ground rules:
5
+Thank you for wanting to contribute! You can find detailed guidance in the repository at ``docs/source/internals/contributing``, or online at:
6 6
 
7
-* To avoid disappointment, new features should be discussed on the mailing list
8
-  (django-oscar@googlegroups.com) before serious work starts. 
9
-
10
-* Write tests! Pull requests will be rejected if sufficient tests aren't
11
-  provided.  See the guidance below on the testing conventions that Oscar uses.
12
-
13
-* Write docs! Please update the documentation when altering behaviour or introducing new features.
14
-
15
-* Write good commit messages: see `Tim Pope's excellent note`_.
16
-
17
-.. _`Tim Pope's excellent note`: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
18
-
19
-* Make pull requests against Oscar's master branch unless instructed otherwise.
20
-
21
-Installation
22
-============
23
-
24
-After forking, run::
25
-
26
-    git clone git@github.com:<username>/django-oscar.git
27
-    cd django-oscar
28
-    mkvirtualenv oscar  # using virtualenvwrapper
29
-    make install
30
-
31
-Running tests
32
-=============
33
-
34
-Oscar uses a nose_ testrunner which can be invoked using::
35
-
36
-    ./runtests.py
37
-
38
-.. _nose: http://nose.readthedocs.org/en/latest/
39
-
40
-To run a subset of tests, you can use filesystem or module paths.  These two
41
-commands will run the same set of tests::
42
-
43
-    ./runtests.py tests/unit/order
44
-    ./runtests.py tests.unit.order
45
-
46
-To run an individual test class, use one of::
47
-
48
-    ./runtests.py tests/unit/order:TestSuccessfulOrderCreation
49
-    ./runtests.py tests.unit.order:TestSuccessfulOrderCreation
50
-
51
-(Note the ':'.)
52
-
53
-To run an individual test, use one of::
54
-
55
-    ./runtests.py tests/unit/order:TestSuccessfulOrderCreation.test_creates_order_and_line_models
56
-    ./runtests.py tests.unit.order:TestSuccessfulOrderCreation.test_creates_order_and_line_models
57
-
58
-Oscar's testrunner uses the progressive_ plugin when running all tests, but uses
59
-the spec_ plugin when running a subset.  It is a good practice to name your test
60
-cases and methods so that the spec output reads well.  For example::
61
-
62
-    $ ./runtests.py tests/unit/offer/benefit_tests.py:TestAbsoluteDiscount
63
-    nosetests --verbosity 1 tests/unit/offer/benefit_tests.py:TestAbsoluteDiscount -s -x --with-spec
64
-    Creating test database for alias 'default'...
65
-
66
-    Absolute discount
67
-    - consumes all lines for multi item basket cheaper than threshold
68
-    - consumes all products for heterogeneous basket
69
-    - consumes correct quantity for multi item basket more expensive than threshold
70
-    - correctly discounts line
71
-    - discount is applied to lines
72
-    - gives correct discount for multi item basket cheaper than threshold
73
-    - gives correct discount for multi item basket more expensive than threshold
74
-    - gives correct discount for multi item basket with max affected items set
75
-    - gives correct discount for single item basket cheaper than threshold
76
-    - gives correct discount for single item basket equal to threshold
77
-    - gives correct discount for single item basket more expensive than threshold
78
-    - gives correct discounts when applied multiple times
79
-    - gives correct discounts when applied multiple times with condition
80
-    - gives no discount for a non discountable product
81
-    - gives no discount for an empty basket
82
-
83
-    ----------------------------------------------------------------------
84
-    Ran 15 tests in 0.295s
85
-
86
-.. _progressive: http://pypi.python.org/pypi/nose-progressive/
87
-.. _spec: http://darcs.idyll.org/~t/projects/pinocchio/doc/#spec-generate-test-description-from-test-class-method-names
88
-
89
-Playing in the sandbox
90
-======================
91
-
92
-Oscar ships with a 'sandbox' site which can be run locally to play around with
93
-Oscar using a browser.  Set it up by::
94
-
95
-   make sandbox 
96
-   cd sites/sandbox 
97
-   ./manage.py runserver
98
-
99
-This will create the database and load some fixtures for categories and shipping
100
-countries.
101
-
102
-Note that Oscar uses PIL_ and Sorl_ for thumbnailing, and so you will need
103
-``libjpeg-dev`` installed in your OS so that your PIL installation supports
104
-JPEGS.
105
-
106
-.. _PIL: http://www.pythonware.com/products/pil/
107
-.. _Sorl: http://sorl-thumbnail.readthedocs.org/en/latest/
108
-
109
-Vagrant
110
-=======
111
-
112
-Oscar ships with a Vagrant_ virtual machine that can be used to test integration
113
-with various services in a controlled environment.  For instance, it is used to
114
-test that the migrations run correctly in both MySQL and Postgres.
115
-
116
-.. _Vagrant: http://vagrantup.com/
117
-
118
-Building the Vagrant machine
119
-----------------------------
120
-
121
-To create the machine, first ensure that Vagrant and puppet_ are installed.  You will require a
122
-puppet version that supports ``puppet module install``, that is > 2.7.14.  Now
123
-run::
124
-
125
-    make puppet
126
-
127
-.. _puppet: http://docs.puppetlabs.com/guides/installation.html
128
-
129
-to fetch the required puppet modules for provisioning.  Finally, run::
130
-
131
-    vagrant up
132
-
133
-to create the virtual machine and provision it.
134
-
135
-Testing migrations against MySQL and Postgres
136
----------------------------------------------
137
-
138
-To test the migrations against MySQL and Postgres, do the following:
139
-
140
-1. SSH onto the VM::
141
-
142
-    vagrant ssh
143
-
144
-2. Change to sandbox folder and activate virtualenv::
145
-
146
-    cd /vagrant/sites/sandbox
147
-    source /var/www/virtualenv/bin/activate
148
-
149
-3. Run helper script::
150
-
151
-    ./test_migrations.sh
152
-
153
-    This will recreate the Oscar database in both MySQL and Postgres and rebuild
154
-    it using ``syncdb`` and ``migrate``.
155
-
156
-Testing WSGI server configurations
157
-----------------------------------
158
-
159
-You can browse the Oscar sandbox site in two ways:
160
-
161
-* Start Django's development server on port 8000::
162
-
163
-    vagrant ssh
164
-    cd /vagrant/sites/sandbox
165
-    source /var/www/virtualenv/bin/activate
166
-    ./manage.py runserver 0.0.0.0:8000
167
-
168
-  The Vagrant machine forwards port 8000 to post 8080 and so the site can be
169
-  accessed at http://localhost:8080 on your host machine.
170
-
171
-* The Vagrant machine install Apache2 and mod_wsgi.  You can browse the site
172
-  through Apache at http://localhost:8081 on your host machine.
173
-
174
-Writing LESS/CSS
175
-================
176
-
177
-The sandbox Oscar site defaults to serving the CSS files directly, bypassing
178
-LESS compilation.  If you want to develop the LESS files, set::
179
-
180
-    USE_LESS = True
181
-    COMPRESS_ENABLED = False
182
-
183
-in ``sites/sandbox/settings_local.py``.  You will also need to ensure that
184
-``lessc`` is installed.  This can be acheived by running::
185
-
186
-    pip install -r requirements_less.txt
187
-
188
-which will install the `virtual-node`_ and `virtual-less`_ packages, which will
189
-install node.js and LESS in your virtualenv.
190
-
191
-.. _`virtual-node`: https://github.com/elbaschid/virtual-node
192
-.. _`virtual-less`: https://github.com/elbaschid/virtual-less
193
-
194
-
195
-Writing docs
196
-============
197
-
198
-There's a helper script for building the docs locally::
199
-
200
-    cd docs
201
-    ./test_docs.sh
202
-
203
-The actual docs are in ``/docs/source``. This directory structure is a
204
-simplified version of what Django does.
205
-
206
-* ``internals/`` contains everything related to Oscar itself, e.g. contributing
207
-  guidelines or design philosophies.
208
-* ``ref/`` is the reference documentation, esp. consisting of
209
-* ``ref/apps/`` which should be a guide to each Oscar core app, explaining it's
210
-  function, the main models, how it relates to the other apps, etc.
211
-* ``topics/`` will contain "meta" articles, explaining how things tie together
212
-  over several apps, or how Oscar can be combined with other solutions.
213
-* ``howto/`` contains tutorial-style descriptions on how to solve a certain
214
-  problem. Ideally, those will be kept to a minimum; as the other docs should
215
-  be understandable enough that necessary steps to achieve a certain goal are
216
-  obvious.
217
-* ``_old/`` contains legacy documents that have not been moved into the new
218
-  structure. Please help get rid of those!
219
-
220
-``/index.rst`` is designed as the entry point, and diverges from above
221
-structure to make the documentation more approachable. Other ``index.rst``
222
-files should only be created if there's too many files to list them all.
223
-E.g. ``/index.rst`` directly links to all files in ``topics/`` and
224
-``internals/``, but there's an ``index.rst`` both for the files in ``howto/``
225
-and ``ref/apps/``.
226
-
227
-
228
-Conventions
229
-===========
230
-
231
-General
232
--------
233
-
234
-* PEP8 everywhere while remaining sensible
235
-
236
-URLs
237
-----
238
-
239
-* List pages should use plurals; e.g. ``/products/``, ``/notifications/``
240
-
241
-* Detail pages should simply be a PK/slug on top of the list page; e.g.
242
-  ``/products/the-bible/``, ``/notifications/1/``
243
-  
244
-* Create pages should have 'create' as the final path segment; e.g.
245
-  ``/dashboard/notifications/create/``
246
-
247
-* Update pages are sometimes the same as detail pages (i.e., when in the
248
-  dashboard).  In those cases, just use the detail convention, eg
249
-  ``/dashboard/notifications/3/``.  If there is a distinction between the detail
250
-  page and the update page, use ``/dashboard/notifications/3/update/``.
251
-
252
-* Delete pages; e.g., ``/dashboard/notifications/3/delete/``
253
-
254
-View class names
255
-----------------
256
-
257
-Classes should be named according to::
258
-
259
-    '%s%sView' % (class_name, verb)
260
-
261
-For example, ``ProductUpdateView``, ``OfferCreateView`` and
262
-``PromotionDeleteView``.  This doesn't fit all situations, but it's a good basis.
7
+http://django-oscar.readthedocs.org/en/latest/internals/contributing/index.html

+ 2
- 2
docs/source/index.rst View File

@@ -90,5 +90,5 @@ Learn about the ideas behind Oscar and how you can contribute.
90 90
 .. toctree::
91 91
    :maxdepth: 1
92 92
 
93
-   internals/contributing
94
-   internals/design_decisions
93
+   internals/contributing/index
94
+   

+ 0
- 1
docs/source/internals/contributing.rst View File

@@ -1 +0,0 @@
1
-../../../CONTRIBUTING.rst

+ 81
- 0
docs/source/internals/contributing/bugs-and-features.rst View File

@@ -0,0 +1,81 @@
1
+======================================
2
+Reporting bugs and requesting features
3
+======================================
4
+
5
+Before reporting a bug or requesting a new feature, please consider these
6
+general points:
7
+
8
+* Check that someone hasn't already filed the bug or feature request by
9
+  searching in the ticket tracker.
10
+
11
+* Don't use the ticket system to ask support questions. Use the
12
+  `django-oscar`_ mailing list for that.
13
+
14
+* Don't use the ticket tracker for lengthy discussions, because they're
15
+  likely to get lost. If a particular ticket is controversial, please move the
16
+  discussion to `django-oscar`_.
17
+
18
+All bugs are reported on our `GitHub issue tracker`_.
19
+
20
+.. _`GitHub issue tracker`: https://github.com/tangentlabs/django-oscar/issues
21
+
22
+Reporting bugs
23
+--------------
24
+
25
+Well-written bug reports are *incredibly* helpful. However, there's a certain
26
+amount of overhead involved in working with any bug tracking system so your
27
+help in keeping our ticket tracker as useful as possible is appreciated. In
28
+particular:
29
+
30
+* **Do** ask on `django-oscar`_ *first* if you're not sure if
31
+  what you're seeing is a bug.
32
+
33
+* **Do** write complete, reproducible, specific bug reports. You must
34
+  include a clear, concise description of the problem, and a set of
35
+  instructions for replicating it. Add as much debug information as you can:
36
+  code snippets, test cases, exception backtraces, screenshots, etc. A nice
37
+  small test case is the best way to report a bug, as it gives us an easy
38
+  way to confirm the bug quickly.
39
+
40
+Reporting user interface bugs and features
41
+------------------------------------------
42
+
43
+If your bug or feature request touches on anything visual in nature, there
44
+are a few additional guidelines to follow:
45
+
46
+* Include screenshots in your ticket which are the visual equivalent of a
47
+  minimal testcase. Show off the issue, not the crazy customizations
48
+  you've made to your browser.
49
+
50
+* If you're offering a pull request which changes the look or behavior of
51
+  Oscar's UI, please attach before *and* after screenshots/screencasts.
52
+  
53
+* Screenshots don't absolve you of other good reporting practices. Make sure
54
+  to include URLs, code snippets, and step-by-step instructions on how to
55
+  reproduce the behavior visible in the screenshots.
56
+
57
+Requesting features
58
+-------------------
59
+
60
+We're always trying to make Oscar better, and your feature requests are a key
61
+part of that. Here are some tips on how to make a request most effectively:
62
+
63
+* First request the feature on the `django-oscar`_ list, not in the
64
+  ticket tracker. It'll get read more closely if it's on the mailing list.
65
+  This is even more important for large-scale feature requests. We like to
66
+  discuss any big changes to Oscar's core on the mailing list before
67
+  actually working on them.
68
+
69
+* Describe clearly and concisely what the missing feature is and how you'd
70
+  like to see it implemented. Include example code (non-functional is OK)
71
+  if possible.
72
+
73
+* Explain *why* you'd like the feature, because sometimes it isn't obvious 
74
+  why the feature would be useful.
75
+
76
+As with most open-source projects, code talks. If you are willing to write the
77
+code for the feature yourself or, even better, if you've already written it,
78
+it's much more likely to be accepted. Just fork Oscar on GitHub, create a
79
+feature branch, and show us your work!
80
+
81
+.. _django-oscar: http://groups.google.com/group/django-oscar

+ 36
- 0
docs/source/internals/contributing/coding-style.rst View File

@@ -0,0 +1,36 @@
1
+============
2
+Coding Style
3
+============
4
+
5
+General
6
+-------
7
+
8
+* PEP8 everywhere while remaining sensible
9
+
10
+URLs
11
+----
12
+
13
+* List pages should use plurals; e.g. ``/products/``, ``/notifications/``
14
+
15
+* Detail pages should simply be a PK/slug on top of the list page; e.g.
16
+  ``/products/the-bible/``, ``/notifications/1/``
17
+  
18
+* Create pages should have 'create' as the final path segment; e.g.
19
+  ``/dashboard/notifications/create/``
20
+
21
+* Update pages are sometimes the same as detail pages (i.e., when in the
22
+  dashboard).  In those cases, just use the detail convention, eg
23
+  ``/dashboard/notifications/3/``.  If there is a distinction between the detail
24
+  page and the update page, use ``/dashboard/notifications/3/update/``.
25
+
26
+* Delete pages; e.g., ``/dashboard/notifications/3/delete/``
27
+
28
+View class names
29
+----------------
30
+
31
+Classes should be named according to::
32
+
33
+    '%s%sView' % (class_name, verb)
34
+
35
+For example, ``ProductUpdateView``, ``OfferCreateView`` and
36
+``PromotionDeleteView``.  This doesn't fit all situations, but it's a good basis.

docs/source/internals/design_decisions.rst → docs/source/internals/contributing/design-decisions.rst View File

@@ -1,6 +1,6 @@
1
-================
2
-Design decisions
3
-================
1
+======================
2
+Oscar Design Decisions
3
+======================
4 4
 
5 5
 The central aim of Oscar is to provide a solid core of an e-commerce project that can be
6 6
 extended and customised to suit the domain at hand.  This is achieved in several ways:

+ 115
- 0
docs/source/internals/contributing/development-environment.rst View File

@@ -0,0 +1,115 @@
1
+======================================
2
+Setting up the development environment
3
+======================================
4
+
5
+Fork the repo and run::
6
+
7
+    git clone git@github.com:<username>/django-oscar.git
8
+    cd django-oscar
9
+    mkvirtualenv oscar  # using virtualenvwrapper
10
+    make install
11
+
12
+Playing in the sandbox
13
+======================
14
+
15
+Oscar ships with a 'sandbox' site which can be run locally to play around with
16
+Oscar using a browser. Set it up by::
17
+
18
+   make sandbox 
19
+   cd sites/sandbox 
20
+   ./manage.py runserver
21
+
22
+This will create the database and load some fixtures for categories and shipping
23
+countries.
24
+
25
+Note that Oscar uses PIL_ and Sorl_ for thumbnailing, and so you will need
26
+``libjpeg-dev`` installed in your OS so that your PIL installation supports
27
+JPEGS.
28
+
29
+.. _PIL: http://www.pythonware.com/products/pil/
30
+.. _Sorl: http://sorl-thumbnail.readthedocs.org/en/latest/
31
+
32
+Writing LESS/CSS
33
+================
34
+
35
+The sandbox Oscar site defaults to serving the CSS files directly, bypassing
36
+LESS compilation.  If you want to develop the LESS files, set::
37
+
38
+    USE_LESS = True
39
+    COMPRESS_ENABLED = False
40
+
41
+in ``sites/sandbox/settings_local.py``.  You will also need to ensure that
42
+``lessc`` is installed.  This can be acheived by running::
43
+
44
+    pip install -r requirements_less.txt
45
+
46
+which will install the `virtual-node`_ and `virtual-less`_ packages, which will
47
+install node.js and LESS in your virtualenv.
48
+
49
+.. _`virtual-node`: https://github.com/elbaschid/virtual-node
50
+.. _`virtual-less`: https://github.com/elbaschid/virtual-less
51
+
52
+Vagrant
53
+=======
54
+
55
+Oscar ships with a Vagrant_ virtual machine that can be used to test integration
56
+with various services in a controlled environment.  For instance, it is used to
57
+test that the migrations run correctly in both MySQL and Postgres.
58
+
59
+.. _Vagrant: http://vagrantup.com/
60
+
61
+Building the Vagrant machine
62
+----------------------------
63
+
64
+To create the machine, first ensure that Vagrant and puppet_ are installed.  You will require a
65
+puppet version that supports ``puppet module install``, that is > 2.7.14.  Now
66
+run::
67
+
68
+    make puppet
69
+
70
+.. _puppet: http://docs.puppetlabs.com/guides/installation.html
71
+
72
+to fetch the required puppet modules for provisioning.  Finally, run::
73
+
74
+    vagrant up
75
+
76
+to create the virtual machine and provision it.
77
+
78
+Testing migrations against MySQL and Postgres
79
+---------------------------------------------
80
+
81
+To test the migrations against MySQL and Postgres, do the following:
82
+
83
+1. SSH onto the VM::
84
+
85
+    vagrant ssh
86
+
87
+2. Change to sandbox folder and activate virtualenv::
88
+
89
+    cd /vagrant/sites/sandbox
90
+    source /var/www/virtualenv/bin/activate
91
+
92
+3. Run helper script::
93
+
94
+    ./test_migrations.sh
95
+
96
+    This will recreate the Oscar database in both MySQL and Postgres and rebuild
97
+    it using ``syncdb`` and ``migrate``.
98
+
99
+Testing WSGI server configurations
100
+----------------------------------
101
+
102
+You can browse the Oscar sandbox site in two ways:
103
+
104
+* Start Django's development server on port 8000::
105
+
106
+    vagrant ssh
107
+    cd /vagrant/sites/sandbox
108
+    source /var/www/virtualenv/bin/activate
109
+    ./manage.py runserver 0.0.0.0:8000
110
+
111
+  The Vagrant machine forwards port 8000 to post 8080 and so the site can be
112
+  accessed at http://localhost:8080 on your host machine.
113
+
114
+* The Vagrant machine install Apache2 and mod_wsgi.  You can browse the site
115
+  through Apache at http://localhost:8081 on your host machine.

+ 41
- 0
docs/source/internals/contributing/index.rst View File

@@ -0,0 +1,41 @@
1
+=====================
2
+Contributing to Oscar
3
+=====================
4
+
5
+You're thinking of helping out. That's brilliant - thank you for your time! You can contribute in many ways:
6
+
7
+* Join the `django-oscar`_ mailing list and answer questions.
8
+
9
+.. _django-oscar: http://groups.google.com/group/django-oscar
10
+
11
+* :doc:`Report bugs <bugs-and-features>` in our `ticket tracker`_.
12
+
13
+.. _ticket tracker: https://github.com/tangentlabs/django-oscar/issues
14
+
15
+* :doc:`Submit pull requests <submitting-pull-requests>` for new and/or
16
+  fixed behavior.
17
+
18
+* :doc:`Improve the documentation <writing-documentation>`.
19
+
20
+* :doc:`Write tests <running-tests>`.
21
+
22
+* Translations can be contributed using Transifex_. Just apply for a language
23
+  and go ahead!
24
+
25
+.. _Transifex: https://www.transifex.com/projects/p/django-oscar/
26
+
27
+
28
+
29
+Overview
30
+--------
31
+
32
+.. toctree::
33
+   :maxdepth: 1
34
+   
35
+   development-environment
36
+   bugs-and-features
37
+   coding-style
38
+   design-decisions
39
+   submitting-pull-requests
40
+   running-tests
41
+   writing-documentation

+ 58
- 0
docs/source/internals/contributing/running-tests.rst View File

@@ -0,0 +1,58 @@
1
+=============
2
+Running tests
3
+=============
4
+
5
+Oscar uses a nose_ testrunner which can be invoked using::
6
+
7
+    ./runtests.py
8
+
9
+.. _nose: http://nose.readthedocs.org/en/latest/
10
+
11
+To run a subset of tests, you can use filesystem or module paths.  These two
12
+commands will run the same set of tests::
13
+
14
+    ./runtests.py tests/unit/order
15
+    ./runtests.py tests.unit.order
16
+
17
+To run an individual test class, use one of::
18
+
19
+    ./runtests.py tests/unit/order:TestSuccessfulOrderCreation
20
+    ./runtests.py tests.unit.order:TestSuccessfulOrderCreation
21
+
22
+(Note the ':'.)
23
+
24
+To run an individual test, use one of::
25
+
26
+    ./runtests.py tests/unit/order:TestSuccessfulOrderCreation.test_creates_order_and_line_models
27
+    ./runtests.py tests.unit.order:TestSuccessfulOrderCreation.test_creates_order_and_line_models
28
+
29
+Oscar's testrunner uses the progressive_ plugin when running all tests, but uses
30
+the spec_ plugin when running a subset.  It is a good practice to name your test
31
+cases and methods so that the spec output reads well.  For example::
32
+
33
+    $ ./runtests.py tests/unit/offer/benefit_tests.py:TestAbsoluteDiscount
34
+    nosetests --verbosity 1 tests/unit/offer/benefit_tests.py:TestAbsoluteDiscount -s -x --with-spec
35
+    Creating test database for alias 'default'...
36
+
37
+    Absolute discount
38
+    - consumes all lines for multi item basket cheaper than threshold
39
+    - consumes all products for heterogeneous basket
40
+    - consumes correct quantity for multi item basket more expensive than threshold
41
+    - correctly discounts line
42
+    - discount is applied to lines
43
+    - gives correct discount for multi item basket cheaper than threshold
44
+    - gives correct discount for multi item basket more expensive than threshold
45
+    - gives correct discount for multi item basket with max affected items set
46
+    - gives correct discount for single item basket cheaper than threshold
47
+    - gives correct discount for single item basket equal to threshold
48
+    - gives correct discount for single item basket more expensive than threshold
49
+    - gives correct discounts when applied multiple times
50
+    - gives correct discounts when applied multiple times with condition
51
+    - gives no discount for a non discountable product
52
+    - gives no discount for an empty basket
53
+
54
+    ----------------------------------------------------------------------
55
+    Ran 15 tests in 0.295s
56
+
57
+.. _progressive: http://pypi.python.org/pypi/nose-progressive/
58
+.. _spec: http://darcs.idyll.org/~t/projects/pinocchio/doc/#spec-generate-test-description-from-test-class-method-names

+ 17
- 0
docs/source/internals/contributing/submitting-pull-requests.rst View File

@@ -0,0 +1,17 @@
1
+========================
2
+Submitting pull requests
3
+========================
4
+
5
+* To avoid disappointment, new features should be discussed on the mailing list
6
+  (django-oscar@googlegroups.com) before serious work starts. 
7
+
8
+* Write tests! Pull requests will be rejected if sufficient tests aren't
9
+  provided. 
10
+
11
+* Write docs! Please update the documentation when altering behaviour or introducing new features.
12
+
13
+* Write good commit messages: see `Tim Pope's excellent note`_.
14
+
15
+.. _`Tim Pope's excellent note`: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
16
+
17
+* Make pull requests against Oscar's master branch unless instructed otherwise.

+ 24
- 0
docs/source/internals/contributing/writing-documentation.rst View File

@@ -0,0 +1,24 @@
1
+=====================
2
+Writing documentation
3
+=====================
4
+
5
+The docs are built by calling ``make docs`` from your Oscar directory.
6
+They live in ``/docs/source``. This directory structure is a
7
+simplified version of what Django does.
8
+
9
+* ``internals/`` contains everything related to Oscar itself, e.g. contributing
10
+  guidelines or design philosophies.
11
+* ``ref/`` is the reference documentation, esp. consisting of
12
+* ``ref/apps/`` which should be a guide to each Oscar core app, explaining it's
13
+  function, the main models, how it relates to the other apps, etc.
14
+* ``topics/`` will contain "meta" articles, explaining how things tie together
15
+  over several apps, or how Oscar can be combined with other solutions.
16
+* ``howto/`` contains tutorial-style descriptions on how to solve a certain
17
+  problem.
18
+
19
+``/index.rst`` is designed as the entry point, and diverges from above
20
+structure to make the documentation more approachable. Other ``index.rst``
21
+files should only be created if there's too many files to list them all.
22
+E.g. ``/index.rst`` directly links to all files in ``topics/`` and
23
+``internals/``, but there's an ``index.rst`` both for the files in ``howto/``
24
+and ``ref/apps/``.

+ 3
- 1
docs/source/internals/getting_help.rst View File

@@ -10,7 +10,9 @@ the solution as a recipe.
10 10
 
11 11
 .. _`Google Groups archive`: https://groups.google.com/forum/?fromgroups#!forum/django-oscar
12 12
 
13
-If you find a bug, please report it in the `GitHub issue tracker`_
13
+If you think you found a bug, please read
14
+:doc:`Reporting bugs <contributing/bugs-and-features>` and report it
15
+in the `GitHub issue tracker`_.
14 16
 
15 17
 .. _`GitHub issue tracker`: https://github.com/tangentlabs/django-oscar/issues
16 18
 

+ 3
- 3
docs/source/ref/apps/index.rst View File

@@ -1,6 +1,6 @@
1
-===============
2
-Oscar Core Apps
3
-===============
1
+=========================
2
+Oscar Core Apps explained
3
+=========================
4 4
 
5 5
 Oscar is split up in multiple, mostly independent apps.
6 6
 

+ 1
- 1
setup.py View File

@@ -73,7 +73,7 @@ setup(name='django-oscar',
73 73
 
74 74
 # Show contributing instructions if being installed in 'develop' mode
75 75
 if len(sys.argv) > 1 and sys.argv[1] == 'develop':
76
-    docs_url = 'http://django-oscar.readthedocs.org/en/latest/contributing.html'
76
+    docs_url = 'http://django-oscar.readthedocs.org/en/latest/internals/contributing/index.html'
77 77
     mailing_list = 'django-oscar@googlegroups.com'
78 78
     mailing_list_url = 'https://groups.google.com/forum/?fromgroups#!forum/django-oscar'
79 79
     twitter_url = 'https://twitter.com/django_oscar'

Loading…
Cancel
Save