Thank you for your interest in contributing to PyMidscene! This document provides guidelines and instructions for contributing.
Please be respectful and constructive in all interactions. We welcome contributors of all experience levels.
- Check if the bug has already been reported in Issues
- If not, create a new issue with:
- A clear, descriptive title
- Steps to reproduce the bug
- Expected vs actual behavior
- Your environment (Python version, OS, model used)
- Check existing issues for similar suggestions
- Create a new issue with the "enhancement" label
- Describe the feature and its use case
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run tests:
pytest - Format code:
black pymidscene tests - Commit with clear messages
- Push and create a Pull Request
# Clone your fork
git clone https://github.com/YOUR_USERNAME/pymidscene.git
cd pymidscene
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# or: venv\Scripts\activate # Windows
# Install dependencies
pip install -e ".[dev]"
# Install Playwright browsers
playwright install chromium- Follow PEP 8 guidelines
- Use type hints for all functions
- Write docstrings for public APIs
- Keep functions focused and small
# Run all tests
pytest
# Run with coverage
pytest --cov=pymidscene
# Run specific test
pytest tests/test_agent.pyUse clear, descriptive commit messages:
feat: add support for new modelfix: correct XPath extraction for nested elementsdocs: update README with examplestest: add tests for cache system
Feel free to open an issue or reach out to the maintainers.
Thank you for contributing!