> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/RedHatQE/openshift-python-wrapper/llms.txt
> Use this file to discover all available pages before exploring further.

# Contributing Overview

> Guide to contributing to OpenShift Python Wrapper

Thank you for your interest in contributing to OpenShift Python Wrapper! This guide will help you get started with contributing code, documentation, and other improvements to the project.

## Project Maintainers

See the [OWNERS file](https://github.com/RedHatQE/openshift-python-wrapper/blob/main/OWNERS) for the current list of project maintainers.

## Getting Started

Before contributing, familiarize yourself with the project:

1. Read the [README](https://github.com/RedHatQE/openshift-python-wrapper/blob/main/README.md) for an overview
2. Review existing [issues](https://github.com/RedHatQE/openshift-python-wrapper/issues)
3. Check the [pull requests](https://github.com/RedHatQE/openshift-python-wrapper/pulls) to see ongoing work

## Development Setup

### Prerequisites

* Python 3.9 or higher
* [uv](https://github.com/astral-sh/uv) package manager
* Git

### Clone and Install

Clone the repository and install dependencies:

```bash theme={null}
git clone https://github.com/RedHatQE/openshift-python-wrapper.git
cd openshift-python-wrapper
uv sync
```

### Pre-commit Setup

Before submitting any pull request, install `prek` for code quality checks:

```bash theme={null}
prek install
```

This sets up pre-commit hooks that run:

* **Ruff**: Code formatting and linting
* **Flake8**: Style checking
* **mypy**: Type checking
* **detect-secrets**: Security scanning
* **gitleaks**: Secret detection
* Various other checks (trailing whitespace, merge conflicts, etc.)

The hooks will automatically run when you commit changes.

## Code Quality Standards

### Type Hints

All new code must include type hints. Type checking is enforced using [mypy](https://mypy-lang.org/).

```python theme={null}
def create_pod(name: str, namespace: str) -> Pod:
    return Pod(name=name, namespace=namespace)
```

### Code Style

The project uses:

* **Line length**: 120 characters
* **Formatter**: Ruff
* **Linter**: Ruff + Flake8

Your code will be automatically formatted by pre-commit hooks.

## Issues

### Creating Issues

If you find a bug or have a feature request:

1. [Search existing issues](https://github.com/RedHatQE/openshift-python-wrapper/issues) first
2. If none exist, [create a new issue](https://github.com/RedHatQE/openshift-python-wrapper/issues/new/choose)
3. Use the appropriate issue template
4. Provide clear description and reproduction steps

### Pull Requests Auto-create Issues

If you open a pull request to fix a problem, an issue will be automatically created.

## Pull Requests

### Fork and Branch Workflow

1. **Fork the repository** to your GitHub account
2. **Clone your fork** locally
3. **Create a branch** for your changes:
   ```bash theme={null}
   git checkout -b feature/your-feature-name
   ```
4. **Make your changes** and commit them
5. **Push to your fork**:
   ```bash theme={null}
   git push origin feature/your-feature-name
   ```
6. **Open a pull request** from your fork to the main repository

### Pull Request Guidelines

* Fill out all required fields in the PR template
* Keep the title descriptive and concise
* Reference related issues using `#issue-number`
* Ensure all pre-commit checks pass
* Add tests for new functionality
* Update documentation as needed

### PR Dependencies

The project uses [dpulls](https://www.dpulls.com/) for PR dependencies. To make your PR depend on another:

Add this to your PR description:

```
depends on #123
```

### Cherry-picking to Release Branches

If a fix is needed in a released version:

1. Wait for your PR to be merged to main
2. Add a comment to the PR:
   ```
   /cherry-pick v4.11
   ```
3. This will create a new PR targeting the specified branch

## Code Review Process

1. Maintainers will review your PR
2. Address any feedback or requested changes
3. Once approved, maintainers will merge your PR
4. Your changes will be included in the next release

## What to Contribute

* **Bug fixes**: Fix issues in existing code
* **New resources**: Add support for new Kubernetes/OpenShift resources
* **Features**: Enhance existing functionality
* **Tests**: Improve test coverage
* **Documentation**: Improve or add documentation
* **Examples**: Add usage examples

## Next Steps

<CardGroup cols={2}>
  <Card title="Adding Resources" icon="plus" href="/contributing/adding-resources">
    Learn how to add new Kubernetes/OpenShift resources
  </Card>

  <Card title="Testing" icon="flask" href="/contributing/testing">
    Understand the testing framework and add tests
  </Card>

  <Card title="Releasing" icon="rocket" href="/contributing/releasing">
    Learn about the release process
  </Card>
</CardGroup>
