-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
55 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,4 +75,5 @@ def create_tables(): | |
"Projection": {"ProjectionType": "ALL"}, | ||
}, | ||
], | ||
BillingMode="PAY_PER_REQUEST", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
import humps | ||
from pydantic import BaseModel | ||
from pydantic import BaseModel, ConfigDict | ||
|
||
|
||
def to_camel(string): | ||
return humps.camelize(string) | ||
|
||
|
||
class LuminaModel(BaseModel): | ||
class Config: | ||
alias_generator = to_camel | ||
allow_population_by_field_name = True | ||
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,8 @@ | |
class SubmitterRequest(LuminaModel): | ||
id: UUID = FIELD_SUBMITTER_ID | ||
name: str = FIELD_SUBMITTER_NAME | ||
year_of_graduation: int | None = Field(example=1999) | ||
email: EmailStr | None = Field(example="[email protected]") | ||
year_of_graduation: int | None = Field(example=1999, default=None) | ||
email: EmailStr | None = Field(example="[email protected]", default=None) | ||
|
||
def to_model(self) -> SubmitterModel: | ||
return SubmitterModel( | ||
|
@@ -49,6 +49,7 @@ class BaseSubmissionRequest(LuminaModel): | |
submitter: SubmitterRequest | None = Field( | ||
description="The submitter of the submission if, and only if, the submission " | ||
"is anonymous. If the user is logged in this field should be omitted.", | ||
default=None, | ||
) | ||
|
||
|
||
|
@@ -59,6 +60,7 @@ class BaseSubmissionRequest(LuminaModel): | |
title="Target ID", | ||
description="The ID of the target", | ||
example="00_01/romeo_and_juliet", | ||
default=None, | ||
) | ||
FIELD_TARGET_NAME = Field( | ||
title="Target Name", | ||
|
@@ -71,7 +73,7 @@ class BaseSubmissionRequest(LuminaModel): | |
example="https://history.newtheatre.org.uk/00_01/romeo_and_juliet", | ||
) | ||
FIELD_SUBJECT = Field( | ||
description="The subject of the submission", example="The lighting" | ||
description="The subject of the submission", example="The lighting", default=None | ||
) | ||
FIELD_MESSAGE = Field( | ||
title="Message", | ||
|
@@ -135,7 +137,7 @@ class GitHubIssueResponse(LuminaModel): | |
title: str | ||
created_at: datetime.datetime | ||
updated_at: datetime.datetime | ||
closed_at: datetime.datetime | None | ||
closed_at: datetime.datetime | None = None | ||
comments: int | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters