File: contributing.rst

package info (click to toggle)
django-invitations 2.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 456 kB
  • sloc: python: 1,484; makefile: 27; sh: 6
file content (35 lines) | stat: -rw-r--r-- 1,342 bytes parent folder | download | duplicates (2)
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
Contributing
============

JazzBand project
----------------
As we are members of a [JazzBand project](https://jazzband.co/projects), `django-invitations` contributors should adhere to the [Contributor Code of Conduct](https://jazzband.co/about/conduct).


Testing
-------

It's important that any new code is tested before submission. To quickly test code in your active development environment, you should first install all of the requirements by running:

.. code-block:: bash

    source .venv/bin/activate
    pip install -e '.[testing]' -U

Then, run the following command to execute tests:

.. code-block:: bash

    pytest --cov-report term --cov=invitations  --ignore=tests/allauth/  --ds=tests.settings tests

To test the integration with django-allauth, first make sure you have it installed. Then run:

.. code-block:: bash

    pytest --cov-report term --cov=invitations  --ignore=tests/basic/  --ds=tests.settings_allauth tests

Testing in a single environment is a quick and easy way to identify obvious issues with your code. However, it's important to test changes in other environments too, before they are submitted. In order to help with this, django-invitations is configured to use tox for multi-environment tests. They take longer to complete, but can be triggered with a simple command:

.. code-block:: bash

    tox