Skip to content

Commit

Permalink
remove further remnants of old remapping interface
Browse files Browse the repository at this point in the history
  • Loading branch information
lgray authored Oct 11, 2023
1 parent e0694ad commit e7384f9
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions src/coffea/nanoevents/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,29 +177,6 @@ def __getitem__(this, key):

return TranslateBufferKeys()

def create_column_mapping_and_key(self, tree, start, stop, interp_options):
from functools import partial

from coffea.nanoevents.util import tuple_to_key

partition_key = (
str(tree.file.uuid),
tree.object_path,
f"{start}-{stop}",
)
uuidpfn = {partition_key[0]: tree.file.file_path}
mapping = UprootSourceMapping(
TrivialUprootOpener(uuidpfn, interp_options),
start,
stop,
cache={},
access_log=None,
use_ak_forth=True,
)
mapping.preload_column_source(partition_key[0], partition_key[1], tree)

return mapping, partial(self._key_formatter, tuple_to_key(partition_key))


class _map_schema_parquet(_map_schema_base):
def __init__(
Expand All @@ -224,31 +201,6 @@ def __call__(self, form):

return awkward.forms.form.from_dict(self.schemaclass(lform, self.version).form)

def create_column_mapping_and_key(self, columns, start, stop, interp_options):
from functools import partial

from coffea.nanoevents.util import tuple_to_key

uuid = "NO_UUID"
obj_path = "NO_OBJECT_PATH"

partition_key = (
str(uuid),
obj_path,
f"{start}-{stop}",
)
uuidpfn = {uuid: columns}
mapping = PreloadedSourceMapping(
PreloadedOpener(uuidpfn),
start,
stop,
cache={},
access_log=None,
)
mapping.preload_column_source(partition_key[0], partition_key[1], columns)

return mapping, partial(self._key_formatter, tuple_to_key(partition_key))


class NanoEventsFactory:
"""A factory class to build NanoEvents objects"""
Expand Down

0 comments on commit e7384f9

Please sign in to comment.