We’re excited to have you join the Kasa project! Your contributions are key to advancing this Python library that supports African language translation, Speech-to-Text (STT), and Text-to-Speech (TTS) models built by the Ghana NLP team.
Below, you'll find a guide to help you contribute smoothly.
- Setting Up Your Development Environment
- Coding Standards and Best Practices
- Testing Your Code
- Submitting a Pull Request
- Understanding the Project Structure
- Useful Resources
Make sure to create a virtual environment, then proceed.
-
Clone the Repository: Start by cloning the repository and switch to the kasa directory on your local machine:
git clone https://github.com/GhanaNLP/kasa.git cd kasa
-
Install Dependencies: Make sure Python 3.8 or higher is installed. Run:
pip install .
-
Set Up Development Tools (Optional but Recommended): Use code linters and formatters like
black
andflake8
for consistent code style:pip install black flake8
We like clean contributions
- Follow PEP 8: Ensure your code aligns with the PEP 8 Python style guide.
- Use Type Hints: Add type annotations to improve code readability and aid type checkers.
- Docstrings and Comments:
- Use docstrings to describe the purpose and parameters of classes and functions.
- Add comments to explain complex or non-intuitive parts of the code.
Testing is non-negotiable to maintain the quality of Kasa. Place your test scripts in the tests/
directory and name them following the format test_<feature>.py
.
-
Run All Tests:
pytest tests/
-
Add New Test Cases: If your feature or bug fix requires new tests, create them to ensure comprehensive coverage.
-
Push Your Changes:
git push origin <branch-name>
-
Create the Pull Request: Head over to Kasa’s GitHub repository and create a pull request. Make sure to:
- Use a clear and descriptive title.
- Write a brief summary of the changes.
- Tag project maintainers or relevant team members for review.
-
Address Feedback: Respond to feedback from reviewers and make any requested changes.
-
Merging: Once approved, your pull request will be merged. Remember, never push directly to the main branch.
Here's an overview of important directories and files:
kasa/
: Main library code.examples/
: Ready-to-run examples to showcase various features.notebooks/
: Jupyter notebooks for prototyping and proofs of concept.tests/
: Contains unit tests to ensure code stability.setup.py
: Lists package dependencies and metadata.HISTORY.md
: Contains version updates and planned features.CONTRIBUTION.md
: This contribution guide.
- Documentation and Code Reference: For deeper understanding, refer to
README.md
and inline comments. - Community and Support: For questions or help, reach out to the Ghana NLP team or open a discussion in the Issues tab.
We’re grateful for your time and effort in helping Kasa grow.
Every contribution, big or small, helps us improve!