
import os

from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE, hf_cache_home


__lowerCAmelCase												=	HUGGINGFACE_HUB_CACHE


__lowerCAmelCase												=	'config.json'
__lowerCAmelCase												=	'diffusion_pytorch_model.bin'
__lowerCAmelCase												=	'diffusion_flax_model.msgpack'
__lowerCAmelCase												=	'model.onnx'
__lowerCAmelCase												=	'diffusion_pytorch_model.safetensors'
__lowerCAmelCase												=	'weights.pb'
__lowerCAmelCase												=	'https://huggingface.co'
__lowerCAmelCase												=	default_cache_path
__lowerCAmelCase												=	'diffusers_modules'
__lowerCAmelCase												=	os.getenv('HF_MODULES_CACHE', os.path.join(hf_cache_home, 'modules'))
__lowerCAmelCase												=	['fp16', 'non-ema']
__lowerCAmelCase												=	'.self_attn'

'''simple docstring'''
from urllib.parse import quote

import pytest

from datasets.utils.hub import hf_hub_url






@pytest.mark.parametrize("""repo_id"""							, ["""canonical_dataset_name""", """org-name/dataset-name"""]				)
@pytest.mark.parametrize("""path"""							, ["""filename.csv""", """filename with blanks.csv"""]				)
@pytest.mark.parametrize("""revision"""							, [None, """v2"""]				)
def  __SCREAMING_SNAKE_CASE				(  _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE							, _SCREAMING_SNAKE_CASE				):
							_snake_case       =  hf_hub_url(repo_id=_SCREAMING_SNAKE_CASE							, path=_SCREAMING_SNAKE_CASE							, revision=_SCREAMING_SNAKE_CASE				)
							assert url == f"""https://huggingface.co/datasets/{repo_id}/resolve/{revision or "main"}/{quote(_SCREAMING_SNAKE_CASE				)}"""