Skip to content

Commit

Permalink
generating pwsh scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
lmgeorge committed Nov 13, 2019
1 parent f5cafdc commit 3ba0466
Show file tree
Hide file tree
Showing 126 changed files with 1,214 additions and 370 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ output
status.txt
log
*.temp.json
Std*.txt

# Python
.virtualenv
Expand Down
5 changes: 5 additions & 0 deletions .scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plotAllCharts": {
"commandline": ""
}
}
11 changes: 11 additions & 0 deletions Scenarios/Generic/DensityScaling/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "Density Scaling",
"report": "output/InsetChart.json"
},
"plotSIRChannels": {
"commandline": "python ../../../bin/plotSIRChannels.py -c I -t \"Density Scaling\" output/InsetChart.json",
"script": "plotSIRChannels.py"
}
}
9 changes: 5 additions & 4 deletions Scenarios/Generic/DensityScaling/plotAllCharts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "Density Scaling"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
11 changes: 11 additions & 0 deletions Scenarios/Generic/HINT_AgeAndAccess/A_BaselineOutbreak/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plotPropertyReport": {
"commandline": "python ../../../../bin/plotPropertyReport.py output/PropertyReport.json",
"script": "plotPropertyReport.py"
},
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "HINT - Baseline Outbreak",
"report": "output/InsetChart.json"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "HINT - Baseline Outbreak"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
11 changes: 11 additions & 0 deletions Scenarios/Generic/HINT_AgeAndAccess/B_AgeTargetedVaccine/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plotPropertyReport": {
"commandline": "python ../../../../bin/plotPropertyReport.py output/PropertyReport.json",
"script": "plotPropertyReport.py"
},
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "HINT - Age-Targeted Vaccine",
"report": "output/InsetChart.json"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "HINT - Age-Targeted Vaccine"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plotPropertyReport": {
"commandline": "python ../../../../bin/plotPropertyReport.py output/PropertyReport.json",
"script": "plotPropertyReport.py"
},
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "HINT - Access-Targeted Vaccine",
"report": "output/InsetChart.json"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "HINT - Access-Targeted Vaccine"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
11 changes: 11 additions & 0 deletions Scenarios/Generic/HINT_SeattleCommuting/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plotPropertyReport": {
"commandline": "python ../../../bin/plotPropertyReport.py output/PropertyReport.json -m",
"script": "plotPropertyReport.py"
},
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "HINT Seattle Commuting",
"report": "output/InsetChart.json"
}
}
9 changes: 5 additions & 4 deletions Scenarios/Generic/HINT_SeattleCommuting/plotAllCharts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "HINT Seattle Commuting"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
11 changes: 11 additions & 0 deletions Scenarios/Generic/SEIR/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "Generic SEIR",
"report": "output/InsetChart.json"
},
"plotSIRChannels": {
"commandline": "python ../../../bin/plotSIRChannels.py -c SEIR -t \"Generic SEIR\" output/InsetChart.json",
"script": "plotSIRChannels.py"
}
}
9 changes: 5 additions & 4 deletions Scenarios/Generic/SEIR/plotAllCharts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "Generic SEIR"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
11 changes: 11 additions & 0 deletions Scenarios/Generic/SEIRS/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "SEIRS",
"report": "output/InsetChart.json"
},
"plotSIRChannels": {
"commandline": "python ../../../bin/plotSIRChannels.py -c SEIRW -t \"SEIRS\" output/InsetChart.json",
"script": "plotSIRChannels.py"
}
}
9 changes: 5 additions & 4 deletions Scenarios/Generic/SEIRS/plotAllCharts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "SEIRS"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
11 changes: 11 additions & 0 deletions Scenarios/Generic/SEIR_VitalDynamics/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "Generic SEIR with vital dynamics",
"report": "output/InsetChart.json"
},
"plotSIRChannels": {
"commandline": "python ../../../bin/plotSIRChannels.py -c SEIR -t \"Generic SEIR with vital dynamics\" output/InsetChart.json",
"script": "plotSIRChannels.py"
}
}
9 changes: 5 additions & 4 deletions Scenarios/Generic/SEIR_VitalDynamics/plotAllCharts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "Generic SEIR with vital dynamics"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
11 changes: 11 additions & 0 deletions Scenarios/Generic/SI/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "SI",
"report": "output/InsetChart.json"
},
"plotSIRChannels": {
"commandline": "python ../../../bin/plotSIRChannels.py -c SI -t \"SI\" output/InsetChart.json",
"script": "plotSIRChannels.py"
}
}
9 changes: 5 additions & 4 deletions Scenarios/Generic/SI/plotAllCharts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "SI"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
11 changes: 11 additions & 0 deletions Scenarios/Generic/SIR/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "SIR",
"report": "output/InsetChart.json"
},
"plotSIRChannels": {
"commandline": "python ../../../bin/plotSIRChannels.py -c SIR -t \"SIR\" output/InsetChart.json",
"script": "plotSIRChannels.py"
}
}
9 changes: 5 additions & 4 deletions Scenarios/Generic/SIR/plotAllCharts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "SIR"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
11 changes: 11 additions & 0 deletions Scenarios/Generic/SIRS/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "SIRS",
"report": "output/InsetChart.json"
},
"plotSIRChannels": {
"commandline": "python ../../../bin/plotSIRChannels.py -c SIRW -t \"SIRS\" output/InsetChart.json",
"script": "plotSIRChannels.py"
}
}
9 changes: 5 additions & 4 deletions Scenarios/Generic/SIRS/plotAllCharts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "SIRS"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
11 changes: 11 additions & 0 deletions Scenarios/Generic/SIS/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "SIS",
"report": "output/InsetChart.json"
},
"plotSIRChannels": {
"commandline": "python ../../../bin/plotSIRChannels.py -c SI -t \"SIS\" output/InsetChart.json",
"script": "plotSIRChannels.py"
}
}
9 changes: 5 additions & 4 deletions Scenarios/Generic/SIS/plotAllCharts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "SIS"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
15 changes: 15 additions & 0 deletions Scenarios/Generic/Vaccinations/A_BaselineOutbreak/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "Vaccinations - Baseline",
"report": "output/InsetChart.json"
},
"plotSIRChannels": {
"commandline": "python ../../../../bin/plotSIRChannels.py -c SIR -t \"Vaccinations - Baseline\" output/InsetChart.json",
"script": "plotSIRChannels.py"
},
"plotPropertyReport": {
"commandline": "python ../../../../bin/plotPropertyReport.py -n output/PropertyReport.json",
"script": "plotPropertyReport.py"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "Vaccinations - Baseline"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
15 changes: 15 additions & 0 deletions Scenarios/Generic/Vaccinations/B_Vaccinations/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "Vaccinations - Vaccination All",
"report": "output/InsetChart.json"
},
"plotSIRChannels": {
"commandline": "python ../../../../bin/plotSIRChannels.py -c SIR -t \"Vaccinations - Vaccination All\" output/InsetChart.json",
"script": "plotSIRChannels.py"
},
"plotPropertyReport": {
"commandline": "python ../../../../bin/plotPropertyReport.py -n output/PropertyReport.json",
"script": "plotPropertyReport.py"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ Push-Location -Path $PSScriptRoot

. ../../../../scripts/helpers.ps1

$chart = (Join-Path "output" "InsetChart.json")
$pyscript = (Join-Path "$BIN_ROOT" "plotAllCharts.py")
$pytitle = "Vaccinations - Vaccination All"
& python $pyscript $chart "$pytitle"
$sc = (Get-Content -Path ".scenario" | ConvertFrom-Json -AsHashtable)
$key = (Split-Path $MyInvocation.MyCommand.Name -LeafBase)
$config = $sc[$key]
$pyscript = (Join-Path "$BIN_ROOT" $config.script)
& python $pyscript --title="$($config.title)" $config.report
15 changes: 15 additions & 0 deletions Scenarios/Generic/Vaccinations/C_TargetedVaccinations/.scenario
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"plotAllCharts": {
"script": "plotAllCharts.py",
"title": "Vaccinations - Easy Targeted",
"report": "output/InsetChart.json"
},
"plotSIRChannels": {
"commandline": "python ../../../../bin/plotSIRChannels.py -c SIR -t \"Vaccinations - Easy Targeted\" output/InsetChart.json",
"script": "plotSIRChannels.py"
},
"plotPropertyReport": {
"commandline": "python ../../../../bin/plotPropertyReport.py -n output/PropertyReport.json",
"script": "plotPropertyReport.py"
}
}
Loading

0 comments on commit 3ba0466

Please sign in to comment.