Skip to content

Introduce scheduler protocol and simple scheduler#831

Merged
tobiasraabe merged 11 commits intomainfrom
refactor/scheduler-protocol
Mar 27, 2026
Merged

Introduce scheduler protocol and simple scheduler#831
tobiasraabe merged 11 commits intomainfrom
refactor/scheduler-protocol

Conversation

@tobiasraabe
Copy link
Copy Markdown
Member

Changes

  • introduce PScheduler as the scheduler protocol
  • move the default scheduler implementation to _pytask.scheduler
  • rename the default implementation to SimpleScheduler
  • keep TopologicalSorter as a compatibility alias and re-export it from _pytask.dag_utils
  • switch provisional DAG recreation to scheduler.rebuild(...)

Todo

  • Reference issues which can be closed due to this PR with "Closes #x".
  • Review whether the documentation needs to be updated.
  • Document PR in docs/source/changes.md.

Validation

  • just typing
  • uv run --group test pytest tests/test_dag_utils.py tests/test_execute.py -k 'not download_file' -q
  • uvx ruff check src/_pytask/scheduler.py src/_pytask/dag_utils.py src/_pytask/execute.py tests/test_dag_utils.py
  • uvx ruff format --check src/_pytask/scheduler.py src/_pytask/dag_utils.py src/_pytask/execute.py src/_pytask/provisional_utils.py src/_pytask/session.py tests/test_dag_utils.py

Base automatically changed from refactor/internal-dag-networkx-optional to main March 27, 2026 22:58
…otocol

# Conflicts:
#	src/_pytask/dag.py
#	src/_pytask/dag_command.py
#	src/_pytask/dag_graph.py
#	src/_pytask/dag_utils.py
#	src/_pytask/execute.py
#	src/_pytask/mark/__init__.py
#	src/_pytask/session.py
#	src/_pytask/shared.py
#	tests/test_dag_utils.py
@tobiasraabe tobiasraabe added this pull request to the merge queue Mar 27, 2026
Merged via the queue into main with commit 4e7e718 Mar 27, 2026
21 checks passed
@tobiasraabe tobiasraabe deleted the refactor/scheduler-protocol branch March 27, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant