Skip to content

Commit 937286f

Browse files
authored
Merge pull request #3 from pyladies/add_occupation
Add occupation field
2 parents b0606c2 + aad0a07 commit 937286f

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

data/examples/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"slug": "a-speaker",
2222
"submissions": ["A1B2C3"],
2323
"affiliation": "A Company",
24+
"occupation": "An occupation",
2425
"homepage": "https://example.com",
2526
"twitter_url": "https://x.com/B4D5E6",
2627
"linkedin_url": "https://linkedin.com/in/B4D5E6",
@@ -44,6 +45,7 @@
4445
| `slug` | `string` | URL-safe speaker name |
4546
| `submissions` | `array[string]` | Codes of sessions the speaker is involved in |
4647
| `affiliation` | `string` \| `null` | Affiliated institution or organization |
48+
| `occupation` | `string` \| `null` | Position, Job or Occupation |
4749
| `homepage` | `string` \| `null` | Personal or professional homepage |
4850
| `twitter_url` | `string` \| `null` | Normalized Twitter/X profile URL |
4951
| `mastodon_url` | `string` \| `null` | Normalized Mastodon profile URL |

data/examples/europython/speakers.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"slug": "a-speaker",
88
"submissions": ["A8CD3F"],
99
"affiliation": "A Company",
10+
"occupation": "An occupation",
1011
"homepage": null,
1112
"gitx_url": "https://github.com/f3dc8a",
1213
"linkedin_url": "https://linkedin.com/in/f3dc8a",

src/misc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
class SpeakerQuestion:
55
affiliation = "Company/Organization/Educational Institution"
6+
occupation: "Position, Job or Occupation"
67
homepage = "Social (Homepage)"
78
twitter = "Social (X/twitter)"
89
bluesky = "Social (Bluesky)"

src/models/europython.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class EuroPythonSpeaker(BaseModel):
2626

2727
# Extracted
2828
affiliation: str | None = None
29+
occupation: str | None = None
2930
homepage: str | None = None
3031
twitter_url: str | None = None
3132
mastodon_url: str | None = None
@@ -48,6 +49,9 @@ def extract_answers(cls, values) -> dict:
4849
if answer.question_text == SpeakerQuestion.affiliation:
4950
values["affiliation"] = answer.answer_text
5051

52+
if answer.question_text == SpeakerQuestion.occupation:
53+
values["occupation"] = answer.answer_text
54+
5155
if answer.question_text == SpeakerQuestion.homepage:
5256
values["homepage"] = answer.answer_text
5357

0 commit comments

Comments
 (0)