credit_requests
Requests for research credits: a new grant, or more time on one.
An organization's owner or admin asks; an administrator decides. A grant request carries a plan of the analyses it is for, priced by the same function that prices a run, so the estimate and the eventual runs agree. The requester enters the amount they ask for; the administrator sees the plan, the estimate and the amount side by side.
CreditEstimate
pydantic-model
¶
Bases: BaseModel
What a plan would cost, priced as its runs would be.
Config:
frozen:True
Fields:
-
rows(list[CreditEstimateRow]) -
computed_credits(NonNegativeInt) -
buffer_pct(int) -
suggested_credits(NonNegativeInt)
CreditEstimateRequest
pydantic-model
¶
Bases: BaseModel
A plan to price, with the buffer to add.
Fields:
-
plan(CreditPlan) -
buffer_pct(int)
buffer_pct = 10
pydantic-field
¶
Margin added to the computed cost, in percent.
CreditEstimateRow
pydantic-model
¶
Bases: BaseModel
The cost of one row of a plan.
Config:
frozen:True
Fields:
-
analysis_config_id(str) -
name(str) -
runs(NonNegativeInt) -
credits_per_run(NonNegativeInt) -
credits(NonNegativeInt)
CreditPlan
pydantic-model
¶
Bases: BaseModel
What a grant is for: studies, their length, and the analyses to run.
Config:
frozen:True
Fields:
-
studies(int) -
average_recording_hours(float) -
rows(list[CreditPlanRow])
CreditPlanRow
pydantic-model
¶
Bases: BaseModel
One analysis in a plan, and how often it runs on each study.
Config:
frozen:True
Fields:
-
analysis_config_id(str) -
runs_per_study(int)
CreditRequestDecision
pydantic-model
¶
Bases: BaseModel
An administrator's decision on a request, as the organization sees it.
Config:
frozen:True
Fields:
-
decision(Literal['approved', 'declined']) -
amount(int | None) -
expires_at(datetime | None) -
reason(CreditRequestDeclineReason | None) -
decided_at(datetime)
CreditRequestOut
pydantic-model
¶
Bases: BaseModel
A request for research credits, as its organization sees it.
Config:
frozen:True
Fields:
-
id(UUID) -
org_id(UUID) -
kind(CreditRequestKind) -
status(CreditRequestStatus) -
grant_id(UUID | None) -
requested_by(UUID | None) -
requested_by_name(str | None) -
plan(CreditPlan | None) -
computed_credits(NonNegativeInt | None) -
buffer_pct(int | None) -
requested_credits(NonNegativeInt | None) -
term_months(int) -
text(str) -
created_at(datetime) -
decision(CreditRequestDecision | None)
computed_credits = None
pydantic-field
¶
The plan's cost when it was submitted.
grant_id = None
pydantic-field
¶
The grant an extension is for.
plan = None
pydantic-field
¶
A grant request's plan; null for an extension.
requested_by = None
pydantic-field
¶
Who asked; null once their account is gone.
text
pydantic-field
¶
The purpose of a grant, or the reason for an extension.
CreditRequestPage
pydantic-model
¶
Bases: BaseModel
One page of requests, newest first.
Config:
frozen:True
Fields:
-
requests(list[CreditRequestOut]) -
total(int)
ExtensionRequestCreate
pydantic-model
¶
GrantRequestCreate
pydantic-model
¶
Bases: BaseModel
A request for a new research grant.
Fields:
-
plan(CreditPlan) -
buffer_pct(int) -
requested_credits(int) -
term_months(int) -
purpose(str)