|
| 1 | +# How to Contribute to OpenQDA documentation |
| 2 | +Thank you for contributing to this documentation and |
| 3 | +helping us to make an impact in the realm of open qualitative data analysis. |
| 4 | + |
| 5 | +> Please read this guide to make it a valuable success! |
| 6 | +
|
| 7 | +<!-- START doctoc generated TOC please keep comment here to allow auto update --> |
| 8 | +<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> |
| 9 | +## Table of Contents |
| 10 | + |
| 11 | +- [Who is this guide for?](#who-is-this-guide-for) |
| 12 | +- [Why is this guide important?](#why-is-this-guide-important) |
| 13 | +- [How to prepare your contribution](#how-to-prepare-your-contribution) |
| 14 | + - [Create a new branch](#create-a-new-branch) |
| 15 | + - [Examples](#examples) |
| 16 | +- [Before committing your work](#before-committing-your-work) |
| 17 | + - [Code quality checks](#code-quality-checks) |
| 18 | + - [Conventions for programming](#conventions-for-programming) |
| 19 | + - [Tests](#tests) |
| 20 | +- [Committing your contribution](#committing-your-contribution) |
| 21 | +- [Pull request and review process](#pull-request-and-review-process) |
| 22 | + |
| 23 | +*generated with [DocToc](https://github.com/thlorenz/doctoc)* |
| 24 | +<!-- END doctoc generated TOC please keep comment here to allow auto update --> |
| 25 | + |
| 26 | + |
| 27 | +## Who is this guide for? |
| 28 | + |
| 29 | +This guide targets everyone who wants to contribute to the documentation, |
| 30 | +may it be fixing typos, improving language, |
| 31 | + |
| 32 | +Other types contributions (outside of this documentation) can be done here: |
| 33 | +- [develop OpenQDA](https://github.com/openqda/openqda)) |
| 34 | +- [report bugs and issues](https://github.com/openqda/openqda/issues) |
| 35 | +- [discuss new features, ideas or questions](https://github.com/orgs/openqda/discussions) |
| 36 | + |
| 37 | +## Why is this guide important? |
| 38 | + |
| 39 | +There are a few conventions and pattern, for which we will take |
| 40 | +a closer look at during our reviews. |
| 41 | +These conventions are fundamental to the quality of the code and |
| 42 | +the project's overall sustainability but also intend to prevent |
| 43 | +common issues that arise during contributions. |
| 44 | + |
| 45 | +> If in doubt: ask for help! We aim to support you in the |
| 46 | +> process, especially if you have less to no experience in |
| 47 | +> contributing to open source projects. |
| 48 | +
|
| 49 | +## How to prepare your contribution |
| 50 | + |
| 51 | +If you are not member of the organization then you need to fork the repository. |
| 52 | +The GitHub help explains this in much detail: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo |
| 53 | + |
| 54 | +Then you need to clone the repository locally |
| 55 | + |
| 56 | +### Create a new branch |
| 57 | + |
| 58 | +Make sure, your have [installed the dependencies](./README.md) and |
| 59 | +that it runs locally. |
| 60 | + |
| 61 | +You should always start your contribution using a new branch, coming from |
| 62 | +the latest state of the `main` branch: |
| 63 | + |
| 64 | +```shell |
| 65 | +$ get checkout main |
| 66 | +$ git pull --ff-only |
| 67 | +``` |
| 68 | + |
| 69 | +If the pull cannot "fast-forward", then you have remains of changes on your |
| 70 | +current branch. Please remove them and make sure your `main` branch is "clean". |
| 71 | + |
| 72 | +> Note: if you have forked the repository and your fork is much behind the main repository |
| 73 | +then you need to sync them: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork |
| 74 | + |
| 75 | +Finally, **checkout a new branch** and name it by the following **lowercase** pattern: |
| 76 | + |
| 77 | +``` |
| 78 | +<type>/<short-summary> |
| 79 | +``` |
| 80 | + |
| 81 | +where `<type>` is one of the following: |
| 82 | + |
| 83 | +| type | description | |
| 84 | +|-----------|-------------------------------------------------------------| |
| 85 | +| `feature` | Indicates that this branch represents a single new feature | |
| 86 | +| `fix` | Indicates that this branch contains a fix for a specific bug or issue | |
| 87 | +|`docs` | This branch is entirely about a specific documentation improvement. Note that feature and fixes may also contain documentation but a `docs` branch only improves documentation | |
| 88 | +|`ci` | this branch resolves around CI only | |
| 89 | +|`tests`| This branch is only about testing. While other code might be involved or tests might be part of features and fixes, these type of branches mainly focus on testing | |
| 90 | + |
| 91 | +and where `short-summary` is a descriptive and understandable summary of what this |
| 92 | +branch is about. It should represent the feature, fix etc. you are about to do. |
| 93 | + |
| 94 | +> There should never be `openqda` being part of the branch name. |
| 95 | +> This is useless information. |
| 96 | +
|
| 97 | +### Examples |
| 98 | + |
| 99 | +Provide a new feature "Awesome Guide" |
| 100 | + |
| 101 | + |
| 102 | +```shell |
| 103 | +# ✅ Right |
| 104 | +$ git checkout -b feature/awesome-guide |
| 105 | +``` |
| 106 | + |
| 107 | +```shell |
| 108 | +# ❌ Wrong |
| 109 | +$ git checkout -b feature-awesome-timemachine |
| 110 | +$ git checkout -b awesome-timemachine |
| 111 | +$ git checkout -b feature-1 |
| 112 | +$ git checkout -b feature/my-cool-feature |
| 113 | +``` |
| 114 | + |
| 115 | + |
| 116 | +## Before committing your work |
| 117 | + |
| 118 | +> Before you commit you should ensure, the code passes |
| 119 | +> code quality checks and tests! |
| 120 | +
|
| 121 | + |
| 122 | +## Further notices |
| 123 | +We may or may not address one or more issues with your contribution, |
| 124 | +which are entirely related to ensure the quality of the software and |
| 125 | +are never intended to offend in any way. |
| 126 | + |
| 127 | +This may include: |
| 128 | +- multiple contributions in one pull requests (please avoid this at all costs!) |
| 129 | + causing the pull request to bloat up beyond comprehension |
| 130 | +- convention violations |
| 131 | +- issues with the solution (for example unsustainable, unscalable etc.) |
| 132 | +- code style issues (variable and function names) |
| 133 | +- missing documentation and tests |
| 134 | +- unclear objectives |
| 135 | + |
| 136 | +If there are no issues or all issues are resolved, |
| 137 | +then we will approve the pull request and merge it asap. |
| 138 | +You will also be mentioned in the next upcoming release, unless |
| 139 | +you explicitly don't want to be named. |
0 commit comments