Skip to content

Latest commit

 

History

History
79 lines (53 loc) · 2.32 KB

DEVELOPER.md

File metadata and controls

79 lines (53 loc) · 2.32 KB

CrowdSec Logo

CrowdSec CAPI Python SDK

Developer guide

Table of Contents

Local installation

Virtual environment

pyenv install 3.12.0
pyenv local 3.12.0
python -m venv venv
source venv/bin/activate

Install dependencies

python -m pip install --upgrade pip setuptools wheel   
pip install -r requirements.txt
pip install -r requirements-dev.txt
python -m pip install .

Unit tests

python -m pytest -s -k 'not mongodb'

Update documentation table of contents

To update the table of contents in the documentation, you can use the doctoc tool.

First, install it:

npm install -g doctoc

Then, run it in the documentation folder:

doctoc docs/*

Release process

We use Semantic Versioning approach to determine the next version number of the SDK.

Once you are ready to release a new version (e.g when all your changes are on the main branch), you should:

  • Determine the next version number based on the changes made since the last release: MAJOR.MINOR.PATCH
  • Update the CHANGELOG.md file with the new version number and the changes made since the last release.
    • Each release description must respect the same format as the previous ones.
  • Commit the changes with a message like chore(changelog) Prepare for release MAJOR.MINOR.PATCH.
  • Browse to the GitHub Create and publish release action
    • Click on Run workflow and fill the Tag name input with the new version number prefixed by a v: vMAJOR.MINOR.PATCH.
    • Tick the Publish to PyPI checkbox.
    • Click on Run workflow to trigger the release process.