11import json
22from datetime import datetime
3- from pathlib import Path
43
54from pydantic import BaseModel , Field
65from pydantic .class_validators import root_validator
76from slugify import slugify
87
9- try :
10- from config import Config
11- except ImportError :
12- from src .config import Config
8+ from src .config import Config
139
1410
1511class SpeakerQuestion :
@@ -175,7 +171,7 @@ def parse_submissions() -> list[PretalxSubmission]:
175171 """
176172 Returns only confirmed talks
177173 """
178- with open (Path . joinpath ( Config .raw_path , "submissions_latest.json" ) ) as fd :
174+ with open (Config .raw_path / "submissions_latest.json" ) as fd :
179175 js = json .load (fd )
180176 subs = []
181177 for item in js :
@@ -189,7 +185,7 @@ def parse_speakers() -> list[PretalxSpeaker]:
189185 """
190186 Returns only speakers with confirmed talks
191187 """
192- with open (Path . joinpath ( Config .raw_path , "speakers_latest.json" ) ) as fd :
188+ with open (Config .raw_path / "speakers_latest.json" ) as fd :
193189 js = json .load (fd )
194190 speakers = []
195191 for item in js :
@@ -217,7 +213,7 @@ def publishable_speakers(accepted_proposals: set[str]) -> dict[str, PretalxSpeak
217213
218214
219215def save_publishable_sessions ():
220- path = Path . joinpath ( Config .public_path , "sessions.json" )
216+ path = Config .public_path / "sessions.json"
221217
222218 publishable = publishable_submissions ()
223219
@@ -227,7 +223,7 @@ def save_publishable_sessions():
227223
228224
229225def save_publishable_speakers ():
230- path = Path . joinpath ( Config .public_path , "speakers.json" )
226+ path = Config .public_path / "speakers.json"
231227
232228 publishable = publishable_submissions ()
233229 speakers = publishable_speakers (publishable .keys ())
0 commit comments