__init__.py (1021B)
1 # File: __init__.py 2 # Created Date: Thursday May 18th 2023 3 # Author: Steven Atkinson (steven@atkinson.mn) 4 5 """ 6 Download the standardized reamping files to the directory containing this file. 7 See: 8 https://github.com/sdatkinson/neural-amp-modeler/tree/main#standardized-reamping-files 9 """ 10 11 from pathlib import Path 12 13 import pytest 14 15 __all__ = [ 16 "requires_proteus", 17 "requires_v1_0_0", 18 "requires_v1_1_1", 19 "requires_v2_0_0", 20 "requires_v3_0_0", 21 "resource_path", 22 ] 23 24 25 def _requires_v(name: str): 26 path = Path(__file__).parent / Path(name) 27 return pytest.mark.skipif( 28 not path.exists(), 29 reason=f"Requires {name}, which hasn't been downloaded to {path}.", 30 ) 31 32 33 requires_v1_0_0 = _requires_v("v1.wav") 34 requires_v1_1_1 = _requires_v("v1_1_1.wav") 35 requires_v2_0_0 = _requires_v("v2_0_0.wav") 36 requires_v3_0_0 = _requires_v("v3_0_0.wav") 37 requires_proteus = _requires_v("Proteus_Capture.wav") 38 39 40 def resource_path(name: str) -> Path: 41 return Path(__file__).absolute().parent / Path(name)