File: contributing.rst

package info (click to toggle)
python-django-debug-toolbar 1%3A1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,456 kB
  • ctags: 534
  • sloc: python: 3,073; makefile: 191; sh: 1
file content (133 lines) | stat: -rw-r--r-- 3,760 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
Contributing
============

.. image:: https://jazzband.co/static/img/jazzband.svg
   :target: https://jazzband.co/
   :alt: Jazzband

This is a `Jazzband <https://jazzband.co>`_ project. By contributing you agree
to abide by the `Contributor Code of Conduct <https://jazzband.co/about/conduct>`_
and follow the `guidelines <https://jazzband.co/about/guidelines>`_.

Bug reports and feature requests
--------------------------------

You can report bugs and request features in the `bug tracker
<http://github.com/jazzband/django-debug-toolbar/issues>`_.

Please search the existing database for duplicates before filing an issue.

Code
----

The code is available `on GitHub
<http://github.com/jazzband/django-debug-toolbar>`_.

Once you've obtained a checkout, you should create a virtualenv_ and install
the libraries required for working on the Debug Toolbar::

    $ pip install -r requirements_dev.txt

.. _virtualenv: http://www.virtualenv.org/

You can run now run the example application::

    $ DJANGO_SETTINGS_MODULE=example.settings django-admin migrate
    $ DJANGO_SETTINGS_MODULE=example.settings django-admin runserver

For convenience, there's an alias for the second command::

    $ make example

Look at ``example/settings.py`` for running the example with another database
than SQLite.

Tests
-----

Once you've set up a development environment as explained above, you can run
the test suite for the versions of Django and Python installed in that
environment::

    $ make test

You can enable coverage measurement during tests::

    $ make coverage

You can also run the test suite on all supported versions of Django and
Python::

    $ tox

This is strongly recommended before committing changes to Python code.

The test suite includes frontend tests written with Selenium. Since they're
annoyingly slow, they're disabled by default. You can run them as follows::

    $ make test_selenium

or by setting the ``DJANGO_SELENIUM_TESTS`` environment variable::

    $ DJANGO_SELENIUM_TESTS=true make test
    $ DJANGO_SELENIUM_TESTS=true make coverage
    $ DJANGO_SELENIUM_TESTS=true tox

At this time, there isn't an easy way to test against databases other than
SQLite.

Style
-----

Python code for the Django Debug Toolbar follows PEP8. Line length is limited
to 100 characters. You can check for style violations with::

    $ make flake8

Import style is enforce by isort. You can sort import automatically with::

    $ make isort

Patches
-------

Please submit `pull requests
<http://github.com/jazzband/django-debug-toolbar/pulls>`_!

The Debug Toolbar includes a limited but growing test suite. If you fix a bug
or add a feature code, please consider adding proper coverage in the test
suite, especially if it has a chance for a regression.

Translations
------------

Translation efforts are coordinated on `Transifex
<https://www.transifex.net/projects/p/django-debug-toolbar/>`_.

Help translate the Debug Toolbar in your language!

Mailing list
------------

This project doesn't have a mailing list at this time. If you wish to discuss
a topic, please open an issue on GitHub.

Making a release
----------------

Prior to a release, the English ``.po`` file must be updated with ``make
translatable_strings`` and pushed to Transifex. Once translators have done
their job, ``.po`` files must be downloaded with ``make update_translations``.

The release itself requires the following steps:

#. Bump version numbers in docs/conf.py, README.rst and setup.py and commit.

#. Tag the new version.

#. ``python setup.py sdist bdist_wheel upload``.

#. Push the commit and the tag.

#. Change the default version of the docs to point to the latest release:
   https://readthedocs.org/dashboard/django-debug-toolbar/versions/