Skip to content

Commit 00fcf75

Browse files
authored
Merge pull request #688 from The-Strategy-Unit/654-time-profiles-selection
Handle time profiles in v5.2 upgrade and default params
2 parents 3444efb + bb38bc1 commit 00fcf75

3 files changed

Lines changed: 10 additions & 17 deletions

File tree

app.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,15 @@ upgrade_params.v5.0 <- function(p) {
192192
upgrade_params(p)
193193
}
194194

195+
upgrade_params.v5.1 <- function(p) {
196+
# Remove time-profile mappings
197+
198+
p[["time_profile_mappings"]] <- NULL
199+
200+
class(p) <- p$app_version <- "v5.2"
201+
upgrade_params(p)
202+
}
203+
195204
# Insert above a new upgrade step for each new major or minor version
196205

197206
## LOCATE PARAMS ----

default_params.json

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,6 @@
6363
"ip": {},
6464
"op": {}
6565
},
66-
"time_profile_mappings": {
67-
"baseline_adjustment": "none",
68-
"activity_avoidance": {
69-
"ip": {},
70-
"op": {},
71-
"aae": {}
72-
},
73-
"efficiencies": {
74-
"ip": {},
75-
"op": {}
76-
},
77-
"expat": "linear",
78-
"repat_local": "linear",
79-
"repat_nonlocal": "linear",
80-
"non-demographic_adjustment": "none",
81-
"waiting_list_adjustment": "linear"
82-
},
8366
"reasons": {
8467
"baseline_adjustment": "",
8568
"demographic_factors": "",

deploy.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ deploy <- function(server, app_id, app_version_choices) {
5757

5858
# only use the versions that are deployed to the new server currently
5959
app_version_choices <- c(
60+
"v5.2",
6061
"v5.1",
6162
"v5.0",
6263
"v4.4",

0 commit comments

Comments
 (0)