Debian Codegraph @

contributing.rst

raw
1 Contributing to nose2
2 =====================
3
4 Please do!
5
6 The Basics
7 ----------
8
9 nose2 is hosted on `github`_ and uses GitHub for issue tracking.
10
11 Please report issues and make feature requests here:
12 https://github.com/nose-devs/nose2/issues
13
14 Code Contributions
15 ------------------
16
17 The main rule is: *code changes should include tests.*
18
19 If you aren't sure how to add tests, or you don't know why existing tests fail
20 on your changes, that's okay! Submit your patch and ask for help testing it.
21
22 Local Dev Requirements
23 ++++++++++++++++++++++
24
25 To run the tests you must have `tox`_ installed.
26
27 Optional but useful tools include ``make`` and `pre-commit`_.
28
29 Running Tests
30 +++++++++++++
31
32 To run all tests: ::
33
34 $ tox
35
36 To run linting checks: ::
37
38 $ tox -e lint
39
40 You can also use ``make test`` and ``make lint`` for these.
41
42 Linting
43 +++++++
44
45 nose2 uses `black`_ and `ruff`_ to enforce code formatting and linting and
46 `pre-commit`_ to run these tools.
47
48 For the best development experience, we recommend setting up integrations with
49 your editor and git.
50
51 Running ``pre-commit`` as a git hook is optional. To configure it, you must
52 have ``pre-commit`` installed and run:
53
54 .. code-block:: bash
55
56 $ pre-commit install
57
58 .. note::
59 If you need to bypass pre-commit hooks after setting this up, you can commit
60 with ``--no-verify``
61
62 .. _black: https://black.readthedocs.io/
63 .. _github: https://github.com/nose-devs/nose2
64 .. _pre-commit: https://pre-commit.com/
65 .. _ruff: https://beta.ruff.rs/docs/
66 .. _tox: http://pypi.python.org/pypi/tox