@@ -16,24 +16,24 @@ def check_pandas_accessible(col):
16
16
17
17
@pytest .mark .asyncio
18
18
async def test_root_to_pandas (good_root_file_path ):
19
- df = await DataConverterAdaptor ("root" ).convert_to_pandas (good_root_file_path )
19
+ df = await DataConverterAdaptor ("root-file " ).convert_to_pandas (good_root_file_path )
20
20
assert isinstance (df , pd .DataFrame )
21
21
assert len (df ) == 283458
22
22
check_pandas_accessible (df ["JetPt" ])
23
23
24
24
25
25
@pytest .mark .asyncio
26
26
async def test_root_to_pandas_default (good_root_file_path ):
27
- df = await DataConverterAdaptor ("root" ).convert_to_pandas (
28
- good_root_file_path , "root"
27
+ df = await DataConverterAdaptor ("root-file " ).convert_to_pandas (
28
+ good_root_file_path , "root-file "
29
29
)
30
30
assert isinstance (df , pd .DataFrame )
31
31
assert len (df ) == 283458
32
32
33
33
34
34
@pytest .mark .asyncio
35
35
async def test_parquet_to_pandas_non_default (good_uproot_file_path ):
36
- df = await DataConverterAdaptor ("root" ).convert_to_pandas (
36
+ df = await DataConverterAdaptor ("root-file " ).convert_to_pandas (
37
37
good_uproot_file_path , "parquet"
38
38
)
39
39
assert isinstance (df , pd .DataFrame )
@@ -57,29 +57,29 @@ async def test_parquet_to_awkward(good_uproot_file_path):
57
57
58
58
@pytest .mark .asyncio
59
59
async def test_root_to_awkward (good_root_file_path ):
60
- df = await DataConverterAdaptor ("root" ).convert_to_awkward (good_root_file_path )
60
+ df = await DataConverterAdaptor ("root-file " ).convert_to_awkward (good_root_file_path )
61
61
assert len (df ["JetPt" ]) == 283458
62
62
check_awkward_accessible (df ["JetPt" ]) # type: ignore
63
63
64
64
65
65
@pytest .mark .asyncio
66
66
async def test_to_awkward_fail (good_root_file_path ):
67
67
with pytest .raises (ServiceXException ):
68
- await DataConverterAdaptor ("root" ).convert_to_awkward (
69
- good_root_file_path , "notreally "
68
+ await DataConverterAdaptor ("root-file " ).convert_to_awkward (
69
+ good_root_file_path , "not-really "
70
70
)
71
71
72
72
73
73
@pytest .mark .asyncio
74
- async def test_to_panads_fail (good_root_file_path ):
74
+ async def test_to_pandas_fail (good_root_file_path ):
75
75
with pytest .raises (ServiceXException ):
76
- await DataConverterAdaptor ("root" ).convert_to_pandas (
77
- good_root_file_path , "notreally "
76
+ await DataConverterAdaptor ("root-file " ).convert_to_pandas (
77
+ good_root_file_path , "not-really "
78
78
)
79
79
80
80
81
81
def test_combine_pandas_from_root (good_root_file_path ):
82
- "Load a dataframe from root files and make sure that they work when we ask them to combine"
82
+ "Load a DataFrame from root files and make sure that they work when we ask them to combine"
83
83
84
84
def load_df ():
85
85
import uproot as uproot
@@ -91,14 +91,14 @@ def load_df():
91
91
df1 = load_df ()
92
92
df2 = load_df ()
93
93
94
- combined = DataConverterAdaptor ("root" ).combine_pandas ([df1 , df2 ])
94
+ combined = DataConverterAdaptor ("root-file " ).combine_pandas ([df1 , df2 ])
95
95
96
96
assert len (combined ) == len (df1 ) + len (df2 )
97
97
check_pandas_accessible (combined ["JetPt" ])
98
98
99
99
100
100
def test_combine_pandas_from_parquet (good_uproot_file_path ):
101
- "Load a dataframe from a parquet file and make sure they work when we ask them to combine"
101
+ "Load a DataFrame from a parquet file and make sure they work when we ask them to combine"
102
102
103
103
def load_df ():
104
104
import pandas as pd
@@ -108,14 +108,14 @@ def load_df():
108
108
df1 = load_df ()
109
109
df2 = load_df ()
110
110
111
- combined = DataConverterAdaptor ("root" ).combine_pandas ([df1 , df2 ])
111
+ combined = DataConverterAdaptor ("root-file " ).combine_pandas ([df1 , df2 ])
112
112
113
113
assert len (combined ) == len (df1 ) + len (df2 )
114
114
check_pandas_accessible (combined ["JetPT" ])
115
115
116
116
117
117
def test_combine_awkward_from_root (good_root_file_path ):
118
- "Load a dataframe from root files and make sure that they work when we ask them to combine"
118
+ "Load a DataFrame from root files and make sure that they work when we ask them to combine"
119
119
120
120
def load_df ():
121
121
import uproot as uproot
@@ -127,22 +127,22 @@ def load_df():
127
127
df1 = load_df ()
128
128
df2 = load_df ()
129
129
130
- combined = DataConverterAdaptor ("root" ).combine_awkward ([df1 , df2 ])
130
+ combined = DataConverterAdaptor ("root-file " ).combine_awkward ([df1 , df2 ])
131
131
132
132
assert len (combined ) == len (df1 ) + len (df2 )
133
133
check_awkward_accessible (combined ["JetPt" ]) # type: ignore
134
134
135
135
136
136
def test_combine_awkward_from_parquet (good_uproot_file_path ):
137
- "Load a dataframe from a parquet file and make sure they work when we ask them to combine"
137
+ "Load a DataFrame from a parquet file and make sure they work when we ask them to combine"
138
138
139
139
def load_df ():
140
140
return ak .from_parquet (good_uproot_file_path ) # type: ignore
141
141
142
142
df1 = load_df ()
143
143
df2 = load_df ()
144
144
145
- combined = DataConverterAdaptor ("root" ).combine_awkward ([df1 , df2 ])
145
+ combined = DataConverterAdaptor ("root-file " ).combine_awkward ([df1 , df2 ])
146
146
147
147
assert len (combined ) == len (df1 ) + len (df2 )
148
148
check_awkward_accessible (combined ["JetPT" ]) # type: ignore
0 commit comments