File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
src/ref_sample_data/data_request Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 1+ Removes ERA5 ta dataset from obs4REF in preference for obs4MIP
Original file line number Diff line number Diff line change @@ -55,7 +55,12 @@ def fetch_datasets(self) -> pd.DataFrame:
5555 response = requests .get (registry_url , timeout = 30 )
5656 response .raise_for_status ()
5757 with tempfile .NamedTemporaryFile (mode = "w" , encoding = "utf-8" ) as tmpfile :
58+ # Write the registry to a temporary file
5859 tmpfile .write (response .text )
60+ tmpfile .flush ()
61+ logger .debug (f"Downloaded { tmpfile .name } : { response .text .count (os .linesep )} lines" )
62+
63+ # Load the registry from the temporary file
5964 registry .load_registry (tmpfile .name )
6065 logger .info (f"Loaded dataset registry from { registry_url } : { len (registry .registry )} entries" )
6166 datasets = []
You can’t perform that action at this time.
0 commit comments