File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010from schemas import facilities_schema
1111
1212
13- def facilities_scrape_wrapper (keep_sheet : bool = True , force_download : bool = True ) -> dict :
13+ def facilities_scrape_wrapper (keep_sheet : bool = True , force_download : bool = True , skip_vera : bool = False ) -> dict :
1414 facilities_data = copy .deepcopy (facilities_schema )
1515 facilities = load_sheet (keep_sheet , force_download )
1616 facilities_data ["facilities" ] = copy .deepcopy (facilities )
1717 facilities_data = scrape_facilities (facilities_data )
18- facilities_data = collect_vera_facility_data (facilities_data , keep_sheet , force_download )
18+ if not skip_vera :
19+ facilities_data = collect_vera_facility_data (facilities_data , keep_sheet , force_download )
1920 field_offices = scrape_field_offices ()
2021 facilities_data = merge_field_offices (facilities_data , field_offices )
2122 facilities_data = insert_additional_facilities (facilities_data )
Original file line number Diff line number Diff line change @@ -102,6 +102,11 @@ def main() -> None:
102102 action = "store_true" ,
103103 help = "Remove any sheets we downloaded" ,
104104 )
105+ parser .add_argument (
106+ "--skip-vera" ,
107+ action = "store_true" ,
108+ help = "Don't collect vera.org data" ,
109+ )
105110
106111 args = parser .parse_args ()
107112 if args .debug :
@@ -124,7 +129,9 @@ def main() -> None:
124129
125130 if args .scrape :
126131 facilities_data = facilities_scrape_wrapper (
127- keep_sheet = not args .delete_sheets , force_download = not args .skip_downloads
132+ keep_sheet = not args .delete_sheets ,
133+ force_download = not args .skip_downloads ,
134+ skip_vera = args .skip_vera ,
128135 )
129136 elif args .load_existing :
130137 facilities_data = copy .deepcopy (default_data .facilities_data )
You can’t perform that action at this time.
0 commit comments