Skip to content

Commit

Permalink
release 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
minwook-shin committed Oct 5, 2024
1 parent c2e5504 commit b00f23f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
13 changes: 13 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## Release 0.4.0

### Features

- add graphlib library to check cycle in the scheduler
- raise error if cycle is detected

```python
from f_scheduler import DAG

dag = DAG(use_graphlib=True)
```

## Release 0.3.0

### Features
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pip install f-scheduler
from f_scheduler import ConditionOperator, DefaultFunctionOperator, IterFunctionOperator, DAG, Converter

# create a DAG
dag = DAG()
dag = DAG(use_graphlib=True)

# add tasks to the DAG
dag.add_task(DefaultFunctionOperator(function=print, param=(['hello']), task_id='hello_task'))
Expand All @@ -38,7 +38,7 @@ task_order = ['hello_task', 'condition_task', 'iter_task', 'bye_task']
# set the dependency between tasks
# using the converter
converter = Converter(dag)
converter.convert_list_to_dag(task_order).run('hello_task')
converter.convert_list_to_dag(task_order).run()
# or dag.set_downstream('hello_task', 'condition_task')
# dag.set_downstream('condition_task', 'iter_task')

Expand Down
1 change: 1 addition & 0 deletions f_scheduler/modules/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def run(self, start_task_id=None):
start_task.run()
else:
order = list(self.graph.static_order())
order.reverse()
for task_id in order:
self.tasks[task_id].run()

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exclude = ['f_scheduler*tests']

[project]
name = "f-scheduler"
version = "0.3.0"
version = "0.4.0"
description = "Simplify Function Scheduler with Python 3"
authors = [
{name = "minwook-shin", email = "minwook0106@gmail.com"},
Expand Down

0 comments on commit b00f23f

Please sign in to comment.