Skip to content

Commit 98cc754

Browse files
readme update
1 parent 2017fe3 commit 98cc754

File tree

3 files changed

+57
-72
lines changed

3 files changed

+57
-72
lines changed

README.md

+57-72
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ We have used coverage.py to measure the cover of our chosen project. After insta
1818
run the tool by typing coverage run --branch -m pytest tests. Afterwards, we use coverage report to generate the report. Later, Ayman has written a scrip to run the commands in a single script, and to also skip the test files, which don't need to be tested.
1919

2020
In order to not put in 8 large images, I will insert the final screenshot, with the total branch coverage:
21-
![image](https://github.com/CatalinAnt/algorithms-SEP-95/assets/113595149/f1cd3fab-b00c-4cd0-89d0-6452e7ed1a63)
2221

22+
![image](https://github.com/CatalinAnt/algorithms-SEP-95/assets/113595149/f1cd3fab-b00c-4cd0-89d0-6452e7ed1a63)
2323

2424
### Your own coverage tool
2525

@@ -29,15 +29,15 @@ In order to not put in 8 large images, I will insert the final screenshot, with
2929

3030
[Link the commit](https://github.com/CatalinAnt/algorithms-SEP-95/pull/2/commits/22ee6fa1df4785596c603af61a725c558973eb0b)
3131

32-
Screenshot of branch measurement (66%):<br>
32+
Screenshot of branch measurement:<br>
3333
![image](image-7.png)
3434

3535
##### Function 2: insertion_sort
3636

3737
[Link to commit](https://github.com/CatalinAnt/algorithms-SEP-95/pull/2/commits/5dae7f28036f89b7f6ff673639a922dd714aff3e)
3838

39-
Screenshot of branch measurement (0%, was untested):<br>
40-
![alt text](image-8.png)
39+
Screenshot of branch measurement:<br>
40+
![alt text](image-12.png)
4141

4242
#### Catalin Antonescu
4343

@@ -57,58 +57,38 @@ Link to commit:(same as for the first one)
5757
Screenshot of branch measurement:
5858
![image](https://github.com/CatalinAnt/algorithms-SEP-95/assets/113595149/94eec9b6-3dd6-46e3-b087-40892eccc10e)
5959

60-
#### Abdullah Abdelkhalik
61-
60+
#### Almuthana Almustafa
6261

63-
pythagoras
62+
##### Function 1: stoogsort in stoog_sort.py
6463

65-
https://github.com/CatalinAnt/algorithms-SEP-95/commit/5651abafebe8ae3a5ea63e74883bb991acf19303
64+
[Link to the commit in the founction files](https://github.com/CatalinAnt/algorithms-SEP-95/commit/57b66879c6ae0f82712c55528f540dfdb3c3ddd3)
6665

67-
![pythagoras_hits](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/0df1fa2b-2185-4b9f-ae65-5d969edb009b)
66+
result:
6867

68+
![alt text](SS_befor1.png)
6969

70-
first_unique_char
70+
##### Function 2: word_break in word_break.py
7171

72-
https://github.com/CatalinAnt/algorithms-SEP-95/commit/c16f26e952322b2c1729778a4141a57103ba7658
72+
link to commit in founction:
73+
[Link to the commit in the founction files](https://github.com/CatalinAnt/algorithms-SEP-95/commit/57b66879c6ae0f82712c55528f540dfdb3c3ddd3 )
7374

74-
![first_unique_char_hits](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/10d7c45c-398e-4408-8f11-6771f51fa95c)
75+
result:
7576

77+
![alt text](WB_befor1.png)
7678

7779
#### Abdullah Abdelkhalik
7880

79-
80-
pythagoras
81+
##### Function 2: pythagoras
8182

8283
https://github.com/CatalinAnt/algorithms-SEP-95/commit/5651abafebe8ae3a5ea63e74883bb991acf19303
8384

84-
![pythagoras_hits](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/0df1fa2b-2185-4b9f-ae65-5d969edb009b)
85-
85+
![pythagoras_hits](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/c61bff67-be7e-4bd2-b892-0a0f2dada1f3)
8686

87-
first_unique_char
87+
##### Function 2: first_unique_char
8888

8989
https://github.com/CatalinAnt/algorithms-SEP-95/commit/c16f26e952322b2c1729778a4141a57103ba7658
9090

91-
![first_unique_char_hits](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/10d7c45c-398e-4408-8f11-6771f51fa95c)
92-
93-
94-
#### Almuthana Almustafa
95-
96-
##### Function 1: stoogsort in stoog_sort.py
97-
98-
[Link to the commit in the founction files](https://github.com/CatalinAnt/algorithms-SEP-95/commit/57b66879c6ae0f82712c55528f540dfdb3c3ddd3)
99-
100-
result:
101-
102-
![alt text](result_image-2.png)
103-
104-
##### Function 2: word_break in word_break.py
105-
106-
link to commit in founction:
107-
[Link to the commit in the founction files](https://github.com/CatalinAnt/algorithms-SEP-95/commit/57b66879c6ae0f82712c55528f540dfdb3c3ddd3 )
108-
109-
result:
110-
111-
![alt text](result_image_2.png)
91+
![first_unique_char_hits (2)](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/8c1b704e-cadb-4f54-aea7-795005348538)
11292

11393
## Coverage improvement
11494

@@ -132,9 +112,9 @@ result:
132112

133113
<Provide the same kind of information provided for Test 1>
134114

135-
## Ayman Errahmouni
115+
#### Ayman Errahmouni
136116

137-
#### <Test "test_simplify_path">
117+
##### <Test "test_simplify_path">
138118

139119
An enhanced existing test
140120

@@ -143,6 +123,7 @@ Old coverage:<br>
143123

144124
Diff (LHS = new code, RHS = old code):<br>
145125
![LHS: new code, RHS: old code](image.png)
126+
![alt text](image-9.png)
146127

147128
New coverage:<br>
148129
![new coverage result (100%)](image-1.png)
@@ -152,7 +133,7 @@ By added additional tests that use such cases, the coverage improved.
152133

153134
The test was also faulty on windows (i guess linux was assumed), so i added support for that in the test. (It now passes on Windows 10 too)
154135

155-
#### <Test "test_actual_insertion_sort">
136+
##### <Test "test_actual_insertion_sort">
156137

157138
An new test. (before, `insertion_sort` was not present in any test)
158139

@@ -161,6 +142,8 @@ Diff (LHS: new code, RHS: old code):<br>
161142
![LHS: new code, RHS: old code](image-5.png)<br>
162143
(Changes in imports)<br>
163144
![LHS: new code, RHS: old code](image-6.png)
145+
(Instrumentation)<br>
146+
![alt text](image-8.png)
164147

165148
Old coverage:<br>
166149
![Old coverage result (4%)](image-3.png)
@@ -170,7 +153,7 @@ New coverage:<br>
170153

171154
<State the coverage improvement with a number and elaborate on why the coverage is improved>
172155

173-
## Catalin Antonescu
156+
#### Catalin Antonescu
174157

175158
Test 1:
176159

@@ -192,7 +175,6 @@ New coverage:
192175

193176
For strong_password there was a 26% coverage improvement with the existing tool and 40% with manual measurement tool.
194177

195-
196178
Test 2:
197179

198180
In test_matrix:
@@ -204,41 +186,15 @@ Old coverage:
204186
![image](https://github.com/CatalinAnt/algorithms-SEP-95/assets/113595149/94eec9b6-3dd6-46e3-b087-40892eccc10e)
205187
![image](https://github.com/CatalinAnt/algorithms-SEP-95/assets/113595149/a97a2bd6-c69e-4435-a8e2-bbdefc429bd1)
206188

207-
208189
New coverage:
209190

210191
![image](https://github.com/CatalinAnt/algorithms-SEP-95/assets/113595149/7cc337eb-5684-40b3-aedd-dc2b7180b7f3)
211192
![image](https://github.com/CatalinAnt/algorithms-SEP-95/assets/113595149/2143adff-e0aa-4113-858a-0c92ec288d20)
212193
For rotate_image, thre was a 33% coverage improvement with the existing tool and 25% with manual tool.
213194

214-
215-
## Abdullah Abdelkhalik
216-
217-
test_maths
218-
219-
https://github.com/CatalinAnt/algorithms-SEP-95/commit/60832d9c672efd586848077cc41a52630d34371b
220-
221-
![pythagoras_before](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/cf57112b-1aef-4a10-a41f-bd4b797e2012)
222-
223-
![pythagoras_after](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/1aa45c17-46fc-49d3-944a-03c2276d1be6)
224-
225-
the coverage is improved by 28%, the code only hit one of the five branches and cover only one of the three cases of the pythagoras theory. I added the other two cases, i could have a fourth case where none of the cases is present.
226-
227-
test_strings
228-
229-
https://github.com/CatalinAnt/algorithms-SEP-95/commit/5651abafebe8ae3a5ea63e74883bb991acf19303
230-
231-
![first_unique_char_before](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/9910ec69-73b0-4c87-afc8-abc01f65a423)
232-
233-
![first_unique_char_after](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/10859fac-776c-4a48-8a1c-9531afcbfa9b)
234-
235-
The coverage is improved by 13%, the code only hit three out of five branches and only set up two examples. I added a case where there is no unique letter.
236-
237-
## Almuthana Almustafa
238-
239-
### Test 1: stoogsort
240-
195+
#### Almuthana Almustafa
241196

197+
##### Test 1: stoogsort
242198

243199
link to commit in test files:
244200
[Link to the commit in the test files](https://github.com/CatalinAnt/algorithms-SEP-95/commit/157de36fd4c373b67cd03e3b3713be9ba5cf0d97)
@@ -251,9 +207,11 @@ existing tool result after:
251207

252208
![alt text](stoog_sort_image2.png)
253209

210+
![alt text](result_image-2.png)
211+
254212
The coverage increased by 89%, largely attributable to the implementation of new tests.
255213

256-
### Test 2: word_break
214+
##### Test 2: word_break
257215

258216
[Link to the commit in the test files](https://github.com/CatalinAnt/algorithms-SEP-95/commit/157de36fd4c373b67cd03e3b3713be9ba5cf0d97)
259217

@@ -265,8 +223,34 @@ existing tool result after:
265223

266224
![alt text](word_break_image2.png)
267225

226+
![alt text](result_image_2.png)
227+
268228
The coverage improved by 86% due to the creation of new tests.
269229

230+
#### Abdullah Abdelkhalik
231+
232+
#### Improvements
233+
234+
test_maths
235+
236+
https://github.com/CatalinAnt/algorithms-SEP-95/commit/60832d9c672efd586848077cc41a52630d34371b
237+
238+
![pythagoras_before](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/cf57112b-1aef-4a10-a41f-bd4b797e2012)
239+
240+
![pythagoras_after](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/1aa45c17-46fc-49d3-944a-03c2276d1be6)
241+
242+
the coverage is improved by 28%, the code only hit one of the five branches and cover only one of the three cases of the pythagoras theory. I added the other two cases, i could have a fourth case where none of the cases is present.
243+
244+
test_strings
245+
246+
https://github.com/CatalinAnt/algorithms-SEP-95/commit/5651abafebe8ae3a5ea63e74883bb991acf19303
247+
248+
![first_unique_char_before](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/9910ec69-73b0-4c87-afc8-abc01f65a423)
249+
250+
![first_unique_char_after](https://github.com/CatalinAnt/algorithms-SEP-95/assets/114078193/10859fac-776c-4a48-8a1c-9531afcbfa9b)
251+
252+
The coverage is improved by 13%, the code only hit three out of five branches and only set up two examples. I added a case where there is no unique letter.
253+
270254
### Overall
271255

272256
<Provide a screenshot of the old coverage results by running an existing tool (the same as you already showed above)>
@@ -295,3 +279,4 @@ Cataline -> Instrumentation was added to two functions, and the tests for these
295279

296280

297281

282+

SS_befor1.png

3.4 KB
Loading

WB_befor1.png

3.6 KB
Loading

0 commit comments

Comments
 (0)