Thank you for your interest in contributing to BharatMLStack! This document provides guidelines and instructions for contributing to the project. By participating in this project, you agree to abide by our Code of Conduct and the terms of our Business Source License.
- Contributing to BharatMLStack
The best way to connect with the BharatMLStack community is through our Discord server. Here, you can:
- Ask questions about usage or development
- Discuss feature ideas and roadmap items
- Coordinate with other contributors
- Get help with setting up your development environment
- Connect with the core team
We encourage all contributors to join our Discord community to stay updated on project developments.
We welcome various types of contributions:
- New features implementation
- Bug fixes
- Performance optimizations
- Code refactoring
- Test coverage improvements
- Documentation improvements
- Design proposals
- Use case writeups
- Bug reports
- Feature requests
- Answering questions in issues or Discord
-
Fork the Repository
- Visit the BharatMLStack GitHub repository
- Click the "Fork" button to create your own copy of the repository
-
Clone Your Fork
git clone https://github.com/Meesho/BharatMLStack.git cd BharatMLStack -
Add the Upstream Remote
git remote add upstream https://github.com/Meesho/BharatMLStack.git
-
Install Dependencies
- Ensure you have Go 1.22+ installed
- Follow the setup instructions in the Quick Start Guide
-
Run the Local Environment
cd <service>/quick-start ./start.sh
-
Create a Feature Branch
git checkout -b feature/<service>-your-feature-name
-
Make Your Changes
- Implement your feature or fix
- Write or update tests
- Update documentation as needed
-
Run Tests Locally
go test ./... -
Commit Your Changes
git add . git commit -m "feat: brief description of your changes"
Please follow the Conventional Commits format:
feat:for new featuresfix:for bug fixesdocs:for documentation changestest:for changes to testsrefactor:for refactoring code without changing functionalityperf:for performance improvementschore:for changes to the build process or auxiliary tools
-
Keep Your Branch Updated
git fetch upstream git rebase upstream/main
-
Push Your Changes
git push origin feat/<service>-your-feature-name
-
One Issue, One PR - Keep your pull requests focused on addressing a single concern.
-
Discuss Large Changes - For significant features or changes, please discuss them in an issue or on Discord first.
-
Be Respectful - Practice respectful communication in issues, pull requests, and community spaces.
-
Provide Context - When submitting issues or pull requests, provide as much context as possible.
-
Check Existing Issues - Before creating a new issue, search for related issues to avoid duplicates.
-
Issue Templates - Use the provided issue templates when available.
-
Clear Problem Statement - Clearly describe the issue, including steps to reproduce for bugs.
-
Describe the Need - Explain the use case and why it's valuable to the project.
-
Propose Solutions - If you have ideas on how to implement the feature, include them.
Golang services follows these code style guidelines:
-
Go Code
- Follow the Go Code Review Comments
- Use
gofmtto format your code - Ensure code passes
golintandgo vet
-
Documentation
- Write clear comments for public APIs
- Update documentation when changing functionality
-
Git Commits
- Write clear, meaningful commit messages
- Follow Conventional Commits format
-
Tests
- Write tests for all new features and bug fixes
- Maintain or improve test coverage
All contributions should maintain or improve test coverage:
-
Unit Tests - All new code should have corresponding unit tests.
-
Integration Tests - New features should include integration tests where appropriate.
-
Benchmark Tests - Performance-critical code should include benchmarks.
-
Test Coverage - Aim to maintain or improve overall test coverage percentage.
Documentation is crucial for BharatMLStack's usability:
-
Code Documentation
- Document all exported functions, types, and constants
- Include examples where helpful
-
User Documentation
- Update README.md and docs/ when adding features
- Consider adding examples or tutorials for non-trivial features
-
Architecture Documentation
- For significant changes, update architecture documentation
-
Create a Pull Request
- Go to your fork on GitHub and create a new pull request
- Use our pull request template when available
-
PR Description
- Clearly describe what your PR does
- Link to related issues using GitHub keywords (e.g., "Fixes #123")
- Include any necessary background information
-
PR Checklist
- Ensure your code follows our style guidelines
- Verify all tests pass
- Update documentation as needed
- Add your changes to the CHANGELOG.md if applicable
-
Code Review
- At least one core team member will review your PR
- Address reviewer feedback promptly
- Be open to suggestions and changes
-
Continuous Integration
- All PRs must pass CI checks
- Fix any CI failures before requesting re-review
-
Merge Process
- Once approved, a maintainer will merge your PR
- Some PRs may require multiple reviews or approvals
We value all contributions to BharatMLStack! Contributors will be recognized in the following ways:
- Listed in GitHub contributors
- Mentioned in release notes for significant contributions
- Recognized in the community Discord
By contributing to BharatMLStack, you agree that your contributions will be licensed under the project's Business Source License 1.1. This license allows for open source development while providing some commercial protections for the project. Key points to understand:
- All contributions become part of the licensed work
- The license will automatically convert to Apache License 2.0 after the change date (3 years from publication)
- The license includes restrictions on using BharatMLStack as a competing service
Please review the full license before contributing to understand how your work may be used.
Thank you for contributing to BharatMLStack! Your efforts help make this project better for everyone.
Join our Discord community for discussions, questions, and collaborative development.