Skip to content

Commit abfcae5

Browse files
authored
Modified CONTRIBUTING.md file (#122)
Signed-off-by: Gianluca Capuzzi <gianluca.posta78@gmail.com>
1 parent bc172e5 commit abfcae5

20 files changed

+155
-0
lines changed

docs/CONTRIBUTING.md

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,156 @@
11
# Contributing to AIFAQ
2+
3+
## Introduction
4+
5+
AIFAQ is an open-source project under Linux Foundation Decentralized Trust umbrella. It aims to build an AI Chatbot to support newby in communities (companies, organizations, individuals, …).
6+
This guide allows the AIFAQ community to contribute activities. Please, read before starting coding.
7+
8+
## Prerequisites
9+
10+
Join the [weekly meetings](https://zoom-lfx.platform.linuxfoundation.org/meeting/96156160446?password=436922cc-9811-4e05-aa60-04f7b4679c7e) on Monday at 9 am EST time zone.
11+
12+
## Code of Conduct and Antitrust Policy
13+
14+
- [Linux Foundation Privacy Policy](https://www.linuxfoundation.org/legal/privacy-policy)
15+
- [Terms of use](https://www.linuxfoundation.org/legal/terms)
16+
- [Antitrust Policy](https://www.linuxfoundation.org/legal/antitrust-policy)
17+
- [Code of Conduct](https://www.lfdecentralizedtrust.org/code-of-conduct)
18+
19+
## GitHub Flow
20+
21+
Please select a task from the [published issues](https://github.com/hyperledger-labs/aifaq/issues); other changes will not be considered. For improvement proposals, kindly attend the [Monday meetings](https://zoom-lfx.platform.linuxfoundation.org/meeting/96156160446?password=436922cc-9811-4e05-aa60-04f7b4679c7e).
22+
Below the GitHub tree:
23+
24+
<img src="../images/github_tree.png" alt="GitHub tree"/>
25+
26+
and the workflow schema:
27+
28+
<img src="../images/workflow.png" alt="GitHub workflow"/>
29+
30+
We should document all changes describing the solution and adding screenshots or a short video (like [this](https://github-production-user-asset-6210df.s3.amazonaws.com/190102379/461524193-6ee9ee0c-2cd1-4ab3-97ea-904515cd5b6c.webm?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20250704%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250704T111312Z&X-Amz-Expires=300&X-Amz-Signature=e9ba00009ffd4bd997e34a62a5a5ff647e845bd7786790c495318de77b446737&X-Amz-SignedHeaders=host)).
31+
32+
## Commands
33+
34+
In your local PC, create a new folder and open it in VS Code.
35+
Then open a new terminal:
36+
37+
<img src="../images/new_terminal.png" alt="VS Code new terminal"/>
38+
39+
go to [AIFAQ GitHub repo agents branch](https://github.com/hyperledger-labs/aifaq/tree/agents) and press on fork button:
40+
41+
<img src="../images/fork_button.png" alt="GitHub fork button"/>
42+
43+
uncheck that checkbox and press on create fork button:
44+
45+
<img src="../images/create_fork.png" alt="GitHub create fork"/>
46+
47+
it will create a fork in your local GitHub space.
48+
49+
<img src="../images/copy_url.png" alt="GitHub copy url repo"/>
50+
51+
Then click on the code button and copy the https url to clipboard:
52+
53+
Now, type
54+
55+
```console
56+
git clone https://github.com/gcapuzzi/aifaq.git
57+
```
58+
59+
on vs code terminal:
60+
61+
<img src="../images/git_clone.png" alt="git clone terminal command"/>
62+
63+
now we can move to the aifaq folder:
64+
65+
```console
66+
cd aifaq
67+
```
68+
69+
and list the current branches:
70+
71+
```console
72+
git branch -a
73+
```
74+
75+
<img src="../images/git_branch_a.png" alt="git branch -a terminal command"/>
76+
77+
we can see that the current branch is **main** and it refers to the **remote main branch**.
78+
But, we want to change a different branch (in our case, mvt-streamlit branch) so execute:
79+
80+
```console
81+
git checkout origin/mvt-streamlit
82+
```
83+
84+
<img src="../images/git_checkout_origin.png" alt="git checkout origin terminal command"/>
85+
86+
and execute
87+
88+
```console
89+
git branch -a
90+
```
91+
92+
in order to check the current remote branch.
93+
94+
Ok, now we can create a new local branch with same name:
95+
96+
```console
97+
git checkout mvt-streamlit
98+
```
99+
100+
<img src="../images/git_checkout.png" alt="git checkout terminal command"/>
101+
102+
and
103+
104+
<img src="../images/git_branch2.png" alt="git branch terminal command"/>
105+
106+
and now we can do our dev activities.
107+
In my case, I want to add a new file (faiss_content_py) with copy-paste.
108+
When I finish my changes, type:
109+
110+
```console
111+
git status
112+
```
113+
114+
<img src="../images/git_status.png" alt="git status terminal command"/>
115+
116+
so, we have to commit our changes before to push those to the remote branch:
117+
118+
```console
119+
git add -A
120+
git commit -s -m “Added faiss_content.py file”
121+
```
122+
123+
<img src="../images/git_add_commit.png" alt="git add commit terminal command"/>
124+
125+
The first command adds the changes to the commit and the second one executes the commit (please check the ‘-s’ argument that is mandatory in Linux Foundation).
126+
127+
Now, we can push the code to the remote branch:
128+
129+
```console
130+
git push -u origin mvt-streamlit
131+
```
132+
133+
<img src="../images/git_push_origin.png" alt="git push origin terminal command"/>
134+
135+
now if we check our mvt-streamlit branch in the personal GitHub space:
136+
137+
<img src="../images/mvt_streamlit.png" alt="mvt-streamlit GitHub branch"/>
138+
139+
## Pull Request
140+
141+
The changes are in our GitHub space, but we want the same in the official project repo. So open a **Pull Request**:
142+
143+
<img src="../images/new_pull_request.png" alt="GitHub new pull request"/>
144+
145+
and set up the two branches:
146+
147+
<img src="../images/select_branches.png" alt="GitHub new pull request select branches"/>
148+
149+
then click on **Create pull request button**:
150+
151+
<img src="../images/open_pull_request.png" alt="GitHub open pull request"/>
152+
153+
Please add a short description and click on the **Create pull request button**.
154+
And remove the branch:
155+
156+
<img src="../images/remove_branch.png" alt="GitHub remove branch"/>

images/copy_url.png

20.8 KB
Loading

images/create_fork.png

43.9 KB
Loading

images/fork_button.png

74.2 KB
Loading

images/git_add_commit.png

13.9 KB
Loading

images/git_branch2.png

10.8 KB
Loading

images/git_branch_a.png

14 KB
Loading

images/git_checkout.png

8.23 KB
Loading

images/git_checkout_origin.png

37.9 KB
Loading

images/git_clone.png

20.4 KB
Loading

0 commit comments

Comments
 (0)