Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions data/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"slug": "a-speaker",
"submissions": ["A1B2C3"],
"affiliation": "A Company",
"occupation": "An occupation",
"homepage": "https://example.com",
"twitter_url": "https://x.com/B4D5E6",
"linkedin_url": "https://linkedin.com/in/B4D5E6",
Expand All @@ -44,6 +45,7 @@
| `slug` | `string` | URL-safe speaker name |
| `submissions` | `array[string]` | Codes of sessions the speaker is involved in |
| `affiliation` | `string` \| `null` | Affiliated institution or organization |
| `occupation` | `string` \| `null` | Position, Job or Occupation |
| `homepage` | `string` \| `null` | Personal or professional homepage |
| `twitter_url` | `string` \| `null` | Normalized Twitter/X profile URL |
| `mastodon_url` | `string` \| `null` | Normalized Mastodon profile URL |
Expand Down
1 change: 1 addition & 0 deletions data/examples/europython/speakers.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"slug": "a-speaker",
"submissions": ["A8CD3F"],
"affiliation": "A Company",
"occupation": "An occupation",
"homepage": null,
"gitx_url": "https://github.com/f3dc8a",
"linkedin_url": "https://linkedin.com/in/f3dc8a",
Expand Down
1 change: 1 addition & 0 deletions src/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

class SpeakerQuestion:
affiliation = "Company/Organization/Educational Institution"
occupation: "Position, Job or Occupation"
homepage = "Social (Homepage)"
twitter = "Social (X/twitter)"
bluesky = "Social (Bluesky)"
Expand Down
4 changes: 4 additions & 0 deletions src/models/europython.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class EuroPythonSpeaker(BaseModel):

# Extracted
affiliation: str | None = None
occupation: str | None = None
homepage: str | None = None
twitter_url: str | None = None
mastodon_url: str | None = None
Expand All @@ -48,6 +49,9 @@ def extract_answers(cls, values) -> dict:
if answer.question_text == SpeakerQuestion.affiliation:
values["affiliation"] = answer.answer_text

if answer.question_text == SpeakerQuestion.occupation:
values["occupation"] = answer.answer_text

if answer.question_text == SpeakerQuestion.homepage:
values["homepage"] = answer.answer_text

Expand Down