Thank you for your interest in contributing to robotframework-fasthttpmock! This document provides guidelines and steps for contributing.
- Python 3.8 or higher
- pip package manager
- Fork and clone the repository:
git clone https://github.com/your-username/robotframework-fasthttpmock.git
cd robotframework-fasthttpmock
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install development dependencies:
pip install -e ".[dev]"
We use invoke
to manage development tasks. Here are the available commands:
# Format code
invoke format
# Run linting checks
invoke lint
# Run unit tests
invoke utest
# Run acceptance tests
invoke atest
# Run all tests
invoke test
# Generate documentation
invoke docs
# Clean build artifacts
invoke clean
# Build package
invoke build
- We use
black
for code formatting - We use
ruff
for linting - Maximum line length is 100 characters
- Follow Python naming conventions:
snake_case
for functions and variablesPascalCase
for classesUPPERCASE
for constants
-
Write unit tests for new features:
- Put tests in
tests/
directory - Name test files with
test_
prefix - Use pytest fixtures when appropriate
- Put tests in
-
Write acceptance tests:
- Put tests in
atest/
directory - Follow Robot Framework best practices
- Include documentation for test cases
- Put tests in
-
Ensure all tests pass:
invoke test
-
Update docstrings for any modified code:
- Use Robot Framework documentation format
- Include examples where appropriate
- Document all arguments and return values
-
Generate and check documentation:
invoke docs
- Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes:
- Write tests
- Update documentation
- Follow code style guidelines
-
Run quality checks:
invoke format # Format code
invoke lint # Check code style
invoke test # Run all tests
-
Commit your changes:
- Use clear commit messages
- Reference any related issues
-
Push to your fork and create a Pull Request:
- Describe your changes
- Link any related issues
- Ensure CI checks pass
- Update version in
pyproject.toml
- Run release preparation:
invoke release
- Create a new GitHub release
- Publish to PyPI
- Check existing issues
- Create a new issue if needed
- Ask for help in the PR comments
By contributing, you agree that your contributions will be licensed under the MIT License.