prepare_report_list <- function(path_report_list) {
  out <- path("..", "data-prep", "report_list", "part-0.parquet")
  dir_create(path_dir(out))

  read_csv(
    path_report_list,
    col_types = cols(
      year = col_integer(),
      report_id = col_integer()
    )
  ) |>
    mutate(sboe_id = fix_sboe_id_missing(sboe_id, report_id)) |>
    spot_fix_report_list() |>
    arrow::write_parquet(out)

  out
}

out_report_list <- function(report_list) {
  out <- path("data-out", "reports", "reports.parquet")
  dir_create(path_dir(out))

  report_list |>
    mutate(doc_order = as.integer(doc_name), .after = doc_name) |>
    arrow::write_parquet(out)

  dirname(out)
}
