Contributing
We welcome contributions to the Robot Framework PGP library! This document provides guidelines for contributing to the project.
Getting Started
Fork the Repository
Fork the repository on GitHub and clone your fork:
git clone https://github.com/yourusername/robotframework-pgp.git cd robotframework-pgp
Set Up Development Environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements-dev.txt pip install -e .
Install Pre-commit Hooks
pre-commit install
Development Workflow
Create a Branch
git checkout -b feature/your-feature-name
Make Changes
Write your code following the project’s coding standards
Add or update tests for your changes
Update documentation if necessary
Run Tests
# Run unit tests pytest # Run Robot Framework tests robot tests/acceptance/ # Run with coverage pytest --cov=RobotFrameworkPGP
Code Quality Checks
# Format code black src/ tests/ # Lint code flake8 src/ tests/ # Type checking mypy src/
Commit and Push
git add . git commit -m "Add feature: description of your changes" git push origin feature/your-feature-name
Create Pull Request
Create a pull request on GitHub with a clear description of your changes.
Coding Standards
Python Code Style
Follow PEP 8 style guide
Use Black for code formatting
Maximum line length: 88 characters
Use type hints for function parameters and return values
Robot Framework Code Style
Use 4 spaces for indentation
Use clear, descriptive test and keyword names
Follow Robot Framework best practices
Documentation
Use Google-style docstrings for Python functions
Update RST documentation for new features
Include examples in docstrings
Testing Guidelines
Unit Tests
Write comprehensive unit tests for all new functionality
Use pytest fixtures for setup and teardown
Aim for high test coverage (>90%)
Test both success and failure scenarios
Integration Tests
Create Robot Framework test cases for new keywords
Test realistic usage scenarios
Verify error handling and edge cases
Test Structure
tests/
├── __init__.py
├── conftest.py # Pytest configuration
├── test_pgp_library.py # Unit tests
└── acceptance/ # Robot Framework tests
├── basic_encryption.robot
├── file_encryption.robot
└── advanced_features.robot
Documentation
Updating Documentation
When adding new features:
Update keyword documentation in the source code
Add examples to the appropriate documentation files
Update the API reference if needed
Test documentation builds locally:
cd docs make html
Documentation Structure
docs/
├── conf.py # Sphinx configuration
├── index.rst # Main documentation page
├── installation.rst # Installation guide
├── quickstart.rst # Quick start guide
├── examples.rst # Usage examples
├── keywords.rst # Keyword reference
├── api.rst # API documentation
└── contributing.rst # This file
Reporting Issues
When reporting issues:
Use the GitHub issue tracker
Provide a clear description of the problem
Include steps to reproduce the issue
Specify your environment (OS, Python version, GPG version)
Include relevant logs or error messages
Feature Requests
For new features:
Check existing issues to avoid duplicates
Describe the use case and benefits
Propose an API design if applicable
Be open to discussion and feedback
Release Process
Version Numbering
We follow Semantic Versioning (SemVer):
MAJOR: Breaking changes
MINOR: New features (backward compatible)
PATCH: Bug fixes (backward compatible)
Release Steps
Update version in
pyproject.tomland__init__.pyUpdate
CHANGELOG.mdwith release notesCreate and push a version tag:
git tag v1.2.3 git push origin v1.2.3
GitHub Actions will automatically build and publish to PyPI
Code Review Guidelines
For Contributors
Keep pull requests focused and reasonably sized
Write clear commit messages
Respond to review feedback promptly
Update your branch with the latest main branch changes
For Reviewers
Be constructive and respectful in feedback
Check code quality, tests, and documentation
Verify that changes don’t break existing functionality
Consider the impact on users and backward compatibility
Community
Communication
GitHub Discussions for questions and general discussion
GitHub Issues for bug reports and feature requests
Follow the project’s code of conduct
Getting Help
If you need help with development:
Check existing documentation and examples
Search GitHub issues for similar problems
Ask questions in GitHub Discussions
Join the Robot Framework community forums
Thank you for contributing to Robot Framework PGP!