Skip to content

Commit

Permalink
New Doc: Local Dev & Tox guides (#253)
Browse files Browse the repository at this point in the history
* New Doc: docs/devguide/local-development-environment.rst

* New Doc: docs/devguide/tox.rst
  • Loading branch information
Nusnus authored Mar 19, 2024
1 parent 4e5452a commit 0dcae31
Show file tree
Hide file tree
Showing 7 changed files with 358 additions and 51 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ Tomer Nosrati

:web: http://tomernosrati.com/
:github: https://github.com/Nusnus
:twitter: https://x.com/tomer_nosrati
:x: https://x.com/tomer_nosrati
11 changes: 9 additions & 2 deletions docs/devguide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@
:Release: |version|
:Date: |today|

The purpose of this guide is to explain the plugin's software development lifecycle (SDLC),
and to provide a set of guidelines and best practices for developing the plugin itself using all of
the available tools and resources.

This guide is intended for developers who want to contribute to the plugin. It explains which tools
are used and how to set up a local development environment.

.. toctree::
:maxdepth: 1

introduction
tbd
local-development-environment
tox
17 changes: 0 additions & 17 deletions docs/devguide/introduction.rst

This file was deleted.

89 changes: 89 additions & 0 deletions docs/devguide/local-development-environment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
.. _local-development-environment:

===============================
Local Development Environment
===============================

:Release: |version|
:Date: |today|

.. contents::
:local:
:depth: 2

Cloning the Repository
======================

Clone the repository from GitHub: https://github.com/celery/pytest-celery

**Https**::

https://github.com/celery/pytest-celery.git

**SSH**::

git@github.com:celery/pytest-celery.git

**GitHub CLI**::

gh repo clone celery/pytest-celery

Using Poetry
============

The plugin uses `Poetry <https://python-poetry.org/>`_ for dependency management.

To install the development dependencies, run the following command in your desired virtual environment::

poetry install -E "all" --with test,dev,ci,docs

.. tip::

During development of the dependencies themselves, you can use the following snippet for easy cleanup & reinstallation of the dependencies::

pip uninstall pytest-celery celery -y && pip freeze | cut -d "@" -f1 | xargs pip uninstall -y;\
pip install -U pip ipython;\
poetry install -E "all" --with test,dev,ci,docs

Debugging with VSCode
=====================

Create a ``.vscode`` directory with the following ``launch.json`` file that can be used to for debugging.

.. note::

Take note of ``"justMyCode": false``

.. code-block:: json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Debug Tests",
"type": "python",
"request": "launch",
"program": "${file}",
"purpose": [
"debug-test",
],
"console": "integratedTerminal",
"justMyCode": false,
"presentation": {
"hidden": true
},
// Disable cov to allow breakpoints when launched from VS Code Python
"env": {
"PYTHONUNBUFFERED": "1",
"PYTHONDONTWRITEBYTECODE": "1",
"PYTEST_ADDOPTS": "--no-cov --exitfirst"
},
"stopOnEntry": false,
"showReturnValue": true,
"redirectOutput": true
}
]
}
28 changes: 0 additions & 28 deletions docs/devguide/tbd.rst

This file was deleted.

Loading

0 comments on commit 0dcae31

Please sign in to comment.