
    h[                    d    S SK Jr  S SKrS SKrS SKJr  S SKJr   S	SS.     S
S jjjrSS jr	g)    )annotationsN)settings)ParametricProfileNamesF)set_environmentc                  SSS.n[        U 5      nS H!  u  pE[        R                  " S
SU 3US.UD6  M#     UR                  5       (       d  [        R
                  " SU5      (       a9  [        UR                  SS	5      5      nSU 3n[        R                  " S
UUS.UD6  SUR                  SS	5       3n[        R                  " U5        U(       a  [        U5        gg)a  
Load a named (or custom) hypothesis profile for use with the parametric tests.

.. warning::
    This functionality is currently considered **unstable**. It may be
    changed at any point without it being considered a breaking change.

Parameters
----------
profile : {str, int}, optional
    Name of the profile to load; one of "fast", "balanced", "expensive", or
    the integer number of iterations to run (which will create and register
    a custom profile with that value).

set_environment : bool, default False
    If True, also set the environment variable `POLARS_HYPOTHESIS_PROFILE`
    to the given profile name/value.

Examples
--------
>>> # load a custom profile that will run with 1500 iterations
>>> from polars.testing.parametric import load_profile
>>> load_profile(1500)
TN)
print_blobdeadline))fastd   )balancedi  )	expensivei'  zpolars.)namemax_exampleszpolars\.custom\.[\d_]+$zpolars.custom.  )
strr   register_profileisdigitrematchintreplaceload_profileset_profile)profiler   common_settingsprofile_namer   
iterationsn_iterationss          \/home/james-whalen/.local/lib/python3.13/site-packages/polars/testing/parametric/profiles.pyr   r      s    6 &*t<Ow<L
 	!! 	
4&!#	
 	
 *Dl!S!S<//0@"EF'~6!! 	
%	
 	
 \11)R@ABL,'L!     c                0   [        U 5      R                  S5      S   nUR                  SS5      R                  5       (       a  [        [	        U5      5      nO,SSKJn  U" [        5      nX;  a  SU< SU< 3n[        U5      eU[        R                  S	'   g
)a  
Set the env var `POLARS_HYPOTHESIS_PROFILE` to the given profile name/value.

.. warning::
    This functionality is currently considered **unstable**. It may be
    changed at any point without it being considered a breaking change.

Parameters
----------
profile : {str, int}, optional
    Name of the profile to load; one of "fast", "balanced", "expensive", or
    the integer number of iterations to run (which will create and register
    a custom profile with that value).

Examples
--------
>>> # prefer the 'balanced' profile for running parametric tests
>>> from polars.testing.parametric import set_profile
>>> set_profile("balanced")
._r   r   )get_argszinvalid profile name z; expected one of POLARS_HYPOTHESIS_PROFILEN)r   splitr   r   r   typingr&   r   
ValueErrorosenviron)r   r   r&   valid_profile_namesmsgs        r    r   r   J   s    * w<%%c*2.LC$,,..3|,- 	$&'=>2),)99KL_KbcCS/!.:BJJ*+r!   )r
   )r   ParametricProfileNames | intr   boolreturnNone)r   r/   r1   r2   )

__future__r   r+   r   
hypothesisr   polars._typingr   r   r   r   r!   r    <module>r6      sD    " 	 	  1 -3<"OT<")<"HL<"	<"~!;r!   