You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a proposal to move the validation checking capability to a separate file. Moving this to a separate file would reduce the tqdm dependency, which is only needed if validation is requested.
A use case we might want to support is providing an externally generated list of files to this utility to check if the URLs have downloadable endpoints.
# valid_file_list = [gevent.spawn(check_url_part, file_name) for file_name in file_list]
# gevent.joinall(valid_file_list)
# return [file.get() for file in valid_file_list if file.get() is not None]
# def check_url(t, file):
# filename = file.split("/")[-1]
# try:
# with requests.head(file) as response:
# if response.status_code == 200:
# t.set_description(f"Found: {filename}")
# t.update(1)
# t.refresh()
# return file
# else:
# t.set_description(f"Not Found: {filename}")
# t.update(1)
# t.refresh()
# return None
# #response = session.head(file, timeout=1)
# except requests.exceptions.RequestException:
# t.set_description(f"Not Found: {filename}")
# t.update(1)
# t.refresh()
# return None
The text was updated successfully, but these errors were encountered:
jameshalgren
changed the title
Move this validation checker to a separate file or an internal function name
Re-enable validation checker as an option and refactor as separate file.
Oct 19, 2023
jameshalgren
changed the title
Re-enable validation checker as an option and refactor as separate file.
Re-enable validation checker as an option and refactor as separate file and function.
Oct 19, 2023
This is a proposal to move the validation checking capability to a separate file. Moving this to a separate file would reduce the tqdm dependency, which is only needed if validation is requested.
A use case we might want to support is providing an externally generated list of files to this utility to check if the URLs have downloadable endpoints.
nwmurl/nwmurl/urlgennwm.py
Lines 13 to 46 in aadafa3
The text was updated successfully, but these errors were encountered: