Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ all releases are available on `PyPI <https://pypi.org/project/pytask>`_ and
system. This facilitates cross-platform builds of projects. Deactivate the check by
setting ``check_casing_of_paths = false`` in the configuration file.
- :gh:`84` fixes an error in the path normalization introduced by :gh:`81`.
- :gh:`85` sorts collected tasks, dependencies, and products by name.


0.0.14 - 2021-03-23
Expand Down
22 changes: 14 additions & 8 deletions src/_pytask/collect_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,25 @@ def _organize_tasks(tasks, common_ancestor):

task_dict = {
reduced_task_name: {
"depends_on": [
relative_to(node.path, common_ancestor)
for node in task.depends_on.values()
],
"produces": [
relative_to(node.path, common_ancestor)
for node in task.produces.values()
],
"depends_on": sorted(
[
relative_to(node.path, common_ancestor)
for node in task.depends_on.values()
]
),
"produces": sorted(
[
relative_to(node.path, common_ancestor)
for node in task.produces.values()
]
),
}
}

dictionary[reduced_task_path].update(task_dict)

dictionary = {key: dictionary[key] for key in sorted(dictionary)}

return dictionary


Expand Down