Contributing - awiones/RemotelyPy GitHub Wiki

Contributing to RemotelyPy

Development Setup

  1. Fork and clone the repository:

    git clone https://github.com/yourusername/RemotelyPy.git
    cd RemotelyPy
    
  2. Set up development environment:

    python -m venv venv
    source venv/bin/activate  # Linux/Mac
    # or
    .\venv\Scripts\activate  # Windows
    pip install -r requirements-dev.txt
    
  3. Create a branch:

    git checkout -b feature/your-feature-name
    

Coding Standards

Python Style Guide

  • Follow PEP 8 style guide
  • Use type hints for all functions
  • Maximum line length: 88 characters (Black formatter)
  • Use docstrings for all public methods

Example:

def process_command(
    self,
    command: str,
    timeout: Optional[int] = None
) -> Dict[str, Any]:
    """
    Process a shell command with optional timeout.

    Args:
        command: Shell command to execute
        timeout: Command timeout in seconds

    Returns:
        Dictionary containing command results
    """

Project Structure

RemotelyPy/
├── assets/               # Core implementation
│   ├── controller.py     # Controller implementation
│   ├── client.py        # Client implementation
│   └── utilities.py     # Shared utilities
├── tests/               # Test suite
├── docs/                # Documentation
└── examples/            # Example scripts

Testing

  1. Run test suite:

    pytest tests/
    
  2. Run with coverage:

    pytest --cov=assets tests/
    
  3. Type checking:

    mypy assets/
    

Pull Request Process

  1. Ensure your code:

    • Passes all tests
    • Has complete documentation
    • Includes new tests for new features
    • Has type hints
    • Is formatted with Black
  2. Update documentation:

    • Add/update docstrings
    • Update relevant wiki pages
    • Add example code if needed
  3. Commit messages:

    feat: add new feature X
    ^--^  ^---------------^
    |     |
    |     +-> Description in present tense
    |
    +-------> Type: feat, fix, docs, style, refactor, test, chore
    
  4. PR description should include:

    • Purpose of changes
    • Related issue numbers
    • Testing performed
    • Breaking changes (if any)

Development Workflow

  1. Create issue or feature request
  2. Fork repository
  3. Create feature branch
  4. Make changes
  5. Run tests
  6. Submit PR
  7. Respond to review comments

Code Review Guidelines

Reviewer Checklist

  • Code follows style guide
  • Tests are included and passing
  • Documentation is updated
  • Commit messages are clear
  • No security issues
  • Performance impact considered

Author Checklist

  • Self-review completed
  • Tests added/updated
  • Documentation updated
  • Example code provided (if needed)
  • Breaking changes documented

Release Process

  1. Version bump:

    # Update version in assets/utilities.py
    __version__ = "X.Y.Z"
    
  2. Update changelog:

    ## [X.Y.Z] - YYYY-MM-DD
    
    ### Added
    
    - New feature X
    
    ### Changed
    
    - Modified behavior Y
    
    ### Fixed
    
    - Bug fix Z
    
  3. Create release PR

  4. Merge and tag release

  5. Create GitHub release

Getting Help

  • Open an issue for bugs
  • Use discussions for questions
  • Join our community chat
  • Read the documentation

Community Guidelines

  • Be respectful and inclusive
  • Follow the code of conduct
  • Help others learn
  • Give constructive feedback
  • Credit others' work