Skip to content

Latest commit

 

History

History
86 lines (68 loc) · 2.56 KB

CONTRIBUTING.md

File metadata and controls

86 lines (68 loc) · 2.56 KB

Contributing

Welcome, and thank you for your interest in contributing to our project! Below, you'll find step-by-step instructions to prepare your development environment and guide you through submitting your contributions effectively.

Development Setup

Prerequisites

Before starting, please make sure you have the following installed:

Setting Up Your Development Environment

  1. Install pre-commit: This tool ensures your contributions meet our code quality standards.

    pip install pre-commit
    pre-commit install
    
  2. Install Project Dependencies: Navigate to the project directory and run:

    make deps
  3. Run Tests: Ensure your changes don't break anything:

    make test
  4. Check Code Style (Linting): To ensure your code complies with our style guide:

    make lint
  5. Format Code: Automatically format your code to match our project's coding standards:

    make format
  6. Build the Project

    make build

Additional Steps

  • Regenerate Protobuf Code: If you modify workload.proto, regenerate the Python code:
    make compile-proto
    Then, amend workload_pb2_grpc.py by adjusting the import line:
    from . import workload_pb2 as workload__pb2

How to Contribute

  1. Fork the repository: Start by forking the repository to your GitHub account.
  2. Clone your fork: Clone the repository to your local machine.
    git clone [email protected]:<your_github_account>/py-spiffe.git
    
  3. Create a feature branch: Make changes in a new branch.
    git checkout -b feature/fooBar
    
  4. Make your changes: Add your contribution.
  5. Commit your changes: Use clear, concise commit messages.
    git commit -am 'Add some fooBar' --signoff
    
  6. Push to your fork: Upload your branch to GitHub.
    git push origin feature/fooBar
    
  7. Open a pull request: Submit your changes for review by opening a pull request to the upstream main branch.

Conventions

  • We follow the Google Python Style Guide (guide link).
  • Docstrings are crucial for modules, classes, and functions. Include PEP 484 type annotations in function signatures rather than in docstrings.