
    bib                    :   d dl mZ d dlZd dlZd dlmZ d dlmZ d dlZ	d dl
Zd dlZd dlmZ d dlZd dlmZ d dlmZ d dlmZ d dlmZ d d	lmZ d d
lmZmZ ej<                  j>                  Z d Z!ej<                  jE                  e ed      k\  d      d        Z#d Z$d Z%d Z&d Z'ej<                  jE                  e ed      k\  d      ej<                  jP                  d               Z)d Z*ej<                  jE                  e ed      k\  d      ej<                  jW                  dg d      ej<                  jW                  dg d      d                      Z,d Z-d Z.ej<                  jW                  d ej^                  g dg dd g d!"      ej`                  f ejb                  g dd#$      ejd                  fg      d%        Z3d& Z4ej<                  jE                  e ed      k\  d      d'        Z5d( Z6d) Z7d* Z8d+ Z9d, Z:d- Z;d. Z<d/ Z=d0 Z>d1 Z?y)2    )annotationsN)	lru_cache)sleep)Version)
PY_VERSION)get_deps)tm)	assert_eq)tmpdirtmpfilec                    t        j                  d       t        j                  g dg ddg d      } t	        j
                  | d      }t        d      5 }|j                  |d	       t        j                  |d	      }t        j                  | |d d         d d d        t        d      5 }|j                  j                  |d	       t        j                  |d	      }t        j                  | j                  |d d         d d d        t	        j
                  | d
      }t        d      5 }|j                  |d	       t        j                  |d	      }t        j                  | |d d         d d d        t        d      5 }|j                  |d	d      }|j                          t        j                  |d	      }t        j                  | |d d         d d d        y # 1 sw Y   FxY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   y xY w)Ntablesabcd            xy      ?       @      @      @indexr   h5/datar   F)compute)pytestimportorskippd	DataFrameddfrom_pandasr   to_hdfread_hdfr	   assert_frame_equalr   assert_series_equalr%   )dfr   fnoutrs        [/home/cdr/jupyterlab/.venv/lib/python3.12/site-packages/dask/dataframe/io/tests/test_hdf.pytest_to_hdfr5      s   
!	"6>R
B 	r1A	 *"	Wkk"g&
b#a&)*
 
 -"	

2wkk"g&
rttSV,-
 	r1A	 *"	Wkk"g&
b#a&)* 
 *"HHR%H0			kk"g&
b#a&)	* *#* *
- -* ** *s4   AG,AG*+AG6 AHG'*G36G?Hz3.11z@segfaults due to https://github.com/PyTables/PyTables/issues/977)reasonc                    t        j                  d       t        j                  g dg ddg d      } t	        j
                  | d      }t        j                  g dg d	dg d
      }t	        j
                  |d      }t        d      5 }|j                  |d       t	        j                  |d      }t        | |       d d d        t        d      5 }|j                  |d       t	        j                  |d      }t        ||       d d d        t        d      5 }|j                  |dd        t	        j                  |d      }t        | |       t        j                  |d      }t        j                  || j                  d d        t        j                  |d      }t        j                  || j                  dd         d d d        t        d      5 }t        j                  |      5 }|j                  |d       d d d        t	        j                  |d      }t        ||       d d d        y # 1 sw Y   vxY w# 1 sw Y   ;xY w# 1 sw Y   xY w# 1 sw Y   ZxY w# 1 sw Y   y xY w)Nr   r   r   r   r   r!   r   r   r   r   r   efghijklmnopr   r   r   r               	   
                     r   r   r   r    g      @g      @g      @g       @g      "@g      $@g      &@g      (@g      *@g      ,@g      .@g      0@rQ   r#   /data*/data_*c                    d| dz   z  S Nr   r    r=   s    r4   <lambda>z,test_to_hdf_multiple_nodes.<locals>.<lambda>|   s    q1u     name_functionz/data_az/data_aa)r&   r'   r(   r)   r*   r+   r   r,   r-   r
   r	   r.   ilocHDFStore)r0   r   df16r   r1   r2   hdfs          r4   test_to_hdf_multiple_nodesra   9   s   
 !	"6>R
B 	r1A<<$ I'	
*
-(DR 	tR A 
 "	Xkk"h'"c 
 "	Xkk"h'$ 
 0"	Y.EFkk"i("ckk"i(
c2772A;/kk"j)
c27712;/0 
 "[[_ 	$HHS(#	$kk"h'$	 /  0 0	$ 	$ sI   5H65IB*II(0I*I(6I III%	!I((I1c                    t        j                  d       t        j                  g dg ddg d      } t	        j
                  | d      }t        j                  g dg d	dg d
      }t	        j
                  |d      }t               5 }t        j                  j                  |d      }|j                  |d       t	        j                  |d      }t        | |       d d d        t               5 }t        j                  j                  |d      }|j                  |d       t	        j                  |d      }t        ||       d d d        t               5 }t        j                  j                  |d      }t        j                  j                  |d      }|j                  |d       |j                  |d       t	        j                  ||gd      }t        t        j                  || g      |       d d d        t               5 }t        j                  j                  |d      }|j                  |dd        t	        j                  |d      }t        | |       t        j                  t        j                  j                  |d      d      }t        j                  || j                   d d        t        j                  t        j                  j                  |d      d      }t        j                  || j                   dd         d d d        t#        d      5 }t        j$                  |      5 }	|j                  |	d       d d d        t	        j                  |d      }t        | |       d d d        y # 1 sw Y   xY w# 1 sw Y   FxY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   gxY w# 1 sw Y   y xY w)Nr   r   r   r   r   r!   r   r8   rE   rR   rQ   	data_*.h5r$   z	data_1.h5z	data_2.h5c                    d| dz   z  S rV   rW   rX   s    r4   rY   z,test_to_hdf_multiple_files.<locals>.<lambda>   s    cQUm rZ   r[   z	data_a.h5z
data_aa.h5r#   rS   )r&   r'   r(   r)   r*   r+   r   ospathjoinr,   r-   r
   concatr	   r.   r]   r   r^   )
r0   r   r_   r   dnr1   r2   fn1fn2r`   s
             r4   test_to_hdf_multiple_filesrl      s   
!	"6>R
B 	r1A<<$ I'	
*
-(DR 	tR A 
 RWW\\"k*	Wkk"g&"c	 
 RWW\\"k*	Wkk"g&$	 
 .Rggll2{+ggll2{+	g	gkk3*g."))T2J'-. 
 	0RWW\\"k*	W,CDkk"g&"ckk"'',,r;7A
c2772A;/kk"'',,r<8'B
c27712;/	0 
 "[[_ 	$HHS(#	$kk"h'"c	 I  . .	0 	0	$ 	$ sX   AM?3ANBN
DN&#N>9N2*N>?N	NN#&N/2N;	7N>>Oc                    t        j                  d       t        j                  g dg ddg d      } t	        j
                  | d      }t        d      5 }|j                  |d	       |j                  |d
d       t	        j                  |d
      }t        t	        j                  | | g      |       d d d        t	        j
                  | d      }t        d      5 }|j                  |d	       |j                  |d
d       t	        j                  |d
      }t        | |       d d d        t	        j
                  | d      }t        d      5 }|j                  |d	       |j                  |d
d       t	        j                  |d
      }t        t	        j                  | | g      |       d d d        t	        j
                  | d      }t        d      5 }|j                  |d	       |j                  |d
d       t	        j                  |d
      }t        | |       d d d        t	        j
                  | d      }t        d      5 }|j                  |d       |j                  |d	       |j                  |d
dd       t	        j                  |d
      }t        t	        j                  | | g      |       d d d        y # 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   1xY w# 1 sw Y   xY w# 1 sw Y   y xY w)Nr   r   r   r   r   r!   r   r#   z/data2rS   r   modewr   z/data1Fro   append)r&   r'   r(   r)   r*   r+   r   r,   r-   r
   rh   )r0   r   r1   r2   s       r4    test_to_hdf_modes_multiple_nodesrs      sx   
!	"6>R
B
 	r1A	 ,"	X	XC(kk"h'"))RH%s+	, 	r1A	 "	X	XC(kk"h'"c	 	r1A	 ,"	X	XC(kk"h'"))RH%s+	, 	r1A	 "	X	XC(kk"h'"c	 	r1A	 ,"	X	X	XC6kk"h'"))RH%s+, ,A, , , , , ,sA   AKA	KAKA	K*	A1K6KKK'*K36K?c                    t        j                  d       t        j                  g dg ddg d      } t	        j
                  | d      }t               5 }t        j                  j                  |d      }|j                  t        j                  j                  |d	      d
       |j                  |d
d       t	        j                  |d      }t        t	        j                  | | g      |       d d d        t	        j
                  | d      }t               5 }t        j                  j                  |d      }|j                  t        j                  j                  |d	      d
       |j                  |d
d       t	        j                  |d
      }t        t	        j                  | | g      |       d d d        t	        j
                  | d      }t               5 }t        j                  j                  |d      }|j                  t        j                  j                  |d      d
       |j                  |d
d       t	        j                  |d
      }t        | |       d d d        t	        j
                  | d      }t               5 }t        j                  j                  |d      }|j                  t        j                  j                  |d      d
       |j                  |d
dd       t	        j                  |d
      }t        t	        j                  | | g      |       d d d        y # 1 sw Y   CxY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   y xY w)Nr   r   r   r   r   r!   r   data*data2r$   r   rn   rS   r   data1rp   Frq   )r&   r'   r(   r)   r*   r+   r   re   rf   rg   r,   r-   r
   rh   )r0   r   ri   r1   r2   s        r4    test_to_hdf_modes_multiple_filesrx     s   
!	"6>R
B
 	r1A	 ,RWW\\"g&	b'*G4	W3'kk"h'"))RH%s+, 	r1A	 ,RWW\\"g&	b'*G4	W3'kk"g&"))RH%s+, 	r1A	 RWW\\"g&	b'*G4	W3'kk"g&"c 	r1A	 ,RWW\\"g&	b'*G4	W3u5kk"g&"))RH%s+, ,7, ,, , , ,s4   BL3BM BMBM3L= M
MM"c                    t        |       \  }t        d       fd       t        fdj                         D              S )N)maxsizec                H    |    sydt        fd|    D              z   }|S )Nr   c              3  .   K   | ]  } |        y wNrW   .0dep_keymax_depth_by_depss     r4   	<genexpr>z>dependency_depth.<locals>.max_depth_by_deps.<locals>.<genexpr>M  s     H7%g.H   )max)keyr   depsr   s     r4   r   z+dependency_depth.<locals>.max_depth_by_depsH  s+    CyHd3iHHHrZ   c              3  .   K   | ]  } |        y wr}   rW   r~   s     r4   r   z#dependency_depth.<locals>.<genexpr>P  s     Eg )Er   )r   r   r   keys)dsk_r   r   s     @@r4   dependency_depthr   E  s@    smGD!t  EEEErZ   c                 |   t        j                  d       t        j                  g dg ddg d      } t	        j
                  | d      }d }t               5 }|j                  |d	|
      }|j                  |d       t	        j                  |d      }t        | |       d d d        t               5 }t        j                  j                  |d      }|j                  |d	|
      }|j                  |d       t	        j                  |d      }t        | |       d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w)Nr   r8   rE   r   rR   r!   rQ   c                f    | j                   d   dk  rt        dd| j                   d   z
  z         | S )Nr   rK   g?)r]   r   rX   s    r4   delayed_nopz,test_to_hdf_lock_delays.<locals>.delayed_nop  s/    66!9r>#affQi()rZ   r   )axismetarS   ru   r$   )r&   r'   r(   r)   r*   r+   r   applyr,   r-   r
   r   re   rf   rg   )r_   r   r   r1   r2   ri   s         r4   test_to_hdf_lock_delaysr   S  s    !<<$ I'	
*
-(DR 	tR A 
 bGGKaaG0	Xkk"h'$	 
 RWW\\"g&GGKaaG0	Wkk"g&$   s   A	D&4A)D2&D/2D;c                    t        j                  d       t        j                  g dg ddg d      } t	        j
                  | d      }t               5 }t        j                  t              5  t        j                  j                  |d      }|j                  |d	       d d d        d d d        t               5 }t        j                  |      5 }t        j                  t              5  |j                  |d
       d d d        d d d        d d d        y # 1 sw Y   wxY w# 1 sw Y   {xY w# 1 sw Y   2xY w# 1 sw Y   6xY w# 1 sw Y   y xY w)Nr   r   r   r   r   r!   r   rc   rT   z	/data_*_*)r&   r'   r(   r)   r*   r+   r   raises
ValueErrorre   rf   rg   r,   r   r^   )r0   r   ri   r1   r`   s        r4   test_to_hdf_exceptionsr     s   
!	"6>R
B 	r1A 
 $R]]:& 	$b+.BHHR#	$$ 
 +b[[_ 	+z* +k*+	++ +	$ 	$$ $+ +	+ 	++ +s`   D%03D#D%=E	D=-D1 D=E	D"	D%%D.1D:6D==E	E		E	scheduler)syncthreads	processesnpartitions)r   r   rK   c                   t        j                  d       t        j                  g dg ddg d      }t	        j
                  ||      }t        d      5 }|j                  |d	| 
       t        j                  |d	      }t        ||       d d d        t               5 }t        j                  j                  |d      }|j                  |d	| 
       t	        j                  |d	      }t        ||       d d d        t        d      5 }|j                  |d| 
       t	        j                  |d      }t        ||       d d d        y # 1 sw Y   xY w# 1 sw Y   `xY w# 1 sw Y   y xY w)Nr   r8   rE   r   rR   r!   r   r#   r$   r   rc   rS   )r&   r'   r(   r)   r*   r+   r   r,   r-   r
   r   re   rf   rg   )r   r   r0   r   r1   r2   ri   s          r4   test_to_hdf_schedulersr     sC    !	$ I'	
*
-(
BR 	r{3A 
 "	W	2kk"g&"c 
 RWW\\"k*	W	2kk"g&"c	 
 "	X3kk"h'"c    s%   7E!AE7E#EE #E,c                    t        j                  d       t        j                  dddgi      } t	        j
                  | d      }t        d      5 }|j                  |dd	d
       t        j                  |d      }t        j                  | |       d d d        t        d      5 }|j                  |ddd
       t        j                  |d      }t        j                  | |       d d d        y # 1 sw Y   _xY w# 1 sw Y   y xY w)Nr   Ar   aaaar   r   r#   foo4tabler   )formatmin_itemsizet)r&   r'   r(   r)   r*   r+   r   r,   r-   r	   r.   )r0   ddfr1   df2s       r4   test_to_hdf_kwargsr     s    
!	sS&M*	+B
..
+C	 '"

2vgA
>kk"f%
b#&' 
 '"

2vc
:kk"f%
b#&' '' '' 's   AC1&AC=1C:=Dc                    t        j                  d       t        j                  g dg ddg d      } t	        j
                  | d      }t        d      5 }t        j                  t        d	
      5  |j                  |dt               d d d        d d d        t               5 }t        j                  j                  |d      }|j                  |t               d d d        y # 1 sw Y   \xY w# 1 sw Y   `xY w# 1 sw Y   y xY w)Nr   r8   rE   r   rR   r!   rQ   r#   z2To preserve order between partitions name_functionmatchrS   r[   z
data_*.csv)r&   r'   r(   r)   r*   r+   r   warnsUserWarningr,   strr   re   rf   rg   to_csv)r_   r   r1   ri   s       r4   test_to_fmt_warnsr     s    
!<<$ I'	
*
-(DR 	tR A 
 6"\\S
 	6 HHRH5	66 
 (RWW\\"l+	3'( (	6 	66 6( (s0   C33C'C3&8C?'C0	,C33C<?Dzdata, comparer   r   r   r   r!   r   )namec                   t        j                  d       t        d      5 }| j                  |d       	 t	        j
                  |ddd       J # t        $ r}d	t        |      v sJ Y d }~nd }~ww xY w	 d d d        n# 1 sw Y   nxY wt        d      5 }| j                  |dd
       t	        j
                  |ddd      }|j                  dk(  sJ  ||j                         |         |t	        j
                  |ddddd      j                         t        j
                  |ddd             d d d        n# 1 sw Y   nxY wt        d      5 }| j                         }|j                  |dd
       t	        j
                  |dddd      }|j                  dk(  sJ  ||j                         |       d d d        y # 1 sw Y   y xY w)Nr   r#   r$   )r   datar   r3   	chunksizero   zformat='table'r   r   r   r   r   )r   startstopro   r   r   T)r   sorted_indexro   )r&   r'   r   r,   r*   r-   	TypeErrorr   r   r%   r(   
sort_index)r   comparer1   r9   r   sorted_datas         r4   test_read_hdfr   A  s    !	 ."BG$	.KKFac:5 	.#s1v---	.-. . . 
 

"BGG4KKGqs;}}!!!		T"KKGqLTTVKKG115	


 

 

 
 *"oo'277;KKGqt#N}}!!!		[)* * *sH   B A	A3A.)B .A33B  B	BD==EA'GGc                 `   t        j                  d       t        j                  g dg ddg d      } t	        d      5 }| j                  |dd	
       t        j                  |d      5  t        j                  |ddd       ddd       ddd       y# 1 sw Y   xY w# 1 sw Y   yxY w)zXTest that we can read from a file that's already opened elsewhere in
    read-only mode.r   r   r   r   r   r!   r#   r$   r   r   r3   rn   r   r   N)	r&   r'   r(   r)   r   r,   r^   r*   r-   r0   r1   s     r4   test_read_hdf_multiply_openr   m  s     !	"6>R
B 
 <"
		"''	2[[#& 	<KKGqs;	<< <	< 	<< <s$   ,B$-BB$B!	B$$B-c                    t        j                  d       t        j                  g dg ddg d      } t	        j
                  | d      }t        d      5 }|j                  |d	       t	        j                  |d	d
      }|j                  |j                  k(  sJ |j                  |j                  k(  sJ t        ||       d d d        y # 1 sw Y   y xY w)Nr   r8   rE   r   rR   r!   rQ   r#   rS   T)r   )r&   r'   r(   r)   r*   r+   r   r,   r-   r   	divisionsr
   )r0   r   r1   r3   s       r4   test_read_hdf_multipler   z  s    
 !	$ I'	
*
-(
BR 	r2A	 "	XKKH48}}---{{akk)))!Q  s   A-CCc                    t        j                  d       t        j                  g dg ddg d      } t	        d      5 }| j                  |dd	
       t        j                  t        d      5  t        j                  |dd       d d d        t        j                  t        d      5  t        j                  |dd       d d d        t        j                  t        d      5  t        j                  |dd       d d d        d d d        y # 1 sw Y   xY w# 1 sw Y   ZxY w# 1 sw Y   *xY w# 1 sw Y   y xY w)Nr   r   r   r   r   r!   r#   r$   r   r   znumber of rowsr   rK   )r   zis above or equal to)r   zpositive integerr   )
r&   r'   r(   r)   r   r,   r   r   r*   r-   r   s     r4   test_read_hdf_start_stop_valuesr     s    
!	"6>R
B 
 
3"
		"''	2]]:-=> 	.KKG"-	. ]]:-CD 	/KKG2.	/ ]]:-?@ 	3KKGr2	3
3 
3	. 	.	/ 	/	3 	3
3 
3sT   0D71D
#D7-D#D7)D+D7D	D7D(	$D7+D4	0D77E c            	     J   t        j                  d       t        j                  g dg ddg d      } t	               5 }| j                  t        j                  j                  |d      dd	
       | j                  t        j                  j                  |d      dd	
       | j                  t        j                  j                  |d      dd	
       t        j                  j                  d      5  t        j                  t        j                  j                  |d      dd      }|j                  dk(  sJ t        j                   |j#                         |        t        j                  t        j                  j                  |d      dddd      }t        j                  t        j                  j                  |d      ddd      }t        j                   |j#                         |       t        j                  t        j                  j                  |d      dd      }|j                  dk(  sJ t        j                   |j#                         t        j$                  | gdz               t        j                  t        j                  j                  |d      dd      }|j                  dk(  sJ t        j                   |j#                         t        j$                  | gdz               t        j                  t        j                  j                  |d      dd      }|j                  dk(  sJ t        j                   |j#                         t        j$                  | gdz               d d d        d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w)Nr   r   r   r   r   r!   one.h5z	/foo/datar   r   two.h5z	/bar/datar   r   z/*/datar   r   r   r   )r   r   r   r   r   z*.h5rG   )r&   r'   r(   r)   r   r,   re   rf   rg   daskconfigsetr*   r-   r   r	   r.   r%   rh   )r0   tdirresexpecteds       r4   test_hdf_globbingr     s   
!	"6>R
B 
 FT
		"'',,tX.K	P
		"'',,tX.K	P
		"'',,tX.K	P[[__v_. 	F++bggll4:IQRSC??a'''!!#++-4++T8,i1ATUC {{T8,kH !!#++-:++bggll4:IQRSC??e+++!!#++-B4!81DE++bggll48+QRSC??e+++!!#++-B4!81DE++bggll48)qQC??i///!!#++-B4!81DE/	FF F
	F 	FF Fs&    B7N7JN<NN	NN"c                    t        j                  d       t        j                  g dg ddg d      } t	               5 }| j
                  d d j                  t        j                  j                  |d      d	d
       | j
                  dd  j                  t        j                  j                  |d      d	d
       t        j                  j                  d      5  t        j                  j                  |d      t        j                  j                  |d      g}t        j                  |d	      }t        j                   |j#                         |        d d d        d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w)Nr   r   r   r   r   r!   r   r   	dataframer   r   r   r   r   )r&   r'   r(   r)   r   r]   r,   re   rf   rg   r   r   r   r*   r-   r	   r.   r%   )r0   r   input_filesr   s       r4   test_hdf_file_listr     s+   
!	"6>R
B 
 5T
GGLLx(k' 	 	
 	GGLLx(k' 	 	
 [[__v_. 	577<<h7dH9UVK++k;7C!!#++-4	55 5	5 	55 5s&    BE7A;E+E7+E4	0E77F c                 D   t        j                  d       t        j                  g dg ddg d      } t	        d      5 }t        j                  |      }| j                  |dd	
       t        j                  |d      }t        ||        d d d        y # 1 sw Y   y xY w)Nr   r   r   r   r   r!   r#   r   r   r   )r&   r'   r(   r)   r   pathlibPathr,   r*   r-   r
   )r0   r1   rf   r   s       r4   test_read_hdf_pattern_pathliker     s    
!	"6>R
B 
 "||B
		$K	8kk$,#r	  s   ABBc                 n   t        j                  d       t        j                  g dg ddg d      } t	        j
                  | d      }t        d	      5 }t        j                  |      }|j                  |d
       t        j                  |d
      }t        ||       d d d        y # 1 sw Y   y xY w)Nr   r   r   r   r   r!   r   r   r#   r$   )r&   r'   r(   r)   r*   r+   r   r   r   r,   r-   r
   )r0   r   r1   rf   r   s        r4   test_to_hdf_path_pathliker     s    
!	"6>R
B ..
+C	 "||B

4!kk$(#s	  s   A
B++B4c                    t        j                  d       t        d      5 } d}t        j                  t
        j                  j                  |d            }t        j                  | d      5 }|j                  d|       d d d        t        j                  | dd	      }t        |      |k(  sJ 	 d d d        y # 1 sw Y   ;xY w# 1 sw Y   y xY w)
Nr   r#   (   r   rp   rn   z/xr   r   )r&   r'   r   r(   r)   nprandomrandnr^   rr   r*   r-   len)r1   Nr0   storer   s        r4   test_read_hdf_doesnt_segfaultr     s    
!	 "\\"))//!Q/0[[#& 	#%LLr"	# kk"da03x1}} 	# 	# s$   AC.B;0C;C	 CCc                 "   t        j                  d       t        j                  g dg ddg d      } t	        j
                  | d      }|j                  d	d
      ddgk(  sJ t        j                  d       t        j                  d       y )Nr   r   r   r   r   r!   r   r   z	foo*.hdf5r   z	foo0.hdf5z	foo1.hdf5)	r&   r'   r(   r)   r*   r+   r,   re   remove)r0   r   s     r4   test_hdf_filenamesr   %  sq    
!	"6>R
B ..
+C::k5)k;-GGGGIIkIIkrZ   c                    t        j                  t              5  t        j                  dd       d d d        t        j                  t              5  t        j                  ddgd       d d d        t        j                  t
              5  t        j                  g d       d d d        y # 1 sw Y   |xY w# 1 sw Y   NxY w# 1 sw Y   y xY w)Nnonexistant_store_X34HJKz/tmpnonexistant_store_UY56YH)r&   r   IOErrorr*   r-   r   rW   rZ   r4   test_hdf_path_exceptionsr   0  s    	w	 8
.78 
w	 V
/1KLfUV 
z	"  
B   8 8V V   s#   B,B8C,B58CCc                   	 t        j                  d      	dd l	 G 	fdd	j                        }  G 	fdd	j                        } G 	fdd	j                        }t	        d	      5 }	j                  |d
      5 }|j                  dd      }|j                  |d| d      }|j                  }d|d<   |j                          |j                  |d|d      }|j                  }d|d<   |j                          |j                  |d|d      }|j                  }d|d<   |j                          d d d        t        j                  t        j                  j                  dd            }|j                  |ddd
       t!        j"                  |d       t!        j"                  |d       t!        j"                  |d       t!        j"                  |d       d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w) Nr   r   c                  0    e Zd ZW  j                         Zy)'test_hdf_nonpandas_keys.<locals>.Table1N)__name__
__module____qualname__
Float32Colvalue1r   s   r4   Table1r   E      ""$rZ   r   c                  0    e Zd ZW  j                         Zy)'test_hdf_nonpandas_keys.<locals>.Table2N)r   r   r   r   value2r   s   r4   Table2r   H  r   rZ   r   c                  0    e Zd ZW  j                         Zy)'test_hdf_nonpandas_keys.<locals>.Table3N)r   r   r   r   value3r   s   r4   Table3r  K  r   rZ   r  r#   r   rn   /grouptable1zTable 1r   r   table2zTable 2r   table3zTable 3r  rK   r   z/barr   )r   r   ro   z/group/table1z/group/table2z/group/table3)r&   r'   r   IsDescriptionr   	open_filecreate_groupcreate_tablerowrr   r(   r)   r   r   r   r,   r*   r-   )
r   r   r  rf   h5filer  r   r  barr   s
            @r4   test_hdf_nonpandas_keysr  >  s      *F%%% %%%% %%%% % 
 "$d- 	''W5E##E8VYGA%%CCMJJL##E8VYGA%%CCMJJL##E8VYGA%%CCMJJL	  ll299??2q12

4VG#
>
D/*
D/*
D/*
D&!/" "	 	" "s&   +G.?B2G"1B(G."G+	'G..G7c                0   t        j                  d       ddlm} t	        j
                  g g dg       }|j                  | dz  ddd	
       t        j                  t        |      5  t        j                  | dz  d       d d d        y # 1 sw Y   y xY w)Nr   r   )dont_use_fixed_error_message)r   Br!   zdata.h5fixedr0   rp   )r   r   ro   r   )r&   r'   dask.dataframe.io.hdfr  r(   r)   r,   r   r   r*   r-   )tmp_pathr  r0   s      r4   test_hdf_empty_dataframer  h  sx    
!B	BR(	3BIIh"73IG	y(D	E 0
Hy($/0 0 0s   )BB)@
__future__r   re   r   	functoolsr   timer   numpyr   pandasr(   r&   packaging.versionr   r   dask.dataframer   r*   dask._compatibilityr   	dask.corer   dask.dataframe._compatr	   dask.dataframe.utilsr
   
dask.utilsr   r   markskip_with_pyarrow_strings
pytestmarkr5   skipifra   rl   rs   rx   r   slowr   r   parametrizer   r   r   r)   r.   Seriesr/   r   r   r   r   r   r   r   r   r   r   r   r  r  rW   rZ   r4   <module>r+     sO   " 	       %   *  % * & [[22
*> '&/!M  M	M`Zz-,`(,VF '&/!M   B 	
BJ+( '&/!M   &FG
3> 4 H	>B' 6(r  BLL*>* !!	
 
<c	*B,B,BC	**>
< '&/!M  2	2j3$"FJ5(
	 '"T0rZ   