Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(app): #79 allow specifying project in config #81

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion main.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ for (portfolio_name in portfolio_names) {
stop("Please ensure that each index dataset contains a single unique value for `investor_name`")
}

if (is.null(config[["project_code"]])) {
project_code <- investor_name
} else {
project_code <- config[["project_code"]]
}

logger::log_debug("Defining portfolio parameters.")
config_list <-
list(
Expand All @@ -148,7 +154,7 @@ for (portfolio_name in portfolio_names) {
investor_name = investor_name,
portfolio_name = portfolio_name,
language = "EN",
project_code = investor_name,
project_code = project_code,
holdings_date = pacta_financial_timestamp
)
)
Expand Down