File: contributing.rst

package info (click to toggle)
python-openapi-spec-validator 0.7.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 772 kB
  • sloc: python: 2,050; makefile: 54
file content (76 lines) | stat: -rw-r--r-- 2,329 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
Contributing
============

Firstly, thank you all for taking the time to contribute.

The following section describes how you can contribute to the openapi-spec-validator project on GitHub.

Reporting bugs
--------------

Before you report
^^^^^^^^^^^^^^^^^

* Check whether your issue does not already exist in the `Issue tracker <https://github.com/python-openapi/openapi-spec-validator/issues>`__.
* Make sure it is not a support request or question better suited for `Discussion board <https://github.com/python-openapi/openapi-spec-validator/discussions>`__.

How to submit a report
^^^^^^^^^^^^^^^^^^^^^^

* Include clear title.
* Describe your runtime environment with exact versions you use.
* Describe the exact steps which reproduce the problem, including minimal code snippets.
* Describe the behavior you observed after following the steps, pasting console outputs.
* Describe expected behavior to see and why, including links to documentations.

Code contribution
-----------------

Prerequisites
^^^^^^^^^^^^^

Install `Poetry <https://python-poetry.org>`__ by following the `official installation instructions <https://python-poetry.org/docs/#installation>`__. Optionally (but recommended), configure Poetry to create a virtual environment in a folder named ``.venv`` within the root directory of the project:

.. code-block:: console

   poetry config virtualenvs.in-project true

Setup
^^^^^

To create a development environment and install the runtime and development dependencies, run:

.. code-block:: console

   poetry install

Then enter the virtual environment created by Poetry:

.. code-block:: console

   poetry shell

Static checks
^^^^^^^^^^^^^

The project uses static checks using fantastic `pre-commit <https://pre-commit.com/>`__. Every change is checked on CI and if it does not pass the tests it cannot be accepted. If you want to check locally then run following command to install pre-commit.

To turn on pre-commit checks for commit operations in git, enter:

.. code-block:: console

   pre-commit install

To run all checks on your staged files, enter:

.. code-block:: console

   pre-commit run

To run all checks on all files, enter:

.. code-block:: console

   pre-commit run --all-files

Pre-commit check results are also attached to your PR through integration with Github Action.