Utils

Utility functions used throughout the project.

source

get_repository_directory

 get_repository_directory ()

source

get_data_directory

 get_data_directory ()

source

get_latest_directory

 get_latest_directory (directory:pathlib.Path)

Return the latest subdirectory, sorting by name for a given directory. Only returns directories, not files.


source

get_latest_file

 get_latest_file (directory:pathlib.Path)

Return the latest file, sorting by name for a given directory. Only returns files, not directories.


source

extract_file

 extract_file (filepath:pathlib.Path)

source

read_file

 read_file (filepath:pathlib.Path, format:str='json')

Read a file in either JSON or CSV format and return its contents.