Skip to content

Commit

Permalink
Merge with dev to get more robust features and augur integration
Browse files Browse the repository at this point in the history
Signed-off-by: Isaac Milarsky <[email protected]>
  • Loading branch information
IsaacMilarky committed Jan 23, 2024
2 parents db71f61 + 183f71d commit fff99fe
Show file tree
Hide file tree
Showing 32 changed files with 3,919 additions and 1,195 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "run-linting-checks"
on:
pull_request:
branches: [main, dev]

jobs:
run-pylint:
name: runner / pylint
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dciborow/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
level: warning
glob_pattern: "**/*.py"
filter_mode: "file"
25 changes: 21 additions & 4 deletions ListOfMetrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

Simple metrics:

1. githubGraphqlSimpleCounts - Gets counts of things like commits, issues, pull requests, forks, etc. for a repo. A simple fetch operation
1. githubGraphqlSimpleCounts - Gets counts of things like commits, issues, pull requests, forks, etc. for a repo. A simple fetch operation - [x]


## Perioidic metrics

Weekly Diff endpoints:

1. https://oss-augur.readthedocs.io/en/dev/rest-api/api.html#operation/New%20Contributors%20of%20Commits%20(Repo)
2. https://oss-augur.readthedocs.io/en/dev/rest-api/api.html#operation/Issues%20New%20(Repo)
1. https://oss-augur.readthedocs.io/en/dev/rest-api/api.html#operation/New%20Contributors%20of%20Commits%20(Repo) [x]
2. https://oss-augur.readthedocs.io/en/dev/rest-api/api.html#operation/Issues%20New%20(Repo) [x]
3. pull_request_average_commit_counts
4. pull_request_average_time_to_responses_and_close
5. https://oss-augur.readthedocs.io/en/dev/rest-api/api.html#operation/New%20Contributors%20(Repo%20Group)
Expand All @@ -21,7 +21,7 @@ Weekly Diff endpoints:

## Activity Metrics:

1. Top Committers (Both Repo and Repo group) - https://oss-augur.readthedocs.io/en/main/rest-api/api.html#operation/Top%20Committers%20(Repo%20Group)
1. Top Committers (Both Repo and Repo group) - https://oss-augur.readthedocs.io/en/main/rest-api/api.html#operation/Top%20Committers%20(Repo%20Group) [x]

2. Predominant languages and License info

Expand Down Expand Up @@ -56,3 +56,20 @@ The final badge will be calculated based on thresholding these measures into qua
High contributor growth is defined as > ~5 over six months?

High user growth is defined as > ~5 over six months?


## For v1

Utilize Existing Augur visualizations
First response for closed pr https://oss-augur.readthedocs.io/en/main/rest-api/api.html#operation/Days%20to%20First%20Response%20for%20Closed%20Pull%20Requests%20Based%20on%20Merged%20Status - ONLY WORKS FOR SOME REPOS


Total Lines https://oss-augur.readthedocs.io/en/main/rest-api/api.html#operation/Total%20Lines%20(repo) - NOT WORKING
Comment Lines https://oss-augur.readthedocs.io/en/main/rest-api/api.html#operation/Total%20Comment%20Lines%20(repo) - NOT FOUND

https://ai.chaoss.io/api/unstable/complexity/project_lines/repos/1 - Is not found

Blank Lines https://oss-augur.readthedocs.io/en/main/rest-api/api.html#operation/Total%20Blank%20Lines%20(repo)
- NOT FOUND (Same as above)

New Issues https://oss-augur.readthedocs.io/en/dev/rest-api/api.html#operation/Issues%20New%20(Repo) - WORKING - [x]
38 changes: 17 additions & 21 deletions app/.eleventy.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
const fs = require("fs")
const path = require("path")
const Image = require("@11ty/eleventy-img")
const lucideIcons = require("@grimlink/eleventy-plugin-lucide-icons");
const { baseurl } = require("./site/_data/site");
require("dotenv").config()
const lucideIcons = require("@grimlink/eleventy-plugin-lucide-icons")

async function resizeImage(src, sizes, outputFormat = "png") {
const stats = await Image(src, {
Expand Down Expand Up @@ -54,13 +50,13 @@ module.exports = function (eleventyConfig) {
return url
})

eleventyConfig.addFilter("findObject", function(array, value) {
return array.find(item => item["name"] === value);
});
eleventyConfig.addFilter("findObject", function (array, value) {
return array.find((item) => item["name"] === value)
})

eleventyConfig.addFilter("findProjectsInOrg", function(array, value) {
return array.filter(item => item["owner"] === value);
});
eleventyConfig.addFilter("findProjectsInOrg", function (array, value) {
return array.filter((item) => item["owner"] === value)
})

// Create a collection of items without permalinks so that we can reference them
// in a separate shortcode to pull in partial content directly
Expand All @@ -75,19 +71,19 @@ module.exports = function (eleventyConfig) {
"site/_includes/js": "assets/js",
"site/_graphs": "assets/img/graphs",
"node_modules/@uswds/uswds/dist/img": "assets/img",
"node_modules/@uswds/uswds/dist/fonts": "fonts"
});
"node_modules/@uswds/uswds/dist/fonts": "fonts",
})

eleventyConfig.setLiquidOptions({ outputEscape: "escape" })
eleventyConfig.addPlugin(lucideIcons, {
"class": "custom-class",
"width": 17,
"height": 17,
"stroke": "currentColor",
"stroke-width": 2
});
class: "custom-class",
width: 17,
height: 17,
stroke: "currentColor",
"stroke-width": 2,
})

const pathPrefix = process.env.NODE_ENV === "production" ? "/metrics" : "";
const pathPrefix = process.env.NODE_ENV === "production" ? "/metrics" : ""

return {
dir: {
Expand All @@ -98,6 +94,6 @@ module.exports = function (eleventyConfig) {
},
templateFormats: ["html", "md", "liquid", "11ty.js"],
passthroughFileCopy: true,
pathPrefix
pathPrefix,
}
}
8 changes: 8 additions & 0 deletions app/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
dist
.cache
*.json.liquid
*.txt.liquid
site/_posts
site/_data
site/_includes/css
site/_includes/js
Loading

0 comments on commit fff99fe

Please sign in to comment.