2023-10-05 20:10:03 +00:00
# Welcome to DocsGPT Contributing Guidelines
2023-02-14 14:55:41 +00:00
2023-10-08 19:51:36 +00:00
Thank you for choosing to contribute to DocsGPT! We are all very grateful!
2023-02-14 14:55:41 +00:00
2023-10-02 14:14:19 +00:00
### [🎉 Join the Hacktoberfest with DocsGPT and Earn a Free T-shirt! 🎉](https://github.com/arc53/DocsGPT/blob/main/HACKTOBERFEST.md)
2023-02-14 14:55:41 +00:00
# We accept different types of contributions
2023-10-08 21:56:20 +00:00
📣 **Discussions** - Engage in conversations, start new topics, or help answer questions.
2023-02-14 14:55:41 +00:00
2023-10-08 21:56:20 +00:00
🐞 **Issues** - This is where we keep track of tasks. It could be bugs,fixes or suggestions for new features.
2023-02-14 14:55:41 +00:00
2023-10-08 21:56:20 +00:00
🛠️ **Pull requests** - Suggest changes to our repository, either by working on existing issues or adding new features.
2023-02-14 14:55:41 +00:00
2023-10-08 21:56:20 +00:00
📚 **Wiki** - This is where our documentation resides.
2023-02-14 14:55:41 +00:00
## 🐞 Issues and Pull requests
2023-10-09 20:36:52 +00:00
- We value contributions in the form of discussions or suggestions. We recommend taking a look at existing issues and our [roadmap ](https://github.com/orgs/arc53/projects/2 ).
2023-02-14 14:55:41 +00:00
2023-10-23 12:00:18 +00:00
2023-10-09 20:36:52 +00:00
- If you're interested in contributing code, here are some important things to know:
2023-10-05 20:10:03 +00:00
2023-10-09 20:36:52 +00:00
- We have a frontend built on React (Vite) and a backend in Python.
2023-10-23 12:00:18 +00:00
=======
2023-10-12 17:19:40 +00:00
Before creating issues, please check out how the latest version of our app looks and works by launching it via [Quickstart ](https://github.com/arc53/DocsGPT#quickstart ) the version on our live demo is slightly modified with login. Your issues should relate to the version that you can launch via [Quickstart ](https://github.com/arc53/DocsGPT#quickstart ).
2023-10-12 17:19:06 +00:00
2023-10-13 13:05:13 +00:00
### 👨💻 If you're interested in contributing code, here are some important things to know:
2023-10-05 20:10:03 +00:00
2023-10-23 12:00:18 +00:00
2023-10-13 13:02:56 +00:00
Tech Stack Overview:
2023-10-05 20:10:03 +00:00
2023-10-13 13:02:56 +00:00
- 🌐 Frontend: Built with React (Vite) ⚛️,
2023-10-05 20:10:03 +00:00
2023-10-13 13:02:56 +00:00
- 🖥 Backend: Developed in Python 🐍
2023-10-12 17:19:06 +00:00
2023-10-13 13:05:13 +00:00
### 🌐 If you are looking to contribute to frontend (⚛️ React, Vite):
2023-10-05 20:10:03 +00:00
2023-10-07 09:16:56 +00:00
- The current frontend is being migrated from [`/application` ](https://github.com/arc53/DocsGPT/tree/main/application ) to [`/frontend` ](https://github.com/arc53/DocsGPT/tree/main/frontend ) with a new design, so please contribute to the new one.
2023-10-05 20:10:03 +00:00
- Check out this [milestone ](https://github.com/arc53/DocsGPT/milestone/1 ) and its issues.
2023-10-12 19:37:49 +00:00
- The updated Figma design can be found [here ](https://www.figma.com/file/OXLtrl1EAy885to6S69554/DocsGPT?node-id=0%3A1&t=hjWVuxRg9yi5YkJ9-1 ).
2023-02-14 14:55:41 +00:00
2023-09-05 04:31:27 +00:00
Please try to follow the guidelines.
2023-02-14 14:55:41 +00:00
2023-10-13 13:05:13 +00:00
### 🖥 If you are looking to contribute to Backend (🐍 Python):
2023-02-14 14:55:41 +00:00
2023-10-08 21:56:20 +00:00
- Review our issues and contribute to [`/application` ](https://github.com/arc53/DocsGPT/tree/main/application ) or [`/scripts` ](https://github.com/arc53/DocsGPT/tree/main/scripts ) (please disregard old [`ingest_rst.py` ](https://github.com/arc53/DocsGPT/blob/main/scripts/old/ingest_rst.py ) [`ingest_rst_sphinx.py` ](https://github.com/arc53/DocsGPT/blob/main/scripts/old/ingest_rst_sphinx.py ) files; they will be deprecated soon).
2023-10-05 20:10:03 +00:00
- All new code should be covered with unit tests ([pytest](https://github.com/pytest-dev/pytest)). Please find tests under [`/tests` ](https://github.com/arc53/DocsGPT/tree/main/tests ) folder.
2023-10-07 16:07:58 +00:00
- Before submitting your Pull Request, ensure it can be queried after ingesting some test data.
2023-09-05 04:31:27 +00:00
### Testing
2023-10-05 20:10:03 +00:00
To run unit tests from the root of the repository, execute:
2023-09-05 04:31:27 +00:00
```
python -m pytest
```
2023-10-12 09:02:44 +00:00
## Workflow 📈
Here's a step-by-step guide on how to contribute to DocsGPT:
1. **Fork the Repository:**
- Click the "Fork" button at the top-right of this repository to create your fork.
2023-10-22 05:24:02 +00:00
2. **Clone the Forked Repository:**
- Clone the repository using:
2023-10-28 15:47:25 +00:00
``` shell
2023-10-22 05:24:02 +00:00
git clone https://github.com/< your-github-username > /DocsGPT.git
2023-10-28 15:47:25 +00:00
```
2023-10-22 05:24:02 +00:00
2023-10-22 06:08:23 +00:00
3. **Keep your Fork in Sync:**
- Before you make any changes, make sure that your fork is in sync to avoid merge conflicts using:
2023-10-28 15:47:25 +00:00
```shell
git remote add upstream https://github.com/arc53/DocsGPT.git
2023-10-31 05:33:04 +00:00
git pull upstream main
2023-10-28 15:47:25 +00:00
```
2023-10-22 06:08:23 +00:00
2023-10-22 05:24:02 +00:00
4. **Create and Switch to a New Branch:**
2023-10-12 09:02:44 +00:00
- Create a new branch for your contribution using:
```shell
git checkout -b your-branch-name
```
2023-10-22 05:24:02 +00:00
5. **Make Changes:**
2023-10-12 09:02:44 +00:00
- Make the required changes in your branch.
2023-10-22 05:24:02 +00:00
6. **Add Changes to the Staging Area:**
2023-10-12 09:02:44 +00:00
- Add your changes to the staging area using:
```shell
git add .
```
2023-10-22 05:24:02 +00:00
7. **Commit Your Changes:**
2023-10-12 09:02:44 +00:00
- Commit your changes with a descriptive commit message using:
```shell
git commit -m "Your descriptive commit message"
```
2023-10-22 05:24:02 +00:00
8. **Push Your Changes to the Remote Repository:**
2023-10-12 09:02:44 +00:00
- Push your branch with changes to your fork on GitHub using:
```shell
git push origin your-branch-name
```
2023-10-22 05:24:02 +00:00
9. **Submit a Pull Request (PR):**
2023-10-12 09:02:44 +00:00
- Create a Pull Request from your branch to the main repository. Make sure to include a detailed description of your changes and reference any related issues.
2023-10-22 05:24:02 +00:00
10. **Collaborate:**
2023-10-12 09:02:44 +00:00
- Be responsive to comments and feedback on your PR.
- Make necessary updates as suggested.
- Once your PR is approved, it will be merged into the main repository.
2023-10-22 05:24:02 +00:00
11. **Testing:**
2023-10-12 09:02:44 +00:00
- Before submitting a Pull Request, ensure your code passes all unit tests.
- To run unit tests from the root of the repository, execute:
```shell
python -m pytest
```
2023-10-15 04:11:27 +00:00
*Note: You should run the unit test only after making the changes to the backend code.*
2023-10-22 05:24:02 +00:00
12. **Questions and Collaboration:**
2023-10-12 09:02:44 +00:00
- Feel free to join our Discord. We're very friendly and welcoming to new contributors, so don't hesitate to reach out.
Thank you for considering contributing to DocsGPT! 🙏
2023-02-14 14:55:41 +00:00
2023-09-05 04:31:27 +00:00
## Questions/collaboration
2023-10-07 16:07:58 +00:00
Feel free to join our [Discord ](https://discord.gg/n5BX8dh8rU ). We're very friendly and welcoming to new contributors, so don't hesitate to reach out.
2023-10-16 19:00:34 +00:00
# Thank you so much for considering to contribute DocsGPT!🙏