Skip to content

Commit 0dcae31

Browse files
authored
New Doc: Local Dev & Tox guides (#253)
* New Doc: docs/devguide/local-development-environment.rst * New Doc: docs/devguide/tox.rst
1 parent 4e5452a commit 0dcae31

File tree

7 files changed

+358
-51
lines changed

7 files changed

+358
-51
lines changed

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ Tomer Nosrati
135135

136136
:web: http://tomernosrati.com/
137137
:github: https://github.com/Nusnus
138-
:twitter: https://x.com/tomer_nosrati
138+
:x: https://x.com/tomer_nosrati

docs/devguide/index.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,15 @@
77
:Release: |version|
88
:Date: |today|
99

10+
The purpose of this guide is to explain the plugin's software development lifecycle (SDLC),
11+
and to provide a set of guidelines and best practices for developing the plugin itself using all of
12+
the available tools and resources.
13+
14+
This guide is intended for developers who want to contribute to the plugin. It explains which tools
15+
are used and how to set up a local development environment.
16+
1017
.. toctree::
1118
:maxdepth: 1
1219

13-
introduction
14-
tbd
20+
local-development-environment
21+
tox

docs/devguide/introduction.rst

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
.. _local-development-environment:
2+
3+
===============================
4+
Local Development Environment
5+
===============================
6+
7+
:Release: |version|
8+
:Date: |today|
9+
10+
.. contents::
11+
:local:
12+
:depth: 2
13+
14+
Cloning the Repository
15+
======================
16+
17+
Clone the repository from GitHub: https://github.com/celery/pytest-celery
18+
19+
**Https**::
20+
21+
https://github.com/celery/pytest-celery.git
22+
23+
**SSH**::
24+
25+
[email protected]:celery/pytest-celery.git
26+
27+
**GitHub CLI**::
28+
29+
gh repo clone celery/pytest-celery
30+
31+
Using Poetry
32+
============
33+
34+
The plugin uses `Poetry <https://python-poetry.org/>`_ for dependency management.
35+
36+
To install the development dependencies, run the following command in your desired virtual environment::
37+
38+
poetry install -E "all" --with test,dev,ci,docs
39+
40+
.. tip::
41+
42+
During development of the dependencies themselves, you can use the following snippet for easy cleanup & reinstallation of the dependencies::
43+
44+
pip uninstall pytest-celery celery -y && pip freeze | cut -d "@" -f1 | xargs pip uninstall -y;\
45+
pip install -U pip ipython;\
46+
poetry install -E "all" --with test,dev,ci,docs
47+
48+
Debugging with VSCode
49+
=====================
50+
51+
Create a ``.vscode`` directory with the following ``launch.json`` file that can be used to for debugging.
52+
53+
.. note::
54+
55+
Take note of ``"justMyCode": false``
56+
57+
.. code-block:: json
58+
59+
{
60+
// Use IntelliSense to learn about possible attributes.
61+
// Hover to view descriptions of existing attributes.
62+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
63+
"version": "0.2.0",
64+
"configurations": [
65+
{
66+
"name": "Python: Debug Tests",
67+
"type": "python",
68+
"request": "launch",
69+
"program": "${file}",
70+
"purpose": [
71+
"debug-test",
72+
],
73+
"console": "integratedTerminal",
74+
"justMyCode": false,
75+
"presentation": {
76+
"hidden": true
77+
},
78+
// Disable cov to allow breakpoints when launched from VS Code Python
79+
"env": {
80+
"PYTHONUNBUFFERED": "1",
81+
"PYTHONDONTWRITEBYTECODE": "1",
82+
"PYTEST_ADDOPTS": "--no-cov --exitfirst"
83+
},
84+
"stopOnEntry": false,
85+
"showReturnValue": true,
86+
"redirectOutput": true
87+
}
88+
]
89+
}

docs/devguide/tbd.rst

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)