Skip to content

Commit 1abd5c3

Browse files
chore: Update contributing guidelines (#10770)
* chore: Update contributing guidelines * Add a TLDR for first PR * Fix the broken link * Some grammer fixes * Add high quality contributions section * Add info about using AI assistants * Add info about issues to be handled internally * Update CONTRIBUTING.md Co-authored-by: bogdankostic <bogdankostic@web.de> * Update CONTRIBUTING.md Co-authored-by: bogdankostic <bogdankostic@web.de> * Update CONTRIBUTING.md Co-authored-by: bogdankostic <bogdankostic@web.de> * Add CLA item and address PR comments * Update CONTRIBUTING.md Co-authored-by: bogdankostic <bogdankostic@web.de> * Update CONTRIBUTING.md Co-authored-by: bogdankostic <bogdankostic@web.de> --------- Co-authored-by: bogdankostic <bogdankostic@web.de>
1 parent 8e03ffb commit 1abd5c3

1 file changed

Lines changed: 69 additions & 34 deletions

File tree

CONTRIBUTING.md

Lines changed: 69 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,28 @@ and smooth out the experience for all involved. The community looks forward to y
99

1010
> [!TIP]
1111
> If you like Haystack but just don't have time to contribute, that's fine. There are other easy ways to support the
12-
> project and show your appreciation, which we would also be very happy about:
13-
> - Star this repository
14-
> - Tweet about it
15-
> - Mention Haystack at local meetups and tell your friends/colleagues
12+
> project and show your appreciation: star this repository ⭐, mention Haystack at local meetups and tell your
13+
> friends/colleagues, or share what you build and tag [Haystack on X (Twitter)](https://x.com/Haystack_ai) and
14+
> [Haystack on LinkedIn](https://www.linkedin.com/showcase/haystack-ai-framework) — we'd love to see it!
15+
16+
## Your first PR — high-level to-do list
17+
18+
Use this checklist to stay on track for your first code PR:
19+
20+
- **Pick an issue** — Choose one labeled [good first issue](https://github.com/deepset-ai/haystack/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) or [contributions wanted](https://github.com/deepset-ai/haystack/issues?q=is%3Aissue%20state%3Aopen%20label%3A"Contributions%20wanted!"). Avoid issues marked or commented as [handled internally](#issues-not-open-for-external-contributions).
21+
- **Fork and clone**[Clone the repository](#clone-the-git-repository), run `pre-commit install`, and create a branch.
22+
- **Set up and run**[Set up your development environment](#setting-up-your-development-environment), run unit tests with `hatch run test:unit` and run quality checks with `hatch run test:types` and `hatch run fmt`.
23+
- **Implement and test** — Make your changes, add or update tests as needed, and ensure tests and pre-commit checks pass locally.
24+
- **Documentation** — If your change adds or alters user-facing behavior, add a new docs page or update the relevant one in `docs-website/` (edit under `docs/` for the next release; add new pages to `sidebars.js`). See the [Documentation Contributing Guide](docs-website/CONTRIBUTING.md) for where to edit, frontmatter, and navigation.
25+
- **Release notes** — Add a release note under `releasenotes/notes` with `hatch run release-note your-change-name` (see [Release notes](#release-notes)); maintainers can add `ignore-for-release-notes` for tests-only or CI-only changes.
26+
- **Open the PR** — Use a [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) title, fill the [PR template](.github/pull_request_template.md), and if the PR was fully AI-generated, add a [short disclaimer](#using-ai-assistants-to-contribute). Enable "Allow edits and access to secrets by maintainers" on the PR.
27+
- **Sign the CLA** — A [Contributor Licence Agreement (CLA)](https://cla-assistant.io/deepset-ai/haystack) is required for all contributions. Sign when prompted so your PR is ready for review (see [CLA](#contributor-licence-agreement-cla)).
28+
- **Once the PR is open** — Fix any [CI](#ci-continuous-integration) failures and address review feedback.
1629

1730
**Table of Contents**
1831

1932
- [Contributing to Haystack](#contributing-to-haystack)
33+
- [Your first PR — high-level to-do list](#your-first-pr--high-level-to-do-list)
2034
- [Code of Conduct](#code-of-conduct)
2135
- [I Have a Question](#i-have-a-question)
2236
- [Reporting Bugs](#reporting-bugs)
@@ -28,6 +42,9 @@ and smooth out the experience for all involved. The community looks forward to y
2842
- [Contributing to Documentation](#contributing-to-documentation)
2943
- [Contribute code](#contribute-code)
3044
- [Where to start](#where-to-start)
45+
- [Issues not open for external contributions](#issues-not-open-for-external-contributions)
46+
- [Example high-quality contributions](#example-high-quality-contributions)
47+
- [Using AI assistants to contribute](#using-ai-assistants-to-contribute)
3148
- [Setting up your development environment](#setting-up-your-development-environment)
3249
- [Clone the git repository](#clone-the-git-repository)
3350
- [Run the tests locally](#run-the-tests-locally)
@@ -49,30 +66,26 @@ By participating, you are expected to uphold this code. Please report unacceptab
4966

5067
## I Have a Question
5168

52-
> [!TIP]
53-
> If you want to ask a question, we assume that you have read the available [Documentation](https://docs.haystack.deepset.ai/docs/intro).
54-
55-
Before you ask a question, it is best to search for existing [Issues](/issues) that might help you. In case you have
69+
Before you ask a question, it is best to search for existing [Issues](https://github.com/deepset-ai/haystack/issues) that might help you. In case you have
5670
found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to
5771
search the internet for answers first.
5872

59-
If you then still feel the need to ask a question and need clarification, you can use one of our
60-
[Community Channels](https://haystack.deepset.ai/community), Discord, in particular, is often very helpful.
73+
If you then still feel the need to ask a question and need clarification, you can use [Haystack's Discord Server](https://discord.com/invite/xYvH6drSmA).
6174

6275
## Reporting Bugs
6376

6477
### Before Submitting a Bug Report
6578

6679
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to
6780
investigate carefully, collect information, and describe the issue in detail in your report. Please complete the
68-
following steps in advance to help us fix any potential bug as fast as possible.
81+
following steps in advance to help us fix any potential bugs as fast as possible.
6982

7083
- Make sure that you are using the latest version.
71-
- Determine if your bug is really a bug and not an error on your side, for example using incompatible versions.
84+
- Determine if your bug is really a bug and not an error on your side, for example, using incompatible versions.
7285
Make sure that you have read the [documentation](https://docs.haystack.deepset.ai/docs/intro). If you are looking
7386
for support, you might want to check [this section](#i-have-a-question).
7487
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there
75-
is not already a bug report existing for your bug or error in the [bug tracker](/issues).
88+
is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/deepset-ai/haystack/issues).
7689
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have
7790
discussed the issue.
7891
- Collect information about the bug:
@@ -84,13 +97,11 @@ following steps in advance to help us fix any potential bug as fast as possible.
8497
### How Do I Submit a Good Bug Report?
8598

8699
> [!IMPORTANT]
87-
> You must never report security-related issues, vulnerabilities, or bugs, including sensitive information to the issue
88-
> tracker, or elsewhere in public. Instead, sensitive bugs must be reported using [this link](https://github.com/deepset-ai/haystack/security/advisories/new).
89-
>
100+
> You must never report security-related issues, vulnerabilities, or bugs, including sensitive information, to the issue tracker, or elsewhere in public. Instead, sensitive bugs must be reported using [this link](https://github.com/deepset-ai/haystack/security/advisories/new).
90101
91102
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
92103

93-
- Open an [Issue of type Bug Report](/issues/new?assignees=&labels=bug&projects=&template=bug_report.md&title=).
104+
- Open an [Issue of type Bug Report](https://github.com/deepset-ai/haystack/issues/new?assignees=&labels=bug&projects=&template=bug_report.md&title=).
94105
- Explain the behavior you would expect and the actual behavior.
95106
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to
96107
recreate the issue on their own. This usually includes your code. For good bug reports, you should isolate the problem
@@ -102,8 +113,8 @@ Once it's filed:
102113
- The project team will label the issue accordingly.
103114
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no
104115
obvious way to reproduce the issue, the team will ask you for those steps.
105-
- If the team is able to reproduce the issue, the issue will scheduled for a fix or left to be
106-
[implemented by someone](#your-first-code-contribution).
116+
- If the team is able to reproduce it, the issue will be scheduled for a fix or left to be
117+
[picked up by a community contributor](https://github.com/deepset-ai/haystack/issues?q=is%3Aissue%20state%3Aopen%20label%3A"Contributions%20wanted!").
107118

108119
## Suggesting Enhancements
109120

@@ -115,8 +126,8 @@ find related suggestions.
115126

116127
- Make sure that you are using the latest version.
117128
- Read the [documentation](https://docs.haystack.deepset.ai/docs/intro) carefully and find out if the functionality
118-
is already covered, maybe by an individual configuration.
119-
- Perform a [search](/issues) to see if the enhancement has already been suggested. If it has, add a comment to the
129+
is already covered, possibly via particular configuration parameters.
130+
- Perform a [search](https://github.com/deepset-ai/haystack/issues) to see if the enhancement has already been suggested. If it has, add a comment to the
120131
existing issue instead of opening a new one.
121132
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to
122133
convince the project's developers of the merits of this feature. Keep in mind that we want features that will be
@@ -125,10 +136,10 @@ find related suggestions.
125136

126137
### How Do I Submit a Good Enhancement Suggestion?
127138

128-
Enhancement suggestions are tracked as GitHub issues of type [Feature request for existing integrations](/issues/new?assignees=&labels=feature+request&projects=&template=feature-request-for-existing-integrations.md&title=).
139+
Enhancement suggestions are tracked as GitHub issues of type [Feature request](https://github.com/deepset-ai/haystack/issues/new?template=feature_request.md).
129140

130141
- Use a **clear and descriptive title** for the issue to identify the suggestion.
131-
- Fill the issue following the template
142+
- Fill in the issue following the template
132143

133144
## Contributing to Documentation
134145

@@ -137,20 +148,44 @@ If you'd like to improve the documentation by fixing errors, clarifying explanat
137148
## Contribute code
138149

139150
> [!IMPORTANT]
140-
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the
141-
> necessary rights to the content and that the content you contribute may be provided under the project license.
151+
> When contributing to this project, you must agree that you have authored or carefully reviewed 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
142152
143153
### Where to start
144154

145-
If this is your first contribution, a good starting point is looking for an open issue that's marked with the label
155+
If this is your first code contribution, a good starting point is looking for an open issue that's marked with the label
146156
["good first issue"](https://github.com/deepset-ai/haystack/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).
147157
The core contributors periodically mark certain issues as good for first-time contributors. Those issues are usually
148-
limited in scope, easily fixable and low priority, so there is absolutely no reason why you should not try fixing them,
149-
it's a good excuse to start looking into the project and a safe space for experimenting failure: if you don't get the
158+
limited in scope, easily fixable and low priority, so there is absolutely no reason why you should not try fixing them.
159+
It's a good excuse to start looking into the project and a safe space to experiment and fail: if you don't get the
150160
grasp of something, pick another one! Once you become comfortable contributing to Haystack, you can have a look at the
151161
list of issues marked as [contributions wanted](https://github.com/orgs/deepset-ai/projects/14/views/1) to look for your
152162
next contribution!
153163

164+
### Issues not open for external contributions
165+
166+
Some issues are handled internally by the core team and are **not open for external contributions**. You may see a
167+
comment on such issues like:
168+
169+
> 👋 Hello there! This issue will be handled internally and isn't open for external contributions. If you'd like to contribute, please take a look at issues labeled **contributions welcome** or **good first issue**. We'd really appreciate it!
170+
171+
> [!WARNING]
172+
> **Please do not open pull requests for issues that are marked or commented as handled internally.** Your work may not be merged. Instead, look for issues labeled [good first issue](https://github.com/deepset-ai/haystack/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) or [contributions wanted](https://github.com/deepset-ai/haystack/issues?q=is%3Aissue%20state%3Aopen%20label%3A"Contributions%20wanted!") — we'd love your help there!
173+
174+
### Example high-quality contributions
175+
176+
Looking at strong pull requests is a great way to learn our standards. Example high-quality PRs: [#9270](https://github.com/deepset-ai/haystack/pull/9270), [#9227](https://github.com/deepset-ai/haystack/pull/9227), [#9271](https://github.com/deepset-ai/haystack/pull/9271), [#8648](https://github.com/deepset-ai/haystack/pull/8648), [#8767](https://github.com/deepset-ai/haystack/pull/8767). Use them as references for structure, testing, documentation, and how to describe changes in the PR description and release notes.
177+
178+
### Using AI assistants to contribute
179+
180+
You may use AI assistants or agents to help you implement a contribution. Please use them wisely:
181+
182+
- **Review and understand** all generated code before submitting. You are responsible for the contribution.
183+
- **Run tests and checks** locally (e.g. `hatch run test:unit`, `hatch run fmt`) so your PR meets our quality bar.
184+
- **If your PR was fully AI-generated**, add a short disclaimer in the PR description, for example: *"This PR was
185+
fully generated with an AI assistant. I have reviewed the changes and run the relevant tests."*
186+
187+
This helps maintainers and keeps the project ready for both human and AI contributors.
188+
154189
### Setting up your development environment
155190

156191
*To run Haystack tests locally, ensure your development environment uses Python >=3.10 and <3.14.*
@@ -219,9 +254,7 @@ Lint GitHub Actions workflow files...................(no files to check)Skipped
219254

220255
### Run the tests locally
221256

222-
Tests will automatically run in our CI for every commit you push to your PR on Github. In order to save precious CI time
223-
we encourage you to run the tests locally before pushing new commits to Github. From the root of the git repository,
224-
you can run all the unit tests like this:
257+
Tests will automatically run in our CI for every commit you push to your PR on Github. In order to save precious CI time, we encourage you to run the tests locally before pushing new commits to Github. From the root of the git repository, you can run all the unit tests like this:
225258

226259
```sh
227260
hatch run test:unit
@@ -259,6 +292,8 @@ To ease the review process, please follow the instructions in this paragraph whe
259292

260293
- For the title, use the [conventional commit convention](https://www.conventionalcommits.org/en/v1.0.0/).
261294
- For the body, follow the existing [pull request template](https://github.com/deepset-ai/haystack/blob/main/.github/pull_request_template.md) to describe and document your changes.
295+
- If you used an AI assistant and the PR was **fully AI-generated**, include a brief disclaimer in the PR description
296+
(see [Using AI assistants to contribute](#using-ai-assistants-to-contribute)).
262297

263298
### Release notes
264299

@@ -314,7 +349,7 @@ If all goes well, at the bottom of your PR page you should see something like th
314349

315350
![Successful CI](images/ci-success.png)
316351

317-
If you see some red checks (like the following), then something didn't work, and action is needed from your side.
352+
If you see some red checks (like the following), then something didn't work, and action is needed on your side.
318353

319354
![Failed CI](images/ci-failure-example.png)
320355

@@ -325,7 +360,7 @@ For example, in the case above, the CI will give you instructions on how to fix
325360

326361
## Working from GitHub forks
327362

328-
In order for maintainers to be able to help you, we usually ask contributors to give us push access to their fork.
363+
To help maintainers, we usually ask contributors to grant us push access to their fork.
329364

330365
To do so, please verify that "Allow edits and access to secrets by maintainers" on the PR preview page is checked
331366
(you can check it later on the PR's sidebar once it's created).
@@ -417,4 +452,4 @@ open to everyone in the future (“You hereby grant to Deepset **and anyone** [.
417452
your end (“you provide your Contributions on an AS IS basis, without warranties or conditions of any kind [...]”). You
418453
can find the Contributor Licence Agreement [here](https://cla-assistant.io/deepset-ai/haystack).
419454

420-
If you have further questions about the licensing, feel free to reach out to contributors@deepset.ai.
455+
If you have further questions about the licensing, feel free to reach out to contributors@deepset.ai.

0 commit comments

Comments
 (0)