chimcla.util_file_sorting¶
This Module contains classes and functions for the Lot Preparation step of the processing pipeline.
used by cli.py.
Module Contents¶
Classes¶
A Lot-instance models a production lot (typically spanning several days) |
Functions¶
Distribute a big list of files (with time stamp names) into a structure of subdirectories (“lots” which contain “parts”). |
API¶
- class chimcla.util_file_sorting.Lot(start_index, part_size: int = 1000)[source]¶
Bases:
addict.AddictA Lot-instance models a production lot (typically spanning several days)
Initialization
Initialize self. See help(type(self)) for accurate signature.
- __setattr__(name, value)¶
- __setitem__(name, value)¶
- __add__(other)¶
- classmethod _hook(item)¶
- __getattr__(item)¶
- __missing__(name)¶
- __delattr__(name)¶
- to_dict()¶
- copy()¶
- deepcopy()¶
- __deepcopy__(memo)¶
- update(*args, **kwargs)¶
- __getnewargs__()¶
- __getstate__()¶
- __setstate__(state)¶
- __or__(other)¶
- __ror__(other)¶
- __ior__(other)¶
- setdefault(key, default=None)¶
- freeze(shouldFreeze=True)¶
- unfreeze()¶
- __contains__()¶
- __delitem__()¶
- __dir__()¶
- __eq__()¶
- __format__()¶
- __ge__()¶
- __getattribute__()¶
- __getitem__()¶
- __gt__()¶
- __iter__()¶
- __le__()¶
- __len__()¶
- __lt__()¶
- __ne__()¶
- __new__()¶
- __reduce__()¶
- __reduce_ex__()¶
- __repr__()¶
- __reversed__()¶
- __sizeof__()¶
- __str__()¶
- __subclasshook__()¶
- clear()¶
- get()¶
- items()¶
- keys()¶
- pop()¶
- popitem()¶
- values()¶
- chimcla.util_file_sorting.split_into_lots(pathlist: str, part_size: int = 1000)[source]¶
Distribute a big list of files (with time stamp names) into a structure of subdirectories (“lots” which contain “parts”).
:param pathlist: a text file with one path per line :param lot_size: number of files per lot
Each lot corresponds to a production cycle without major interruptions (e.g. 3 days).