Thank you for considering contributing to PyWCE!
By contributing, you're helping improve a robust tool designed for building WhatsApp chatbots and using WhatsApp Cloud APIs effortlessly.
Ensure you have the following installed before contributing:
- Python 3.10+
- pip (Python package manager)
- An active [TEST] WhatsApp Cloud API setup with the necessary tokens and configurations.
-
Fork the repository on GitHub.
-
Clone your forked repository locally:
git clone https://github.com/DonnC/pywce.git cd pywce
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
# engine dependencies pip install -r requirements.txt # example dependencies cd example pip install -r requirements.txt
-
(Optional) Run tests to ensure your environment is working:
pytest
If you encounter any bugs, feature requests, or documentation issues, please open an issue.
Feel free to suggest new features or improvements to both:
- The WhatsApp client library (
pywce.whatsapp
) for direct interaction with the API. - The engine for building chatbots using YAML-defined templates.
- Before you start coding, create a new branch for your changes:
git checkout -b feature/my-new-feature
- Keep your changes modular and adhere to the existing coding style.
- Ensure you add comments where necessary.
Write tests for your contributions in the tests
folder. Use pytest
to validate your changes:
pytest
- Commit your changes with meaningful messages:
git commit -m "Add feature: Support for multiple template triggers"
- Push your branch to your forked repository:
git push origin feature/my-new-feature
- Open a pull request from your branch to the
main
branch of the original repository.
This project uses PEP8 standards. Use flake8
or black
to check code style:
pip install flake8 black
flake8 . && black .
All new features and bug fixes should include test coverage.
Place your tests in the tests/
directory.
Use meaningful names for test files and functions.
The pywce.whatsapp
module provides direct API integration. If you'd like to add more features:
- Use the
WhatsApp
class inpywce/modules/whatsapp/__init__.py
as your base. - Add well-documented methods for new API endpoints.
The engine processes chatbot logic via YAML templates. When adding new engine capabilities:
- Add corresponding engine logic in corresponding folder under
pywce/src/
. - Document new template options or hooks clearly in
README
.
If you're stuck or have any questions, don't hesitate to open a discussion on the GitHub Discussions page.
Thank you for contributing to PyWCE!