File tree 5 files changed +9
-7
lines changed 5 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 40
40
cp templates/index.html site_files
41
41
42
42
- name : Build the Kafka site
43
- run : python ipper/main.py kafka output standalone dev /kip_mentions.csv site_files/kafka.html
43
+ run : python ipper/main.py kafka output standalone cache/mailbox_files /kip_mentions.csv site_files/kafka.html
44
44
45
45
- name : Build the Flink site
46
46
run : python ipper/main.py flink output cache/flip_wiki_cache.json site_files/flink.html site_files/flips
Original file line number Diff line number Diff line change 30
30
"from" ,
31
31
"vote" ,
32
32
]
33
- CACHE_DIR = "cache "
33
+ CACHE_DIR = "kafka_processed_mailbox_cache "
34
34
CACHE_SUFFIX = ".cache.csv"
35
35
36
36
Original file line number Diff line number Diff line change @@ -261,9 +261,10 @@ def run_init_cmd(args: Namespace) -> None:
261
261
setup_wiki_download (args )
262
262
print ("Downloading Developer Mailing List Archives" )
263
263
args .mailing_list = "dev"
264
+ args .output_dir = "cache/mailbox_files"
264
265
setup_mail_download (args )
265
266
args .overwrite_cache = True
266
- args .directory = "dev "
267
+ args .directory = "cache/mailbox_files "
267
268
process_mail_archives (args )
268
269
269
270
@@ -280,11 +281,11 @@ def run_update_cmd(args: Namespace) -> None:
280
281
args .mailing_list = "dev"
281
282
updated_files : List [Path ] = setup_mail_download (args )
282
283
# Reprocess just the newly downloaded mail file
283
- cache_dir : Path = Path ("dev " ).joinpath (CACHE_DIR )
284
+ cache_dir : Path = Path ("cache " ).joinpath (CACHE_DIR )
284
285
process_mbox_files (updated_files , cache_dir , overwrite_cache = True )
285
286
# Overwrite the kip mentions cache by process all the old mbox cache files
286
287
# and the newly overwritten one(s)
287
- args .directory = "dev "
288
+ args .directory = "cache "
288
289
args .overwrite_cache = False
289
290
process_mail_archives (args )
290
291
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ def get_kip_information(
151
151
chunk : int = 100 ,
152
152
update : bool = False ,
153
153
overwrite_cache : bool = False ,
154
- cache_filepath : str = "kip_wiki_cache.json" ,
154
+ cache_filepath : str = "cache/ kip_wiki_cache.json" ,
155
155
timeout : int = 30 ,
156
156
) -> dict [int , dict [str , Union [int , str ]]]:
157
157
"""Gets the details of all child pages of the KIP main page that relate
@@ -170,6 +170,7 @@ def get_kip_information(
170
170
if not update :
171
171
return output
172
172
else :
173
+ cache_file_path .parent .mkdir (parents = True , exist_ok = True )
173
174
output = {}
174
175
175
176
if cache_file_path .exists () and update :
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def setup_top_level_parser() -> ArgumentParser:
13
13
description = "Ipper - The Improvement Proposal Enrichment program" ,
14
14
)
15
15
top_level_parser .set_defaults (func = lambda _ : print (top_level_parser .format_help ()))
16
-
16
+
17
17
top_level_subparsers = top_level_parser .add_subparsers ()
18
18
19
19
setup_kafka_parser (top_level_subparsers )
You can’t perform that action at this time.
0 commit comments