RMI-PACTA / workflow.portfolio.parsing

Other
0 stars 0 forks source link

Feat/12 change metadata output format #15

Closed AlexAxthelm closed 9 months ago

AlexAxthelm commented 9 months ago

Changes grain of output format of reexport_portfolio() from a list of exported portfolios, each of which includes information about the input file, to a list of information about the input file, which includes a list of exported subportfolios:

Previously (abbreviated example):

list(
  list(
    portfolio_name = portfolio_name1
    input_filename = input_filename1
  ),
  list(
    portfolio_name = portfolio_name2
    input_filename = input_filename1
  ),
)

now:

list(
  input_filename = input_filename1
  portfolios = list(
    list(
      portfolio_name = portfolio_name1
    ),
    list(
      portfolio_name = portfolio_name2
    )
  )
)

This serves the purpose of a consistent format for files that cannot be re-exported properly (pacta.portfolio.import::read_portfolio.csv()returnsNA`), where the input file infromation can include error messages that can be surfaced to the user.

list(
  list(
    input_filename = input_filename1
    portfolios = list(
      list(
        portfolio_name = portfolio_name1
      )
    )
  ),
  list(
    input_filename = input_filename2
    errors = list(
      "Some useful Error message"
    )
  )
)

Closes #12

github-actions[bot] commented 9 months ago

Docker image from this PR (bb8af77e2fafc62e17bee2527490dcd6f20580dd) created

docker pull ghcr.io/rmi-pacta/workflow.portfolio.parsing:pr15