quantlab.utils.cli#

Shared argparse helpers for the download scripts under scripts/.

A download script pulls raw market data from a vendor and converts it into Zarr stores. The scripts share the two output-directory flags (--download-dir for the raw files, --data-dir for the data root the stores go under) and the rendering of the conversion result they print; this module defines both once. Each script adds the flags that are its own.

The module is light at import time: it imports nothing from the project at module scope.

Functions

add_max_workers_arg

Add --max-workers, the number of concurrent download threads.

add_output_dir_args

Add --download-dir and --data-dir to parser.

inside_repository

Return the paths that resolve inside repo_root.

place_downloads

Return config with its raw and watermark directories under download_dir.

print_conversion_result

Print the ConversionResult returned by quantlab.acquisition.registry.convert.

resolve_output_dirs

Return (download_dir, data_dir) from parsed arguments, as absolute paths.