From 280308f9660760d6bda4721c749d4db44bf459ed Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Tue, 4 Nov 2025 22:19:54 +0100 Subject: [PATCH 1/2] Clarify documentation. --- .../how_to_guides/functional_interface.ipynb | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/docs/source/how_to_guides/functional_interface.ipynb b/docs/source/how_to_guides/functional_interface.ipynb index 3306a789..76293065 100644 --- a/docs/source/how_to_guides/functional_interface.ipynb +++ b/docs/source/how_to_guides/functional_interface.ipynb @@ -85,11 +85,11 @@ { "data": { "text/html": [ - "
Platform: darwin -- Python 3.12.12, pytask 0.5.6.dev17+g2a33ab7d5.d20251030, pluggy 1.6.0\n",
+       "
Platform: darwin -- Python 3.12.12, pytask 0.5.6, pluggy 1.6.0\n",
        "
\n" ], "text/plain": [ - "Platform: darwin -- Python 3.12.12, pytask 0.5.6.dev17+g2a33ab7d5.d20251030, pluggy 1.6.0\n" + "Platform: darwin -- Python 3.12.12, pytask 0.5.6, pluggy 1.6.0\n" ] }, "metadata": {}, @@ -147,7 +147,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "7727ceef87cf49c9a926679362ef6c96", + "model_id": "c58c8439b3e24cbd9bd96afd98ed0b06", "version_major": 2, "version_minor": 0 }, @@ -184,9 +184,9 @@ "╭─────────────────────────┬─────────╮\n", "│\u001b[1m \u001b[0m\u001b[1mTask \u001b[0m\u001b[1m \u001b[0m│\u001b[1m \u001b[0m\u001b[1mOutcome\u001b[0m\u001b[1m \u001b[0m│\n", "├─────────────────────────┼─────────┤\n", - "│ \u001b]8;id=303527;file://None\u001b\\task_create_first_file \u001b]8;;\u001b\\ │ \u001b[38;2;19;124;57m. \u001b[0m │\n", - "│ \u001b]8;id=36996;file://None\u001b\\task_create_second_file\u001b]8;;\u001b\\ │ \u001b[38;2;19;124;57m. \u001b[0m │\n", - "│ \u001b]8;id=56184;file://None\u001b\\task_merge_files \u001b]8;;\u001b\\ │ \u001b[38;2;19;124;57m. \u001b[0m │\n", + "│ \u001b]8;id=73604;file://None\u001b\\task_create_first_file \u001b]8;;\u001b\\ │ \u001b[38;2;19;124;57m. \u001b[0m │\n", + "│ \u001b]8;id=609946;file://None\u001b\\task_create_second_file\u001b]8;;\u001b\\ │ \u001b[38;2;19;124;57m. \u001b[0m │\n", + "│ \u001b]8;id=378329;file://None\u001b\\task_merge_files \u001b]8;;\u001b\\ │ \u001b[38;2;19;124;57m. \u001b[0m │\n", "╰─────────────────────────┴─────────╯\n" ] }, @@ -273,7 +273,7 @@ { "data": { "text/plain": [ - "Session(config={'pm': , 'markers': {'filterwarnings': 'Add a filter for a warning to a task.', 'persist': 'Prevent execution of a task if all products exist and even if something has changed (dependencies, source file, products). This decorator might be useful for expensive tasks where only the formatting of the file has changed. The state of the files which have changed will also be remembered and another run will skip the task with success.', 'skip': 'Skip a task and all its dependent tasks.', 'skip_ancestor_failed': 'Internal decorator applied to tasks if any of its preceding tasks failed.', 'skip_unchanged': 'Internal decorator applied to tasks which have already been executed and have not been changed.', 'skipif': 'Skip a task and all its dependent tasks if a condition is met.', 'task': 'Mark a function as a task regardless of its name. Or mark tasks which are repeated in a loop. See this tutorial for more information: [link https://bit.ly/3DWrXS3]https://bit.ly/3DWrXS3[/].', 'try_first': 'Try to execute a task a early as possible.', 'try_last': 'Try to execute a task a late as possible.'}, 'config': None, 'database_url': sqlite:////Users/tobiasr/git/pytask/.pytask/pytask.sqlite3, 'editor_url_scheme': 'file', 'export': <_ExportFormats.NO: 'no'>, 'hook_module': None, 'ignore': ['.codecov.yml', '.gitignore', '.pre-commit-config.yaml', '.readthedocs.yml', '.readthedocs.yaml', 'readthedocs.yml', 'readthedocs.yaml', 'environment.yml', 'pyproject.toml', 'setup.cfg', 'tox.ini', '.git/*', '.venv/*', '.pixi/*', '*.egg-info/*', '.ipynb_checkpoints/*', '.mypy_cache/*', '.nox/*', '.tox/*', '_build/*', '__pycache__/*', 'build/*', 'dist/*', 'pytest_cache/*'], 'paths': [], 'layout': 'dot', 'output_path': 'dag.pdf', 'rank_direction': <_RankDirection.TB: 'TB'>, 'expression': '', 'marker_expression': '', 'nodes': False, 'strict_markers': False, 'directories': False, 'exclude': [None, '.git/*', '/Users/tobiasr/git/pytask/.pytask/*'], 'mode': <_CleanMode.DRY_RUN: 'dry-run'>, 'quiet': False, 'capture': , 'debug_pytask': False, 'disable_warnings': False, 'dry_run': False, 'explain': False, 'force': False, 'max_failures': inf, 'n_entries_in_table': 15, 'pdb': False, 'pdbcls': None, 's': False, 'show_capture': , 'show_errors_immediately': False, 'show_locals': False, 'show_traceback': True, 'sort_table': True, 'trace': False, 'verbose': 1, 'stop_after_first_failure': False, 'check_casing_of_paths': True, 'pdb_cls': '', 'tasks': [, , at 0x11346e160>], 'task_files': ('task_*.py',), 'command': 'build', 'root': PosixPath('/Users/tobiasr/git/pytask'), 'filterwarnings': []}, collection_reports=[CollectionReport(outcome=, node=TaskWithoutPath(name='task_create_first_file', function=, depends_on={}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/first.txt'), name='pytask/docs/source/how_to_guides/first.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('c59f0999-a828-4b41-b0c0-b274b57273e6'), 'after': [], 'is_generator': False, 'duration': (1761861388.575503, 1761861388.575783)}), exc_info=None), CollectionReport(outcome=, node=TaskWithoutPath(name='task_create_second_file', function= at 0x11346e160>, depends_on={}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/second.txt'), name='pytask/docs/source/how_to_guides/second.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('74d5f952-75ab-44f8-b219-984f44e92684'), 'after': [], 'is_generator': False, 'duration': (1761861388.5663831, 1761861388.566726)}), exc_info=None), CollectionReport(outcome=, node=TaskWithoutPath(name='task_merge_files', function=, depends_on={'first': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/first.txt'), name='pytask/docs/source/how_to_guides/first.txt', attributes={}), 'second': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/second.txt'), name='pytask/docs/source/how_to_guides/second.txt', attributes={})}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/hello_world.txt'), name='pytask/docs/source/how_to_guides/hello_world.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('801a135a-f9ed-427c-8204-14dd1a68fc9c'), 'after': [], 'is_generator': False, 'duration': (1761861388.581853, 1761861388.582324)}), exc_info=None)], dag=, hook=, tasks=[TaskWithoutPath(name='task_create_first_file', function=, depends_on={}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/first.txt'), name='pytask/docs/source/how_to_guides/first.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('c59f0999-a828-4b41-b0c0-b274b57273e6'), 'after': [], 'is_generator': False, 'duration': (1761861388.575503, 1761861388.575783)}), TaskWithoutPath(name='task_create_second_file', function= at 0x11346e160>, depends_on={}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/second.txt'), name='pytask/docs/source/how_to_guides/second.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('74d5f952-75ab-44f8-b219-984f44e92684'), 'after': [], 'is_generator': False, 'duration': (1761861388.5663831, 1761861388.566726)}), TaskWithoutPath(name='task_merge_files', function=, depends_on={'first': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/first.txt'), name='pytask/docs/source/how_to_guides/first.txt', attributes={}), 'second': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/second.txt'), name='pytask/docs/source/how_to_guides/second.txt', attributes={})}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/hello_world.txt'), name='pytask/docs/source/how_to_guides/hello_world.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('801a135a-f9ed-427c-8204-14dd1a68fc9c'), 'after': [], 'is_generator': False, 'duration': (1761861388.581853, 1761861388.582324)})], dag_report=None, execution_reports=[ExecutionReport(task=TaskWithoutPath(name='task_create_second_file', function= at 0x11346e160>, depends_on={}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/second.txt'), name='pytask/docs/source/how_to_guides/second.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('74d5f952-75ab-44f8-b219-984f44e92684'), 'after': [], 'is_generator': False, 'duration': (1761861388.5663831, 1761861388.566726)}), outcome=, exc_info=None, sections=[]), ExecutionReport(task=TaskWithoutPath(name='task_create_first_file', function=, depends_on={}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/first.txt'), name='pytask/docs/source/how_to_guides/first.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('c59f0999-a828-4b41-b0c0-b274b57273e6'), 'after': [], 'is_generator': False, 'duration': (1761861388.575503, 1761861388.575783)}), outcome=, exc_info=None, sections=[]), ExecutionReport(task=TaskWithoutPath(name='task_merge_files', function=, depends_on={'first': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/first.txt'), name='pytask/docs/source/how_to_guides/first.txt', attributes={}), 'second': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/second.txt'), name='pytask/docs/source/how_to_guides/second.txt', attributes={})}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/hello_world.txt'), name='pytask/docs/source/how_to_guides/hello_world.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('801a135a-f9ed-427c-8204-14dd1a68fc9c'), 'after': [], 'is_generator': False, 'duration': (1761861388.581853, 1761861388.582324)}), outcome=, exc_info=None, sections=[])], exit_code=, collection_start=1761861388.557942, collection_end=1761861388.560052, execution_start=1761861388.560833, execution_end=1761861388.587148, n_tasks_failed=0, scheduler=TopologicalSorter(dag=, priorities={'82d6a7ce01a2a50d5d4bd5081d662df92b8c500fbc172f94fb026c9d1d4ebc4a': 0, '2a06f358fc8e621754c133af76f5ac1b3e8ad5172b5803823cb264b30ea5d829': 0, '45a637ca3cc7aa973d4b315cc1bef02217b79918357fd35c6fa61f4e2d2f9948': 0}, _nodes_processing=set(), _nodes_done={'82d6a7ce01a2a50d5d4bd5081d662df92b8c500fbc172f94fb026c9d1d4ebc4a', '2a06f358fc8e621754c133af76f5ac1b3e8ad5172b5803823cb264b30ea5d829', '45a637ca3cc7aa973d4b315cc1bef02217b79918357fd35c6fa61f4e2d2f9948'}), should_stop=False, warnings=[])" + "Session(config={'pm': , 'markers': {'filterwarnings': 'Add a filter for a warning to a task.', 'persist': 'Prevent execution of a task if all products exist and even if something has changed (dependencies, source file, products). This decorator might be useful for expensive tasks where only the formatting of the file has changed. The state of the files which have changed will also be remembered and another run will skip the task with success.', 'skip': 'Skip a task and all its dependent tasks.', 'skip_ancestor_failed': 'Internal decorator applied to tasks if any of its preceding tasks failed.', 'skip_unchanged': 'Internal decorator applied to tasks which have already been executed and have not been changed.', 'skipif': 'Skip a task and all its dependent tasks if a condition is met.', 'task': 'Mark a function as a task regardless of its name. Or mark tasks which are repeated in a loop. See this tutorial for more information: [link https://bit.ly/3DWrXS3]https://bit.ly/3DWrXS3[/].', 'try_first': 'Try to execute a task a early as possible.', 'try_last': 'Try to execute a task a late as possible.'}, 'config': None, 'database_url': sqlite:////Users/tobiasr/git/pytask/.pytask/pytask.sqlite3, 'editor_url_scheme': 'file', 'export': <_ExportFormats.NO: 'no'>, 'hook_module': None, 'ignore': ['.codecov.yml', '.gitignore', '.pre-commit-config.yaml', '.readthedocs.yml', '.readthedocs.yaml', 'readthedocs.yml', 'readthedocs.yaml', 'environment.yml', 'pyproject.toml', 'setup.cfg', 'tox.ini', '.git/*', '.venv/*', '.pixi/*', '*.egg-info/*', '.ipynb_checkpoints/*', '.mypy_cache/*', '.nox/*', '.tox/*', '_build/*', '__pycache__/*', 'build/*', 'dist/*', 'pytest_cache/*'], 'paths': [], 'layout': 'dot', 'output_path': 'dag.pdf', 'rank_direction': <_RankDirection.TB: 'TB'>, 'expression': '', 'marker_expression': '', 'nodes': False, 'strict_markers': False, 'directories': False, 'exclude': [None, '.git/*', '/Users/tobiasr/git/pytask/.pytask/*'], 'mode': <_CleanMode.DRY_RUN: 'dry-run'>, 'quiet': False, 'capture': , 'debug_pytask': False, 'disable_warnings': False, 'dry_run': False, 'explain': False, 'force': False, 'max_failures': inf, 'n_entries_in_table': 15, 'pdb': False, 'pdbcls': None, 's': False, 'show_capture': , 'show_errors_immediately': False, 'show_locals': False, 'show_traceback': True, 'sort_table': True, 'trace': False, 'verbose': 1, 'stop_after_first_failure': False, 'check_casing_of_paths': True, 'pdb_cls': '', 'tasks': [, , at 0x1116de160>], 'task_files': ('task_*.py',), 'command': 'build', 'root': PosixPath('/Users/tobiasr/git/pytask'), 'filterwarnings': []}, collection_reports=[CollectionReport(outcome=, node=TaskWithoutPath(name='task_merge_files', function=, depends_on={'first': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/first.txt'), name='pytask/docs/source/how_to_guides/first.txt', attributes={}), 'second': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/second.txt'), name='pytask/docs/source/how_to_guides/second.txt', attributes={})}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/hello_world.txt'), name='pytask/docs/source/how_to_guides/hello_world.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('e5b74aa3-9f13-4f44-b1a3-81ebb5338ae3'), 'after': [], 'is_generator': False, 'duration': (1762291140.39473, 1762291140.395363)}), exc_info=None), CollectionReport(outcome=, node=TaskWithoutPath(name='task_create_first_file', function=, depends_on={}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/first.txt'), name='pytask/docs/source/how_to_guides/first.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('ced0baa8-1f08-43dc-b681-88bdc41a2a50'), 'after': [], 'is_generator': False, 'duration': (1762291140.380946, 1762291140.381288)}), exc_info=None), CollectionReport(outcome=, node=TaskWithoutPath(name='task_create_second_file', function= at 0x1116de160>, depends_on={}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/second.txt'), name='pytask/docs/source/how_to_guides/second.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('e45f1eec-32c3-4a93-bac4-92efa48f3b3f'), 'after': [], 'is_generator': False, 'duration': (1762291140.388247, 1762291140.388503)}), exc_info=None)], dag=, hook=, tasks=[TaskWithoutPath(name='task_merge_files', function=, depends_on={'first': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/first.txt'), name='pytask/docs/source/how_to_guides/first.txt', attributes={}), 'second': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/second.txt'), name='pytask/docs/source/how_to_guides/second.txt', attributes={})}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/hello_world.txt'), name='pytask/docs/source/how_to_guides/hello_world.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('e5b74aa3-9f13-4f44-b1a3-81ebb5338ae3'), 'after': [], 'is_generator': False, 'duration': (1762291140.39473, 1762291140.395363)}), TaskWithoutPath(name='task_create_first_file', function=, depends_on={}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/first.txt'), name='pytask/docs/source/how_to_guides/first.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('ced0baa8-1f08-43dc-b681-88bdc41a2a50'), 'after': [], 'is_generator': False, 'duration': (1762291140.380946, 1762291140.381288)}), TaskWithoutPath(name='task_create_second_file', function= at 0x1116de160>, depends_on={}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/second.txt'), name='pytask/docs/source/how_to_guides/second.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('e45f1eec-32c3-4a93-bac4-92efa48f3b3f'), 'after': [], 'is_generator': False, 'duration': (1762291140.388247, 1762291140.388503)})], dag_report=None, execution_reports=[ExecutionReport(task=TaskWithoutPath(name='task_create_first_file', function=, depends_on={}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/first.txt'), name='pytask/docs/source/how_to_guides/first.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('ced0baa8-1f08-43dc-b681-88bdc41a2a50'), 'after': [], 'is_generator': False, 'duration': (1762291140.380946, 1762291140.381288)}), outcome=, exc_info=None, sections=[]), ExecutionReport(task=TaskWithoutPath(name='task_create_second_file', function= at 0x1116de160>, depends_on={}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/second.txt'), name='pytask/docs/source/how_to_guides/second.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('e45f1eec-32c3-4a93-bac4-92efa48f3b3f'), 'after': [], 'is_generator': False, 'duration': (1762291140.388247, 1762291140.388503)}), outcome=, exc_info=None, sections=[]), ExecutionReport(task=TaskWithoutPath(name='task_merge_files', function=, depends_on={'first': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/first.txt'), name='pytask/docs/source/how_to_guides/first.txt', attributes={}), 'second': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/second.txt'), name='pytask/docs/source/how_to_guides/second.txt', attributes={})}, produces={'return': PathNode(path=PosixPath('/Users/tobiasr/git/pytask/docs/source/how_to_guides/hello_world.txt'), name='pytask/docs/source/how_to_guides/hello_world.txt', attributes={})}, markers=[Mark(name='task', args=(), kwargs={})], report_sections=[], attributes={'collection_id': UUID('e5b74aa3-9f13-4f44-b1a3-81ebb5338ae3'), 'after': [], 'is_generator': False, 'duration': (1762291140.39473, 1762291140.395363)}), outcome=, exc_info=None, sections=[])], exit_code=, collection_start=1762291140.371644, collection_end=1762291140.374173, execution_start=1762291140.374835, execution_end=1762291140.402872, n_tasks_failed=0, scheduler=TopologicalSorter(dag=, priorities={'45a637ca3cc7aa973d4b315cc1bef02217b79918357fd35c6fa61f4e2d2f9948': 0, '82d6a7ce01a2a50d5d4bd5081d662df92b8c500fbc172f94fb026c9d1d4ebc4a': 0, '2a06f358fc8e621754c133af76f5ac1b3e8ad5172b5803823cb264b30ea5d829': 0}, _nodes_processing=set(), _nodes_done={'2a06f358fc8e621754c133af76f5ac1b3e8ad5172b5803823cb264b30ea5d829', '82d6a7ce01a2a50d5d4bd5081d662df92b8c500fbc172f94fb026c9d1d4ebc4a', '45a637ca3cc7aa973d4b315cc1bef02217b79918357fd35c6fa61f4e2d2f9948'}), should_stop=False, warnings=[])" ] }, "execution_count": 4, @@ -291,7 +291,7 @@ "source": [ "## Repeated Tasks\n", "\n", - "You can also create multiple tasks with the same function name by using the `@task` decorator in a loop. This is useful when you want to run the same operation with different parameters." + "You can also create multiple tasks with the same function by repeating the task in a loop. (Because we are collecting the tasks ourselves in a list, we don't necessarily need the `@task` decorator, but you can still use it.) This is useful when you want to run the same operation with different parameters." ] }, { @@ -302,7 +302,6 @@ "source": [ "from pytask import Product\n", "\n", - "# Create repeated tasks with different parameters\n", "tasks = []\n", "for i in range(3):\n", "\n", @@ -335,11 +334,11 @@ { "data": { "text/html": [ - "
Platform: darwin -- Python 3.12.12, pytask 0.5.6.dev17+g2a33ab7d5.d20251030, pluggy 1.6.0\n",
+       "
Platform: darwin -- Python 3.12.12, pytask 0.5.6, pluggy 1.6.0\n",
        "
\n" ], "text/plain": [ - "Platform: darwin -- Python 3.12.12, pytask 0.5.6.dev17+g2a33ab7d5.d20251030, pluggy 1.6.0\n" + "Platform: darwin -- Python 3.12.12, pytask 0.5.6, pluggy 1.6.0\n" ] }, "metadata": {}, @@ -397,7 +396,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "eb660941cbb04250b67d08f7f7c134de", + "model_id": "859e802368444863ba691ca1474c1163", "version_major": 2, "version_minor": 0 }, @@ -434,9 +433,9 @@ "╭────────────────────────┬─────────╮\n", "│\u001b[1m \u001b[0m\u001b[1mTask \u001b[0m\u001b[1m \u001b[0m│\u001b[1m \u001b[0m\u001b[1mOutcome\u001b[0m\u001b[1m \u001b[0m│\n", "├────────────────────────┼─────────┤\n", - "│ \u001b]8;id=505794;file://None\u001b\\create_file[0-path0] \u001b]8;;\u001b\\ │ \u001b[38;2;19;124;57m. \u001b[0m │\n", - "│ \u001b]8;id=700433;file://None\u001b\\create_file[100-path1]\u001b]8;;\u001b\\ │ \u001b[38;2;19;124;57m. \u001b[0m │\n", - "│ \u001b]8;id=284007;file://None\u001b\\create_file[200-path2]\u001b]8;;\u001b\\ │ \u001b[38;2;19;124;57m. \u001b[0m │\n", + "│ \u001b]8;id=133063;file://None\u001b\\create_file[0-path0] \u001b]8;;\u001b\\ │ \u001b[38;2;19;124;57m. \u001b[0m │\n", + "│ \u001b]8;id=167889;file://None\u001b\\create_file[100-path1]\u001b]8;;\u001b\\ │ \u001b[38;2;19;124;57m. \u001b[0m │\n", + "│ \u001b]8;id=365664;file://None\u001b\\create_file[200-path2]\u001b]8;;\u001b\\ │ \u001b[38;2;19;124;57m. \u001b[0m │\n", "╰────────────────────────┴─────────╯\n" ] }, From a5959b569b56a21ae081dfa27303971ef11766c1 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Tue, 4 Nov 2025 22:28:54 +0100 Subject: [PATCH 2/2] Remove two unnecessary columsn: --- .../how_to_guides/interfaces_for_dependencies_products.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/source/how_to_guides/interfaces_for_dependencies_products.md b/docs/source/how_to_guides/interfaces_for_dependencies_products.md index cb2b9ea4..35b925c5 100644 --- a/docs/source/how_to_guides/interfaces_for_dependencies_products.md +++ b/docs/source/how_to_guides/interfaces_for_dependencies_products.md @@ -18,7 +18,6 @@ a task. When we talk about products later, the same interfaces will be used. | | `def task(arg: ... = ...)` | `Annotated[..., value]` | `@task(kwargs=...)` | | --------------------------------------- | :------------------------: | :---------------------: | :-----------------: | -| Not deprecated | ✅ | ✅ | ✅ | | No type annotations required | ✅ | ❌ | ✅ | | Flexible choice of argument name | ✅ | ✅ | ✅ | | Supports third-party functions as tasks | ❌ | ❌ | ✅ | @@ -60,7 +59,6 @@ dictionary. It applies to dependencies and products alike. | | `def task(arg: Annotated[..., Product] = ...)` | `Annotated[..., value, Product]` | `produces` | `@task(produces=...)` | `def task() -> Annotated[..., value]` | | --------------------------------------------------------- | :--------------------------------------------: | :------------------------------: | :--------: | :-------------------: | :-----------------------------------: | -| Not deprecated | ✅ | ✅ | ✅ | ✅ | ✅ | | No type annotations required | ❌ | ❌ | ✅ | ✅ | ❌ | | Flexible choice of argument name | ✅ | ✅ | ❌ | ✅ | ➖ | | Supports third-party functions as tasks | ❌ | ❌ | ❌ | ✅ | ❌ |