Skip to content

Commit

Permalink
Add pooch downloader to workaround readthedocs/readthedocs.org#11763
Browse files Browse the repository at this point in the history
  • Loading branch information
znichollscr committed Nov 26, 2024
1 parent 22ee634 commit c6dc489
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cf_xarray/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,16 @@ def parse_cf_standard_name_table(source=None):
if not source:
import pooch

downloader = pooch.HTTPDownloader(
# https://github.com/readthedocs/readthedocs.org/issues/11763
headers={"User-Agent": "cf-xarray"}
)

source = pooch.retrieve(
"https://raw.githubusercontent.com/cf-convention/cf-convention.github.io/"
"master/Data/cf-standard-names/current/src/cf-standard-name-table.xml",
known_hash=None,
downloader=downloader,
)
root = ElementTree.parse(source).getroot()

Expand Down

0 comments on commit c6dc489

Please sign in to comment.