-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement latest RF4 OSS checks (#1659)
* add: static data for repos containing contracts * feat: implement latest OSS checks logic
- Loading branch information
Showing
6 changed files
with
76 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
warehouse/dbt/models/marts/superchain/metrics/rf4_check_oss_requirements.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
with repo_stats as ( | ||
select | ||
project_id, | ||
count(distinct url) as total_repos, | ||
sum(case | ||
when license_check = 'Permissive' and repo_activity_check = 'OK' then 1 | ||
else 0 | ||
end) as eligible_repos | ||
from {{ ref('rf4_repo_stats_by_project') }} | ||
group by project_id | ||
) | ||
|
||
select | ||
project_id, | ||
'check_oss_requirements' as metric, | ||
cast((eligible_repos = total_repos) as int64) as amount | ||
from repo_stats | ||
where total_repos > 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 0 additions & 89 deletions
89
warehouse/dbt/models/marts/superchain/rf4_project_verification.sql
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters