usdigitalresponse / grants-ingest

Ingests and indexes data related to grants
Apache License 2.0
6 stars 2 forks source link

[Forecasted Pipeline] Add forecast-specific fields to OpenAPI schema definition #874

Open TylerHendrickson opened 1 month ago

TylerHendrickson commented 1 month ago

Blocked by

N/A

Blocks

Why is this issue important?

We want to ensure that published GrantModificationEvents emitted by this service are well-defined for downstream consumers. Now that we are planning to include data about forecasted grant opportunities in these events, the OpenAPI schema definition should be updated to reflect the new data fields.

Current State

Fields specific to forecasted grant opportunities are absent from the openapi/openapi.yaml file, which serves as the official spec for events published to AWS EventBridge by the PublishGrantEvents Lambda function.

Expected State

The OpenAPI schema includes definitions for the new fields. (See https://github.com/usdigitalresponse/grants-ingest/issues/330, along with https://github.com/usdigitalresponse/usdr-gost/issues/3212#issue-2372968120 for more details) on the fields that need to be documented.

Implementation Plan

Update the Grant object type schema definition.

While not set in stone (I'm certainly open to discussion), consider the following proposal for how to incorporate the new fields:

Relevant Code Snippets

No response

masimons commented 1 month ago

@TylerHendrickson which field does forecasted_estimations map to in the list of new columns to be added in 3212 ? Just trying to understand the diff between this list and the one Jeff drafted in that ticket, where there are proposed columns estimated_synopsis_close_date_explanation and is_forecasted.

TylerHendrickson commented 1 month ago

@masimons Just recapping what we discussed in the meeting today:

TylerHendrickson commented 1 month ago

@masimons Just recapping what we discussed in the meeting today:

masimons commented 1 month ago

@TylerHendrickson Thanks for elaborating on this! I agree that is_forecasted is probably better off derived.

While I was originally thinking that it might be nice to have a bit of historical data about estimations so that we could, at some point, get an idea of how "far off" the estimated dates are, your point about those fields eventually aligning would remove that ability. The more I think about this, the more I think that "re-using" current fields is the cleanest way to go.

That being said, if an estimated grant is removed by grants.gov before the open date, then our system wouldn't know about it from what I understand, and we may erroneously treat it as active when the open date rolls around. Perhaps an edge case that won't ever happen, but, we can just use a different field for the estimated open date, which may be what you had in mind anyways.

Looks like this is at least a possibility fwiw - dropping this link for future reference: https://apply07.grants.gov/help/html/help/index.htm#t=Grantors%2FDeleteGrantOpportunities.htm

TylerHendrickson commented 1 month ago

@masimons

The more I think about this, the more I think that "re-using" current fields is the cleanest way to go.

I think I agree; I'll update the proposal on this OP for this issue. Thanks for the feedback!

(cc @joshgarza – I'll flag in a separate comment once I've made those changes to the ticket so you know this is ready for work.)

TylerHendrickson commented 4 weeks ago

Sprinkling some documentation assets around:

masimons commented 3 weeks ago

@TylerHendrickson just wondering if you and josh were able to chat this week about how to model the estimated end date and open/post date for the forecasted grants? have we solidified that yet?

TylerHendrickson commented 2 weeks ago

@masimons Just a heads-up that the implementation plan for this ticket has been revised (should be for the last time).