From 13fd17f8d6fa8ffabe3e9cbdf36c8e1c36eb0ddd Mon Sep 17 00:00:00 2001 From: ~pkwolffe <116769499+PhidLarkson@users.noreply.github.com> Date: Sat, 19 Oct 2024 10:36:50 +0000 Subject: [PATCH 1/3] Create contribution.md --- contribution.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 contribution.md diff --git a/contribution.md b/contribution.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/contribution.md @@ -0,0 +1 @@ + From 01164b21b377a44b061e612ecfed1e40a0f67c84 Mon Sep 17 00:00:00 2001 From: ~pkwolffe <116769499+PhidLarkson@users.noreply.github.com> Date: Fri, 1 Nov 2024 21:11:24 +0000 Subject: [PATCH 2/3] Update contribution.md complete contribution markdown --- contribution.md | 130 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/contribution.md b/contribution.md index 8b13789..8aa96b5 100644 --- a/contribution.md +++ b/contribution.md @@ -1 +1,131 @@ +# Contributing to Kasa +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. + +## Table of Contents +- [Setting Up Your Development Environment](#setting-up-your-development-environment) +- [Development Workflow](#development-workflow) +- [Coding Standards and Best Practices](#coding-standards-and-best-practices) +- [Testing Your Code](#testing-your-code) +- [Submitting a Pull Request](#submitting-a-pull-request) +- [Understanding the Project Structure](#understanding-the-project-structure) +- [Useful Resources](#useful-resources) + +## Setting Up Your Development Environment +Make sure to create a virtual environment, then proceed. + +1. **Clone the Repository:** + Start by cloning the repository and switch to the kasa directory on your local machine: + ```bash + git clone https://github.com/GhanaNLP/kasa.git + cd kasa + ``` + +2. **Install Dependencies:** + Make sure Python 3.8 or higher is installed. Run: + ```bash + pip install . + ``` + +3. **Set Up Development Tools (Optional but Recommended):** + Use code linters and formatters like `black` and `flake8` for consistent code style: + ```bash + pip install black flake8 + ``` + + We like clean contributions + +## Development Workflow + +1. **Create a Branch:** + Create a branch for your work. Use a meaningful name that hints at the purpose (e.g., `feature-enhance-translation`): + ```bash + git checkout -b + ``` + +2. **Implement Your Changes:** + - Modify or add code with attention to detail and consistency. + - Include proper documentation and comments where needed. + - Add or update unit tests to cover your changes. + +3. **Run Tests Locally:** + Test thoroughly. Ensure your code doesn’t break existing functionality: + ```bash + pytest + ``` + +4. **Commit Your Work:** + Keep your commit messages descriptive and concise: + ```bash + git add . + git commit -m "Added new preprocessing method for improved efficiency" + ``` + +5. **Push to Your Branch:** + ```bash + git push origin + ``` + +## Coding Standards and Best Practices + +- **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 Your 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_.py`. + +1. **Run All Tests:** + ```bash + pytest tests/ + ``` + +2. **Add New Test Cases:** + If your feature or bug fix requires new tests, create them to ensure comprehensive coverage. + +## Submitting a Pull Request + +1. **Push Your Changes:** + ```bash + git push origin + ``` + +2. **Create the Pull Request:** + Head over to [Kasa’s GitHub repository](https://github.com/GhanaNLP/kasa) 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. + +3. **Address Feedback:** + Respond to feedback from reviewers and make any requested changes. + +4. **Merging**: + Once approved, your pull request will be merged. Remember, **never push directly to the main branch**. + +## Understanding the Project Structure + +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. + +## Useful Resources + +- **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](https://github.com/GhanaNLP) 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! From c5eb9bdb9534df72d32e8e3eb0e7edb5edcf3016 Mon Sep 17 00:00:00 2001 From: ~pkwolffe <116769499+PhidLarkson@users.noreply.github.com> Date: Sun, 24 Nov 2024 11:56:35 +0000 Subject: [PATCH 3/3] removed development workflow section --- contribution.md | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/contribution.md b/contribution.md index 8aa96b5..fd46c19 100644 --- a/contribution.md +++ b/contribution.md @@ -6,7 +6,6 @@ Below, you'll find a guide to help you contribute smoothly. ## Table of Contents - [Setting Up Your Development Environment](#setting-up-your-development-environment) -- [Development Workflow](#development-workflow) - [Coding Standards and Best Practices](#coding-standards-and-best-practices) - [Testing Your Code](#testing-your-code) - [Submitting a Pull Request](#submitting-a-pull-request) @@ -36,37 +35,7 @@ Make sure to create a virtual environment, then proceed. ``` We like clean contributions - -## Development Workflow - -1. **Create a Branch:** - Create a branch for your work. Use a meaningful name that hints at the purpose (e.g., `feature-enhance-translation`): - ```bash - git checkout -b - ``` - -2. **Implement Your Changes:** - - Modify or add code with attention to detail and consistency. - - Include proper documentation and comments where needed. - - Add or update unit tests to cover your changes. - -3. **Run Tests Locally:** - Test thoroughly. Ensure your code doesn’t break existing functionality: - ```bash - pytest - ``` - -4. **Commit Your Work:** - Keep your commit messages descriptive and concise: - ```bash - git add . - git commit -m "Added new preprocessing method for improved efficiency" - ``` - -5. **Push to Your Branch:** - ```bash - git push origin - ``` + ## Coding Standards and Best Practices