Skip to content

Commit 82e2040

Browse files
committed
Bump version to 0.9.6; rename 'type' parameter to 'trigger_type' in scheduling functions for clarity
1 parent be803d9 commit 82e2040

File tree

3 files changed

+9
-27
lines changed

3 files changed

+9
-27
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description = "A simple workflow framework. Hamilton + APScheduler = FlowerPower
44
authors = [{name = "Volker L.", email = "[email protected]"}]
55
readme = "README.md"
66
requires-python = ">= 3.11"
7-
version = "0.9.5"
7+
version = "0.9.6"
88
keywords = [
99
"hamilton",
1010
"workflow",

src/flowerpower/cli/pipeline.py

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def schedule(
236236
name: str,
237237
executor: str = "local",
238238
base_dir: str | None = None,
239-
type: str = "cron",
239+
trigger_type: str = "cron",
240240
inputs: str | None = None,
241241
final_vars: str | None = None,
242242
config: str | None = None,
@@ -263,7 +263,7 @@ def schedule(
263263
name: Name of the pipeline to schedule
264264
executor: Executor to use
265265
base_dir: Base directory for the pipeline
266-
type: Type of schedule
266+
trigger_type: Type of schedule
267267
inputs: Input parameters as JSON, dict string, or key=value pairs
268268
final_vars: Final variables as JSON or list
269269
config: Config for the hamilton pipeline executor
@@ -300,16 +300,16 @@ def schedule(
300300
pipeline schedule my_pipeline --storage-options 'endpoint=http://localhost,use_ssl=true'
301301
302302
# Cron schedule
303-
pipeline schedule my_pipeline --type cron --crontab '0 0 * * *'
303+
pipeline schedule my_pipeline --trigger-type cron --crontab '0 0 * * *'
304304
305305
# Interval schedule
306-
pipeline schedule my_pipeline --type interval --interval_params minutes=1
306+
pipeline schedule my_pipeline --trigger-type interval --interval_params minutes=1
307307
308308
# Calendar interval schedule
309-
pipeline schedule my_pipeline --type calendarinterval --calendarinterval_params month=5
309+
pipeline schedule my_pipeline --trigger-type calendarinterval --calendarinterval_params month=5
310310
311311
# Date schedule
312-
pipeline schedule my_pipeline --type date --date_params run_date='2021-01-01 12:00:01'
312+
pipeline schedule my_pipeline --trigger-type date --date_params run_date='2021-01-01 12:00:01'
313313
314314
"""
315315
if get_schedule_manager is None:
@@ -354,7 +354,7 @@ def schedule(
354354
) as pipeline:
355355
id_ = pipeline.schedule(
356356
executor=executor,
357-
type=type,
357+
trigger_type=trigger_type,
358358
inputs=parsed_inputs,
359359
final_vars=parsed_final_vars,
360360
config=parsed_config,
@@ -377,7 +377,6 @@ def schedule(
377377
def schedule_all(
378378
executor: str = "local",
379379
base_dir: str | None = None,
380-
type: str = "cron",
381380
inputs: str | None = None,
382381
final_vars: str | None = None,
383382
config: str | None = None,
@@ -389,11 +388,6 @@ def schedule_all(
389388
max_jitter: float | None = None,
390389
max_running_jobs: int | None = None,
391390
conflict_policy: str = "do_nothing",
392-
crontab: str | None = None,
393-
cron_params: str | None = None,
394-
interval_params: str | None = None,
395-
calendarinterval_params: str | None = None,
396-
date_params: str | None = None,
397391
storage_options: str | None = None,
398392
overwrite: bool = False,
399393
):
@@ -403,7 +397,6 @@ def schedule_all(
403397
Args:
404398
executor: Executor to use
405399
base_dir: Base directory for the pipeline
406-
type: Type of schedule
407400
inputs: Input parameters as JSON, dict string, or key=value pairs
408401
final_vars: Final variables as JSON or list
409402
config: Config for the hamilton pipeline executor
@@ -415,11 +408,6 @@ def schedule_all(
415408
max_jitter: Maximum jitter
416409
max_running_jobs: Maximum running jobs
417410
conflict_policy: Conflict policy
418-
crontab: Crontab expression
419-
cron_params: Cron parameters as JSON or key=value pairs
420-
interval_params: Interval parameters as JSON or key=value pairs
421-
calendarinterval_params: Calendar interval parameters as JSON or key=value pairs
422-
date_params: Date parameters as JSON or key=value pairs
423411
storage_options: Storage options as JSON, dict string, or key=value pairs
424412
overwrite: Overwrite existing schedule
425413
@@ -437,7 +425,6 @@ def schedule_all(
437425
) as manager:
438426
manager.schedule_all(
439427
executor=executor,
440-
type=type,
441428
inputs=inputs,
442429
final_vars=final_vars,
443430
config=config,
@@ -450,11 +437,6 @@ def schedule_all(
450437
max_running_jobs=max_running_jobs,
451438
conflict_policy=conflict_policy,
452439
overwrite=overwrite,
453-
crontab=crontab,
454-
cron_params=cron_params,
455-
interval_params=interval_params,
456-
calendarinterval_params=calendarinterval_params,
457-
date_params=date_params,
458440
)
459441

460442

src/flowerpower/flowerpower.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def init(
5151
5252
🔧 Install uv:
5353
[dim]Run:[/dim] [bold white]pip install uv[/bold white]
54-
[dim]More options:[/dim]
54+
[dim]More options:[/dim]
5555
[blue underline]https://docs.astral.sh/uv/getting-started/installation/[/blue underline]
5656
5757
🚀 Initialize your project:

0 commit comments

Comments
 (0)