I have a function with click decorators. The entire purpose of the function is to add a CLI option to the work being done by the tq_oex_interchange class.
@click.command()
@click.option('-input_file', help='The input file to process')
@click.option('-output_file', help='The output file to create')
@click.option('-part_num_col', help='The column containing the part numbers')
@click.option('-summate_cols', help='The columns to summate')
def run(input_file, output_file, part_num_col, summate_cols):
from re import split
summate_cols = [int(i) for i in split(',', summate_cols)]
part_num_col = int(part_num_col)
teek = tq_oex_interchange()
click.echo("Working...")
teek.scan_file(input_file, output_file, part_num_col, summate_cols)
However, when i execute my script with the command
python tq_oex.py -input_file C:\Users\barnej78\Desktop\test_0.csv -output_file C:\Users\barnej78\Desktop\cmd.csv -part_num_col 3 -summate_cols 5,6
Nothing happens, not even the click echo is executed.
Additionally,
python tq_oex.py --help
Also doesn't do anything.
There is no error or exception output for any of these command.
What am I doing wrong?