Contributing to BrowserJQuery
Thank you for your interest in contributing to BrowserJQuery! This document provides guidelines and instructions for contributing.
Development Setup
Fork the repository
Clone your fork:
git clone https://github.com/yourusername/browserjquery.git
cd browserjquery
Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install development dependencies:
pip install -r requirements/dev.txt
Install the package in development mode:
pip install -e .
Code Style
We follow PEP 8 style guidelines. The project uses several tools to maintain code quality:
flake8 for linting
black for code formatting
isort for import sorting
mypy for type checking
Run the quality checks:
make lint
make format
make type-check
Testing
We use pytest for testing. Run the tests with:
pytest
For test coverage:
pytest --cov=browserjquery
Pull Request Process
Create a new branch for your feature/fix:
git checkout -b feature/your-feature-name
Make your changes and commit them:
git add .
git commit -m "Description of changes"
Push to your fork:
git push origin feature/your-feature-name
Create a Pull Request from your fork to the main repository
Commit Message Guidelines
Follow these guidelines for commit messages:
Use the present tense (“Add feature” not “Added feature”)
Use the imperative mood (“Move cursor to…” not “Moves cursor to…”)
Limit the first line to 72 characters or less
Reference issues and pull requests liberally after the first line
Example:
Add support for custom jQuery selectors
- Implement custom selector parser
- Add tests for new functionality
- Update documentation
Fixes #123
Documentation
When adding new features or changing existing ones:
Update docstrings in the code
Update the API documentation in
docs/source/browserjquery.mdAdd examples in
docs/source/examples.mdif applicableUpdate the README.md if necessary
Release Process
Update version in
pyproject.tomlUpdate CHANGELOG.md
Create a new release on GitHub
The CI/CD pipeline will automatically publish to PyPI
Getting Help
Open an issue for bugs or feature requests
Join our community chat (if available)
Check existing issues and pull requests
Code of Conduct
Please be respectful and considerate of others when contributing. We aim to foster an inclusive and welcoming community.