Thank you for your interest in contributing to PynneX! This document provides guidelines and instructions for contributing to the project.
Please note that while we greatly appreciate and welcome contributions, this project does not provide financial compensation for contributions. Any donations or sponsorships received are used solely for project maintenance and improvement, and are not distributed to individual contributors.
By contributing to this project, you agree that:
- Your contributions are voluntary
- You are granting your contributions under the project's MIT License
- You are not entitled to financial compensation for your contributions
- You understand that any project donations/sponsorships are used for project maintenance only
- Fork and clone the repository:
git clone https://github.com/nexconnectio/pynnex.git
cd pynnex
- Create a virtual environment and install development dependencies:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e ".[dev]"
We follow these coding conventions:
- PEP 8 style guide
- Maximum line length of 88 characters (Black default)
- Type hints for function arguments and return values
- Docstrings for all public modules, functions, classes, and methods
Run the test suite before submitting changes:
# Run all tests
pytest
# Run with coverage
pytest --cov=pynnex
# Run specific test file
pytest tests/unit/test_emitter.py
# Enable debug logging during tests
PYNNEX_DEBUG=1 pytest
- Create a new branch for your feature or bugfix:
git checkout -b feature-name
- Make your changes and commit them:
git add .
git commit -m "Description of changes"
-
Ensure your changes include:
- Tests for any new functionality
- Documentation updates if needed
- No unnecessary debug prints or commented code
- Type hints for new functions/methods
-
Push your changes and create a pull request:
git push origin feature-name
- In your pull request description:
- Describe what the changes do
- Reference any related issues
- Note any breaking changes
- Include examples if applicable
- Start with tests
- Implement the feature
- Update documentation
- Add examples if applicable
Use appropriate log levels:
import logging
logger = logging.getLogger(__name__)
# Debug information
logger.debug("Detailed connection info")
# Important state changes
logger.info("Emitter connected successfully")
# Warning conditions
logger.warning("Multiple connections detected")
# Errors
logger.error("Failed to emit emitter", exc_info=True)
- Be respectful and inclusive
- Focus on constructive criticism
- Accept feedback gracefully
- Put the project's best interests first
Violations of the code of conduct may result in:
- Warning
- Temporary ban
- Permanent ban
Report issues to project maintainers via email.
By contributing, you agree that your contributions will be licensed under the same license as the project (MIT License).