Contributing to SwarmZero
We encourage developers to contribute to the SwarmZero Community. Your involvement helps us grow and improve innovation and collaboration. By participating, you can enhance your skills, and connect with other developers.
Here is a guide on how you can get started to contribute to the project:
Setup
If you want to contribute to the codebase, you need to set up your development environment. Follow these steps:
Create a new file called
.env
Copy the contents of
.env.example
into your new.env
file.
Note: API keys for third-party tools are not provided. Obtain OPENAI_API_KEY
from OpenAI
Install Poetry
If you don't have Poetry installed, you can install it using the following commands:
curl -sSL https://install.python-poetry.org | python3 - export PATH="$HOME/.local/bin:$PATH"
Activate the Virtual Environment:
Activate the virtual environment created by Poetry with the following command:
poetry shell
Install Dependencies:
Install dependencies with the following command:
poetry install --no-root
Testing:
Make sure you're in the tests/ directory:
$ cd tests/
Run the test suite:
$ pytest
Run tests for a specific module:
$ pytest tests/path/to/test_module.py
Run with verbose output:
$ pytest -v
Run with a detailed output of each test (including print statements):
$ pytest -s
Access the API Doc:
Open http://localhost:8000/docs with your browser to see the Swagger UI of the API.
Last updated
Was this helpful?