You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/05 09:48:18 UTC

[GitHub] [airflow] ashb commented on a diff in pull request #22741: Show tasks in grid view based on topological sort.

ashb commented on code in PR #22741:
URL: https://github.com/apache/airflow/pull/22741#discussion_r842588752


##########
airflow/utils/task_group.py:
##########
@@ -401,6 +401,69 @@ def expand(self, arg: Iterable) -> "MappedTaskGroup":
             self.task_group._remove(self)
         return MappedTaskGroup(group_id=self._group_id, dag=self.dag, mapped_arg=arg)
 
+    def topological_sort(self, _include_subdag_tasks: bool = False):
+        """
+        Sorts children in topographical order, such that a task comes after any of its
+        upstream dependencies.
+
+        Heavily inspired by:
+        http://blog.jupo.org/2012/04/06/topological-sorting-acyclic-directed-graphs/

Review Comment:
   Oh yeah :( I copied the doc over without checking it. I'll see if I can find a suitable replacement URL (and remove it from the doc string)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org