Skip to content

Commit efaf301

Browse files
Add stop option to CLI
1 parent f1d38d1 commit efaf301

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sc2ts/cli.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def dump_samples(samples, output_file):
201201
)
202202
@click.option("--num-threads", default=0, type=int, help="Number of match threads")
203203
@click.option("--random-seed", default=42, type=int, help="Random seed for subsampling")
204+
@click.option("--stop-date", default="2030-01-01", type=str, help="Stopping date")
204205
@click.option("-p", "--precision", default=None, type=int, help="Match precision")
205206
@click.option("--no-progress", default=False, type=bool, help="Don't show progress")
206207
@click.option("-v", "--verbose", count=True)
@@ -218,6 +219,7 @@ def daily_extend(
218219
max_daily_samples,
219220
num_threads,
220221
random_seed,
222+
stop_date,
221223
precision,
222224
no_progress,
223225
verbose,
@@ -259,6 +261,8 @@ def daily_extend(
259261
for ts, date in ts_iter:
260262
output_ts = output_prefix + date + ".ts"
261263
add_provenance(ts, output_ts)
264+
if date >= stop_date:
265+
break
262266

263267

264268
@click.command()

0 commit comments

Comments
 (0)