1- Dasharo Openness Score design
2- =============================
1+ # Dasharo Openness Score design
32
43Dasharo Openness Score is designed following a few patterns and design rules.
54
6-
7- Dasharo Openness Score general rules
8- ------------------------------------
5+ ## Dasharo Openness Score general rules
96
1071 . The utility should not leave any intermediate files during the firmware
118 image processing.
@@ -23,29 +20,28 @@ Dasharo Openness Score general rules
2320
24213 . The utility must be sa precise as possible to avoid falsified results.
2522
26- Dasharo Openness Score module design rules
27- ------------------------------------------
23+ ## Dasharo Openness Score module design rules
2824
2925Each class representing a firmware image (or its integral part):
3026
31271 . Must calculate the 4 basic metrics (empty, data, closed-source and
3228 open-source) on the class instance creation.
33- 2. Should have a string method `` __str__ ` ` which returns a set of 4 basic
29+ 2 . Should have a string method ` __str__ ` which returns a set of 4 basic
3430 metrics and general attributes of the entity
35- 3. Should have a length method `` __len__ ` ` which returns the size of the
31+ 3 . Should have a length method ` __len__ ` which returns the size of the
3632 firmware image (or its integral part)
37334 . Must contain attributes for the basic metrics using the following names:
38- `` self.open_code_size `` , `` self.closed_code_size `` , `` self.data_size ` ` and
39- `` self.empty_size ` `
40- 5. Must implement `` export_markdown ` ` method that will produce a markdown
34+ ` self.open_code_size ` , ` self.closed_code_size ` , ` self.data_size ` and
35+ ` self.empty_size `
36+ 5 . Must implement ` export_markdown ` method that will produce a markdown
4137 report of the firmware image (or its integral part) statistics
42- 6. Must implement `` _calculate_metrics ` ` method which will perform the image
38+ 6 . Must implement ` _calculate_metrics ` method which will perform the image
4339 component classification and do the calculations
44407 . Should implement a parse method which will perform the extraction of the
4541 image components and its attributes
46- 8. Must call the parse method and `` _calculate_metrics ` ` inside the class'
47- `` __init__ ` ` method
48- 9. Must implement `` export_charts ` ` method to generate pie charts (only for
42+ 8 . Must call the parse method and ` _calculate_metrics ` inside the class'
43+ ` __init__ ` method
44+ 9 . Must implement ` export_charts ` method to generate pie charts (only for
4945 classes representing the whole firmware image)
504610 . Must assume a component as closed-source if unable to classify to any
5147 category.
0 commit comments