Skip to content

Commit

Permalink
Merge branch 'pegasystems:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufuyanik1 authored Sep 20, 2023
2 parents 4778866 + fe3e735 commit d6c3496
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 5 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/mend-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Reference: https://github.com/mend-toolkit/mend-examples/blob/main/Unified%20Agent/CI-CD/GitHub.yml

name: Mend Unified Agent Release Scan
on:
workflow_dispatch:
push:
branches:
- 'master'
jobs:
mendscan:
env:
WS_APIKEY: ${{secrets.MEND_APIKEY}}
WS_USERKEY: ${{secrets.MEND_USERKEY}}
WS_WSS_URL: ${{secrets.MEND_WS_WSS_URL}}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
# - name: Build with Gradle
# run: ./gradlew -Prelease.useLastTag=false clean build
- name: Mend Unified Agent Scan
env:
WS_PRODUCTNAME: ${{vars.MEND_PRODUCT_NAME}}
WS_PROJECTNAME: ${{github.event.repository.name}}_${{github.ref_name}}
WS_GENERATEPROJECTDETAILSJSON: true
WS_GRADLE_ADDITIONALARGUMENTS: -Prelease.useLastTag=false
run: |
echo Downloading Mend Unified Agent
curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
if [[ "$(curl -sL https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar.sha256)" != "$(sha256sum wss-unified-agent.jar)" ]] ; then
echo "Integrity Check Failed"
else
echo "Integrity Check Passed"
echo Starting Unified Agent Scan
java -jar wss-unified-agent.jar
fi
- name: 'Upload WhiteSource folder'
uses: actions/upload-artifact@v2
with:
name: Mend
path: whitesource
retention-days: 14
- name: 'Upload Mend folder if failure'
uses: actions/upload-artifact@v2
if: failure()
with:
name: Mend
path: whitesource
retention-days: 14
26 changes: 22 additions & 4 deletions examples/datamart/modelreport.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ The Lift chart is derived from this and shows the ratio of the cumulative gain a
activeClassifierBins <- classifierBins[(isInActiveRange)]
if (nrow(activeClassifierBins) >= 1 & (sum(activeClassifierBins$BinNegatives) + sum(activeClassifierBins$BinPositives) > 0)) {
if (nrow(activeClassifierBins) >= 2 & (sum(activeClassifierBins$BinNegatives) + sum(activeClassifierBins$BinPositives) > 0)) {
cumGains <- plotCumulativeGains(activeClassifierBins)
cumLift <- plotCumulativeLift(activeClassifierBins)
Expand Down Expand Up @@ -314,6 +314,19 @@ can be configured with one of the parameters in the Yaml header of this notebook

```{r, results="asis", fig.height = 3, fig.width = 6, fig.align = "center"}
plotBinningPM <- function(bins)
{
ggplot(bins[,BinSymbol := factor(BinSymbol, levels=BinSymbol)], aes(BinSymbol, Lift-1)) +
geom_col(aes(fill=I(ifelse(Lift < 1, "#A00005", "#5F9F36")),
alpha=I(ifelse(BinPositives < 25, 0.4, 1.0))),
width=0.5) +
coord_flip() +
ylab("Propensity Lift") + xlab("") +
scale_x_discrete(limits=rev) +
scale_y_continuous(labels=percent) +
geom_hline(yintercept = 0, linetype="dashed")
}
# to print all instead of only the active ones, change condition to: EntryType != "Classifier"
for (f in unique(allPredictorBins[!params$predictordetails_activeonly | EntryType == "Active"]$PredictorName)) {
Expand All @@ -324,7 +337,7 @@ for (f in unique(allPredictorBins[!params$predictordetails_activeonly | EntryTyp
} else {
cat("##", f, fill=T) # Predictor name
cat("<table><tr><th>Info</th><th>Binning</th></tr>", fill=T)
cat('<table style="width: 100%"><tr><th>Info</th><th>Binning</th></tr>', fill=T)
# write.csv(predictorBinning, "tempbin.csv")
Expand All @@ -337,16 +350,18 @@ for (f in unique(allPredictorBins[!params$predictordetails_activeonly | EntryTyp
}
# Table prelude with some overall info about the predictor
cat("<tr><td>", fill=T)
cat('<tr><td width="40%">', fill=T)
printADMPredictorInfo(f, predictorBinning, extraPredInfo)
cat("</td>", fill=T)
# colour names: http://sape.inf.usi.ch/quick-reference/ggplot2/colour
cat("<td>", fill=T)
cat('<td width="60%">', fill=T)
if (nrow(predictorBinning) > 1) {
p <- plotBinning(predictorBinning)+ ggtitle(f)
print(p)
p <- plotBinningPM(predictorBinning)+ ggtitle(f)
print(p)
}
cat("</td></tr></table>", fill=T)
Expand All @@ -356,3 +371,6 @@ for (f in unique(allPredictorBins[!params$predictordetails_activeonly | EntryTyp
}
```




2 changes: 1 addition & 1 deletion python/pdstools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Python pdstools"""

__version__ = "3.2.2"
__version__ = "3.2.3"

from polars import enable_string_cache

Expand Down

0 comments on commit d6c3496

Please sign in to comment.