Skip to content

Commit

Permalink
Merge pull request #55 from chaoss/germonprez-patch-10
Browse files Browse the repository at this point in the history
License Coverage to New Template
  • Loading branch information
sgoggins authored Nov 4, 2019
2 parents b4e08f1 + f6a17bc commit 8ade485
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions metrics/License_Coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ Question: How much of the code base has declared licenses?
## Description
How much of the code base has declared licenses. This includes both software and documentation source files and is represented as a percentage of total coverage.

### Formula
The above data was pulled from DoSOCSv2 and filtered through Jinja2 to get the desired information. Here is a sample of Jinja code to filter DoSOCSv2 code. The file that this implementation is inserted into may be found here:
## Objectives
License Coverage provides insight into the percentage of files in a software package that have a declared license, leading to two use cases:
1. A software package is sourced for internal organizational use and declared license coverage can highlight points of interest or concern when using that software package.
2. Further, a software package is provided to external, downstream projects and declared license coverage can make transparent license information needed for downstream integration, deployment, and use.

## Implementation

Data can be pulled from DoSOCSv2 and filtered through Jinja2 to get the desired information. Here is a sample of Jinja code to filter DoSOCSv2 code. The file that this implementation is inserted into may be found here:
https://github.com/DoSOCSv2/DoSOCSv2/blob/master/dosocs2/templates/2.0.tag
The code may be added to the end of the document. Run a “dosocs2 oneshot” scan and the new data will be at the end of the document. More information on DoSOCSv2 is found here:
https://github.com/DoSOCSv2/DoSOCSv2
Expand All @@ -25,32 +31,20 @@ PercentTotalLicenseCoverage: {{ '%0.2f' % ((cnt[0] / loop.index) * 100) | float
{% endfor %}
```

## Objectives
License Coverage provides insight into the percentage of files in a software package that have a declared license, leading to two use cases:
1. A software package is sourced for internal organizational use and declared license coverage can highlight points of interest or concern when using that software package.
2. Further, a software package is provided to external, downstream projects and declared license coverage can make transparent license information needed for downstream integration, deployment, and use.

**Note:** In both cases License Coverage less than 100% may require further investigation by distributors and consumers of a software package.

## Sample Filter and Visualization
### Filters
Time: Licenses declared in a repository can change over time as the dependencies of the repository change. One of the principle motivations for tracking license presence, aside from basic awareness, is to draw attention to any unexpected new license introduction.

## Reference Implementation
### Web Presentation of DoSOCS2 Output:
### Visualizations

#### Web Presentation of DoSOCS2 Output:
![](https://i.imgur.com/HGG24bk.jpg)

### JSON Presentation of DoSOCS2 Output:
#### JSON Presentation of DoSOCS2 Output:
![](https://i.imgur.com/Xyxm3q3.jpg)

## Known Implementations
### Tools Providng the Metric
* [Augur](https://github.com/chaoss/augur)

### Examples
Available in the Augur test schema for these repositories:
- portable
- openBSD
- boringSSL

## Resources
* https://spdx.org/
* https://www.fossology.org

0 comments on commit 8ade485

Please sign in to comment.