Welcome Contributors!
Thank you for considering contributing to Zvec! Whether you’re fixing a bug, adding a feature, improving documentation, or helping others, your contribution helps make Zvec better for everyone.By participating, you agree to abide by our Code of Conduct. Please be respectful, collaborative, and inclusive.
Ways to Contribute
Report Bugs
Found an issue? Report it on GitHub Issues
Suggest Features
Have an idea? Share it in Discussions
Fix Bugs
Browse open issues labeled
good first issueImprove Docs
Documentation improvements are always welcome!
Development Setup
Follow these steps to set up your development environment.Prerequisites
Ensure you have:- Python 3.10 - 3.12
- CMake ≥ 3.26, < 4.0
- C++17-compatible compiler:
- Linux:
g++-11or later - macOS: Xcode Command Line Tools (Apple Clang)
- Linux:
Clone the Repository
Clone with submodules:Install Pre-commit Hooks
Set up pre-commit hooks to automatically check code quality:Build and Install (Editable Mode)
Install Zvec in editable mode with development dependencies:- Installs Zvec in development mode
- Compiles the C++ extension in-place
- Installs dev dependencies (pytest, ruff, etc.)
Verify Installation
Testing
Run All Tests
Run the full test suite:Run Specific Tests
Run with Coverage
Generate a coverage report:Aim for at least 80% code coverage when adding new features.
C++ Tests
If you’re working on C++ code, build and run C++ tests:Code Style and Linting
Python Code Style
Zvec uses Ruff for linting and formatting. Check for issues:C++ Code Style
For C++ contributions:- Follow existing code style in the repository
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions focused and modular
Build Customization
Control the build process with environment variables:| Option | How to Set | Description |
|---|---|---|
| Build Type | CMAKE_BUILD_TYPE=Debug | Debug, Release, or Coverage |
| Generator | CMAKE_GENERATOR="Unix Makefiles" | Default: Ninja; use Make if preferred |
| AVX-512 | ENABLE_SKYLAKE_AVX512=ON | Enable AVX-512 optimizations (x86_64 only) |
Coverage Build
For C++ code coverage with gcov/lcov:Submitting Changes
Follow these steps to submit your contribution:1. Create a Feature Branch
Branch frommain using a descriptive name:
feat/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Test additions/improvements
2. Make Your Changes
- Write clear, focused code
- Add tests for new functionality
- Update documentation as needed
- Follow existing code style
3. Write Clear Commit Messages
Use descriptive commit messages:type(scope): description
Types: feat, fix, docs, refactor, test, chore
4. Run Tests and Linters
Before pushing:5. Push Your Branch
6. Open a Pull Request
Go to GitHub and open a Pull Request:- Click “Compare & pull request”
- Write a descriptive title and description
- Link related issues (e.g., “Closes #123”)
- Request review from maintainers
- Tests pass locally
- Code follows style guidelines
- Documentation updated (if needed)
- Commit messages are clear
- PR description explains changes
Pull Request Guidelines
What to Include
Your PR should include: ✅ Test coverage for new behavior✅ Documentation updates (if adding features)
✅ Clear reasoning for non-obvious design choices
✅ Reference to related issues
PR Review Process
- Automated checks run (CI, linting, tests)
- Maintainers review your code
- Feedback and iteration - address review comments
- Approval - maintainer approves PR
- Merge - your contribution is merged!
Documentation
User Guides
Documentation is built with Mintlify:- Location:
docs/directory - Format: MDX (Markdown + JSX)
- Configuration:
docs.json
API Reference
API docs are generated from docstrings. Follow Google style:Community Guidelines
Getting Help
If you need help while contributing:- GitHub Discussions - Ask questions
- Discord - Real-time chat
- Existing Issues - Browse for similar problems
Reporting Security Issues
For security vulnerabilities, do not open a public issue. Instead:- Email:
[email protected] - Provide detailed description and steps to reproduce
- Allow time for maintainers to respond
Recognition
Contributors are recognized:- Listed in GitHub contributors
- Mentioned in release notes (for significant contributions)
- Eligible for Zvec swag (for major contributions)
Good First Issues
New to Zvec? Look for issues labeled:good first issue- Beginner-friendlyhelp wanted- Community contributions welcomedocumentation- Docs improvements
Code Review Best Practices
For Contributors
- Keep PRs focused and small (easier to review)
- Respond to feedback promptly and respectfully
- Ask questions if feedback is unclear
- Mark conversations as resolved after addressing
For Reviewers
- Be constructive and respectful in feedback
- Focus on code quality, not personal preferences
- Explain why changes are suggested
- Approve when satisfied with changes
Resources
GitHub Repository
Browse source code and issues
Contributing Guide
Full contributing guide on GitHub
Code of Conduct
Community guidelines
Discord Community
Join the conversation
Thank You!
Your contributions make Zvec better for everyone. Whether it’s a bug fix, a new feature, or improved documentation, we appreciate your effort and time.✨ Thanks again for being part of Zvec! ✨