Skip to content

Commit 39c56bd

Browse files
author
acordeir
committed
syntax improvement
1 parent 8f7f027 commit 39c56bd

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

servicex_analysis_utils/materialization.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ def to_awk(deliver_dict, dask=False, **uproot_kwargs):
4949

5050
for sample, paths in deliver_dict.items():
5151
#Check file type
52-
if paths[0].endswith(".root"):
52+
f_type=str(paths[0])
53+
if f_type.endswith(".root"):
5354
is_root=True
54-
elif paths[0].endswith(".parquet") or paths[0].endswith(".pq"):
55+
elif f_type.endswith(".parquet") or f_type.endswith(".pq"):
5556
is_root=False
5657
# ServiceX supports only root/parquet in transformed files
5758
else:
@@ -72,6 +73,7 @@ def to_awk(deliver_dict, dask=False, **uproot_kwargs):
7273
# Merge arrays
7374
awk_arrays[sample] = ak.concatenate(tmp_arrays)
7475
else:
76+
#file is parquet
7577
awk_arrays[sample] = ak.from_parquet(paths)
7678

7779

tests/test_parquet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import dask_awkward as dak
66
import logging
77
import numpy as np
8-
import pyarrow.parquet as pq
8+
#import pyarrow.parquet as pq
99
from servicex_analysis_utils.materialization import to_awk
1010

1111

0 commit comments

Comments
 (0)