|
| 1 | +# Contributing to Fractal |
| 2 | + |
| 3 | +Thank you for considering contributing to **Fractal**! Contributions are what make the open-source community a wonderful place to learn, inspire, and create. Whether it's fixing a bug, implementing a new feature, improving documentation, or suggesting an enhancement, your help is highly appreciated. |
| 4 | + |
| 5 | +## Table of Contents |
| 6 | + |
| 7 | +1. [Code of Conduct](#code-of-conduct) |
| 8 | +2. [Getting Started](#getting-started) |
| 9 | +3. [How to Contribute](#how-to-contribute) |
| 10 | + - [Bug Reports](#bug-reports) |
| 11 | + - [Feature Requests](#feature-requests) |
| 12 | + - [Code Contributions](#code-contributions) |
| 13 | +4. [Development Guidelines](#development-guidelines) |
| 14 | +5. [Pull Request Process](#pull-request-process) |
| 15 | +6. [Contact](#contact) |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +## Code of Conduct |
| 20 | + |
| 21 | +This project adheres to the [Contributor Covenant Code of Conduct ](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html). By participating, you are expected to uphold this code. Please report unacceptable behavior to `[email protected]`. |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +## Getting Started |
| 26 | + |
| 27 | +To start contributing: |
| 28 | +1. Fork the repository. |
| 29 | +2. Clone your forked repository locally: |
| 30 | + ```bash |
| 31 | + git clone https://github.com/SkySingh04/fractal.git |
| 32 | + ``` |
| 33 | +3. Set up the project by installing dependencies: |
| 34 | + ```bash |
| 35 | + cd fractal |
| 36 | + go mod tidy |
| 37 | + ``` |
| 38 | +4. Create a new branch for your work: |
| 39 | + ```bash |
| 40 | + git checkout -b feature/<feature-name> |
| 41 | + ``` |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +## How to Contribute |
| 46 | + |
| 47 | +### Bug Reports |
| 48 | +If you find a bug: |
| 49 | +- **Check existing issues** to ensure it hasn't already been reported. |
| 50 | +- Submit a detailed issue, including: |
| 51 | + - Steps to reproduce the bug. |
| 52 | + - Expected vs. actual behavior. |
| 53 | + - Environment details (OS, Go version, etc.). |
| 54 | + |
| 55 | +### Feature Requests |
| 56 | +If you have an idea for a new feature: |
| 57 | +- **Open a feature request** on the [Issues page](https://github.com/SkySingh04/fractal/issues). |
| 58 | +- Clearly describe: |
| 59 | + - The problem the feature solves. |
| 60 | + - The proposed solution. |
| 61 | + |
| 62 | +### Code Contributions |
| 63 | +1. Find an issue labeled `help wanted` or `good first issue` to start. |
| 64 | +2. Comment on the issue to let maintainers know you are working on it. |
| 65 | +3. Follow the development guidelines below to implement the changes. |
| 66 | + |
| 67 | +--- |
| 68 | + |
| 69 | +## Development Guidelines |
| 70 | + |
| 71 | +### Code Style |
| 72 | +- Follow the Go community’s [style guide](https://golang.org/doc/effective_go). |
| 73 | +- Use `go fmt` to format your code. |
| 74 | + |
| 75 | +### Project Structure |
| 76 | +The project uses a modular structure: |
| 77 | +- **`cmd/`**: Main entry points for CLI and server modes. |
| 78 | +- **`integrations/`**: Data source and destination integrations. |
| 79 | +- **`internal/`**: Core functionalities like transformations, validations, etc. |
| 80 | +- **`pkg/`**: Shared utilities and libraries. |
| 81 | +- **`config/`**: YAML-based configuration handling. |
| 82 | + |
| 83 | +### Running Tests |
| 84 | +Run the test suite before submitting a pull request: |
| 85 | +```bash |
| 86 | +go test ./... |
| 87 | +``` |
| 88 | + |
| 89 | +If adding new functionality, include unit tests to verify your changes. |
| 90 | + |
| 91 | +### Adding Integrations |
| 92 | +To add a new integration (input/output): |
| 93 | +1. Follow the [Integration Guide](#integration-guide) in the main documentation. |
| 94 | +2. Add test cases in the `integrations` directory. |
| 95 | + |
| 96 | +--- |
| 97 | + |
| 98 | +## Pull Request Process |
| 99 | + |
| 100 | +1. **Sync your fork**: Ensure your fork is up-to-date with the main repository: |
| 101 | + ```bash |
| 102 | + git fetch upstream |
| 103 | + git merge upstream/main |
| 104 | + ``` |
| 105 | +2. **Commit changes**: Follow commit message conventions: |
| 106 | + - Use clear and descriptive messages (e.g., `fix: resolve data validation issue`). |
| 107 | + - Use multiple commits for distinct changes. |
| 108 | + ```bash |
| 109 | + git add . |
| 110 | + git commit -m "feat: add RabbitMQ integration" |
| 111 | + ``` |
| 112 | +3. **Push changes**: |
| 113 | + ```bash |
| 114 | + git push origin feature/<feature-name> |
| 115 | + ``` |
| 116 | +4. **Create a pull request**: |
| 117 | + - Go to the main repository. |
| 118 | + - Navigate to the **Pull Requests** tab and click "New Pull Request." |
| 119 | + - Select your branch and explain your changes in detail. |
| 120 | + |
| 121 | +5. **Respond to Feedback**: |
| 122 | + - Be prepared to revise your code based on maintainers' feedback. |
| 123 | + |
| 124 | +--- |
| 125 | + |
| 126 | +## Contact |
| 127 | + |
| 128 | +For any questions, feel free to reach out: |
| 129 | +- Open an issue for general queries or bug reports. |
| 130 | + |
| 131 | +Thank you for contributing to **Fractal**! Together, we can build a powerful and flexible data processing tool. 🎉 |
| 132 | +--- |
| 133 | + |
0 commit comments