-
Notifications
You must be signed in to change notification settings - Fork 0
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
Finish integrating new parser into pipeline #186
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "parsed", | ||
srcs = ["parsed.go"], | ||
importpath = "github.com/RMI/pacta/async/parsed", | ||
visibility = ["//visibility:public"], | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Package parsed just holds the domain types for dealing with the output of the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps link to the repo that this relies upon? It's not obvious from this comment that this describes the contours of an external dependency. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GC, done |
||
// ParsePortfolio async task. The code that generates output in this structure | ||
// lives in [1], which provides the base image for our parser binary. | ||
// | ||
// [1] https://github.com/RMI-PACTA/workflow.portfolio.parsing | ||
package parsed | ||
|
||
type SourceFile struct { | ||
InputFilename string `json:"input_filename"` | ||
InputMD5 string `json:"input_md5"` | ||
SystemInfo SystemInfo `json:"system_info"` | ||
InputEntries int `json:"input_entries"` | ||
GroupCols []string `json:"group_cols"` | ||
SubportfoliosCount int `json:"subportfolios_count"` | ||
Portfolios []Portfolio `json:"portfolios"` | ||
Errors [][]string `json:"errors"` | ||
} | ||
|
||
type SystemInfo struct { | ||
Timestamp string `json:"timestamp"` | ||
Package string `json:"package"` | ||
PackageVersion string `json:"packageVersion"` | ||
RVersion string `json:"RVersion"` | ||
Dependencies []Dependency `json:"dependencies"` | ||
} | ||
|
||
type Dependency struct { | ||
Package string `json:"package"` | ||
Version string `json:"version"` | ||
} | ||
|
||
type Portfolio struct { | ||
OutputMD5 string `json:"output_md5"` | ||
OutputFilename string `json:"output_filename"` | ||
OutputRows int `json:"output_rows"` | ||
PortfolioName string `json:"portfolio_name"` | ||
InvestorName string `json:"investor_name"` | ||
} |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this step fails, we probably want a more complete accounting of why. Would logging the full manifest as a string if this fails be inappropriate? Maybe upload it to a cloud bucket?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great call. The R code actually already does log the output
processed_porfolios.json
file to stdout (or stderr), so this will be covered by #185