-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create contribution.md #42
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# 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) | ||
- [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 | ||
|
||
|
||
## 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_<feature>.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. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should have a step here for running linting |
||
## Submitting a Pull Request | ||
|
||
1. **Push Your Changes:** | ||
```bash | ||
git push origin <branch-name> | ||
``` | ||
|
||
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! |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit should be covered by the pyproject.toml and automatically install dev-dependencies. Correct? @Lagyamfi .
I think linting and formatting should be mandatory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should a way to install dev-dependencies using poetry @PhidLarkson
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright I would be adding black and ruff too