Skip to content

Contributing to Neonize

Thank you for your interest in contributing to Neonize! This guide will help you get started.

Code of Conduct

By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.

How to Contribute

Reporting Bugs

  1. Check if the bug is already reported in Issues
  2. If not, create a new issue with:
  3. Clear title and description
  4. Steps to reproduce
  5. Expected vs actual behavior
  6. Environment details (OS, Python version, Neonize version)
  7. Code samples if applicable

Suggesting Features

  1. Check Discussions for similar ideas
  2. Create a new discussion explaining:
  3. The problem you're trying to solve
  4. Your proposed solution
  5. Why this would be useful

Contributing Code

1. Fork and Clone

Bash
1
2
3
# Fork on GitHub, then:
git clone https://github.com/YOUR_USERNAME/neonize.git
cd neonize

2. Create a Branch

Bash
git checkout -b feature/your-feature-name

Branch naming: - feature/ - New features - fix/ - Bug fixes - docs/ - Documentation updates - refactor/ - Code refactoring

3. Make Changes

  • Write clean, readable code
  • Follow existing code style
  • Add tests for new features
  • Update documentation

4. Test Your Changes

Bash
1
2
3
4
5
6
7
8
9
# Run tests
pytest

# Check code style
ruff check .
ruff format .

# Type checking
mypy neonize

5. Commit

Write clear commit messages:

Bash
1
2
3
git commit -m "feat: add support for new feature"
git commit -m "fix: resolve issue with message handling"
git commit -m "docs: update installation guide"

Commit message format: - feat: - New feature - fix: - Bug fix - docs: - Documentation - refactor: - Code refactoring - test: - Adding tests - chore: - Maintenance

6. Push and Create PR

Bash
git push origin feature/your-feature-name

Then create a Pull Request on GitHub with: - Clear description of changes - Link to related issues - Screenshots if applicable

Development Guidelines

Code Style

We use: - Ruff for linting and formatting - Type hints for all functions - Docstrings in Sphinx style

Example:

Python
def send_message(
    self,
    to: JID,
    message: str,
    link_preview: bool = False
) -> SendResponse:
    """Send a text message to the specified JID.

    :param to: The recipient's JID
    :type to: JID
    :param message: The message text to send
    :type message: str
    :param link_preview: Enable link previews, defaults to False
    :type link_preview: bool, optional
    :return: Response from the server
    :rtype: SendResponse
    """
    # Implementation

Testing

  • Write tests for new features
  • Ensure existing tests pass
  • Aim for good code coverage

Documentation

  • Update docstrings
  • Update relevant markdown files
  • Add examples for new features

Project Structure

Text Only
neonize/
├── neonize/           # Main package
│   ├── client.py      # Sync client
│   ├── events.py      # Event system
│   ├── aioze/         # Async client
│   └── utils/         # Utilities
├── goneonize/         # Go bindings
├── examples/          # Example scripts
├── docs/              # Documentation
├── tests/             # Test files
└── tools/             # Build tools

Communication

License

By contributing, you agree that your contributions will be licensed under the Apache License 2.0.

Recognition

Contributors will be recognized in: - README.md - Release notes - Contributors page

Questions?

Feel free to ask questions in Discussions or open an issue.

Thank you for contributing to Neonize! 🎉