Skip to content

Commit 1915d4e

Browse files
committed
doc: add development instructions
1 parent 751bef7 commit 1915d4e

File tree

2 files changed

+116
-2
lines changed

2 files changed

+116
-2
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
Welcome to contribute to `pgmq-sqlalchemy` !
3+
Welcome to contribute to `pgmq-sqlalchemy` ! <br>
44
This document will guide you through the process of contributing to the project.
55

66
## How to Contribute

doc/development.rst

Lines changed: 115 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,118 @@
11

22

33
Development
4-
===========
4+
===========
5+
6+
| Welcome to contributing to ``pgmq-sqlalchemy`` !
7+
| This document will guide you through the process of contributing to the project.
8+
9+
How to Contribute
10+
-----------------
11+
12+
1. Fork the repository
13+
- Click the `Fork` button in the upper right corner of the repository page.
14+
2. Clone the repository
15+
- Clone the repository to your local machine.
16+
17+
.. code-block:: bash
18+
19+
git clone https://github.com/your-username/pgmq-sqlalchemy.git
20+
21+
3. Create a new branch
22+
- Create a new branch for your changes.
23+
24+
.. code-block:: bash
25+
26+
git checkout -b feature/your-feature-name
27+
28+
4. Make your changes
29+
- Make your changes to the codebase.
30+
- Add tests for your changes.
31+
- Add documentation if changes are user-facing.
32+
5. Commit your changes
33+
* Commit your changes with meaningful commit messages.
34+
* `ref: conventional git commit messages <https://www.conventionalcommits.org/en/v1.0.0/>`_
35+
36+
.. code-block:: bash
37+
38+
git commit -m "feat: your feature description"
39+
40+
6. Push your changes
41+
- Push your changes to your forked repository.
42+
43+
.. code-block:: bash
44+
45+
git push origin feature/your-feature-name
46+
47+
7. Create a Pull Request
48+
- Create a Pull Request from your forked repository to the ``develop`` branch of the original repository.
49+
50+
Development Setup
51+
-----------------
52+
53+
Setup
54+
~~~~~
55+
56+
Install dependencies and `ruff` pre-commit hooks.
57+
58+
.. code-block:: bash
59+
60+
make install
61+
62+
Prerequisites: **Docker** and **Docker Compose** installed.
63+
64+
Start development PostgreSQL
65+
66+
.. code-block:: bash
67+
68+
make start-db
69+
70+
Stop development PostgreSQL
71+
72+
.. code-block:: bash
73+
74+
make stop-db
75+
76+
Makefile utility
77+
~~~~~~~~~~~~~~~~
78+
79+
.. code-block:: bash
80+
81+
make help
82+
83+
# will show all available commands and their descriptions.
84+
85+
Linting
86+
~~~~~~~
87+
88+
We use `pre-commit <https://pre-commit.com/>`_ hook with `ruff <https://github.com/astral-sh/ruff-pre-commit>`_ to automatically lint the codebase before committing.
89+
90+
Testing
91+
-------
92+
93+
Run tests locally
94+
95+
.. code-block:: bash
96+
97+
make test-local
98+
99+
Run tests in docker
100+
101+
.. code-block:: bash
102+
103+
make test-docker
104+
105+
Documentation
106+
-------------
107+
108+
Serve documentation
109+
110+
.. code-block:: bash
111+
112+
make doc-serve
113+
114+
Clean documentation build
115+
116+
.. code-block:: bash
117+
118+
make doc-clean

0 commit comments

Comments
 (0)