33Creating and Updating the GitHub Workflows in Your Project
44==========================================================
55
6- PTB can initially generate the GitHub workflows in your project and also
6+ The PTB can initially generate the GitHub workflows in your project and also
77update existing workflows.
88
99The workflows are based on Jinja templates with variables populated by the
10- PTB. The PTB reads the values from various places within your project, see
11- :ref: `template_variables `.
10+ PTB. The PTB reads the values from various attributes and properties of your
11+ project's config, see :ref: `template_variables `.
1212
1313Please note that the PTB only updates the values in the GitHub workflows when
1414*updating * the workflows. So, after updating the :ref: `list of Python versions
@@ -36,8 +36,8 @@ Many workflows are using a Build-matrix to iterate over multiple versions of
3636Python and/or the Exasol Docker DB. This is to make sure your code is valid,
3737free of bugs and working correctly for each combination of these items.
3838
39- PTB has a default for these versions, but you can override it in file
40- ``noxconfig.py ``, e.g.
39+ The PTB has a default for these versions, but you can override it in the
40+ ``noxconfig.py `` file , e.g.
4141
4242.. code-block :: shell
4343
@@ -49,18 +49,62 @@ PTB has a default for these versions, but you can override it in file
4949Some workflows are expected to not depend on a specific Python version and
5050will use only the lowest Python version in the list specified above.
5151
52+ .. _customize_workflows:
53+
54+ Customize Workflows for Your Project
55+ ------------------------------------
56+
57+ The PTB allows you to customise workflows by targeting specific jobs or steps:
58+
59+ * Remove a job by its job_name.
60+ * Replace a step (referenced by step_id) with one or more new steps.
61+ * Insert steps after a specific step_id.
62+
63+ .. note::
64+
65+ These operations do not currently cascade. For example, removing a job
66+ without accounting for its downstream dependencies may result in errors.
67+ You must manually adjust any subsequent steps that rely on the removed
68+ job's or step's output.
69+
70+ To utilize this feature, create a ` ` .workflow-patcher.yml` ` file in your project's
71+ root directory, as specified further in :ref:` workflow_patcher` . This file will be
72+ automatically detected, validated by a pydantic model, and
73+ used when you :ref:` install or update your workflows < update_workflows> ` .
74+
75+ .. note::
76+ The pydantic validation checks that the yml file is in the expected format
77+ and that the specified workflow names exist. However, when a workflow is being
78+ generated, each removed job or modified step_id is checked to see if it exists.
79+ If it does not exist, an exception will be raised (:ref:` workflow_exceptions` ).
80+
5281.. _update_workflows:
5382
5483Add all Workflows to Your Project
5584---------------------------------
5685
5786.. code-block:: shell
5887
59- tbx workflow install all
88+ poetry run -- nox -s workflow:generate -- all
6089
6190.. warning::
62- #. If you already have various workflows, you may want to run the
63- :code:` update` command instead of the :code:` install` command.
91+ Some workflows depend on other workflows. Please ensure you have all
92+ the required workflows if you do not install all of them.
93+
94+ .. note::
95+
96+ The commands:
97+
98+ * ` ` tbx workflow install all` ` - used to install workflows
99+ * ` ` tbx workflow update all` ` - used to update workflows
100+
101+ are considered historic variants of this command.
102+
103+ **Deprecation Notice:**
104+ These ` ` tbx` ` endpoints are marked as **deprecated** and are scheduled for removal
105+ by **April 22nd, 2026**.
64106
65- #. Some workflows depend on other workflows. Please ensure you have all
66- the required workflows if you do not install all of them.
107+ Please note that these legacy commands do not allow users to use their specified
108+ ` ` .workflow-patcher.yml` ` file to further customise or patch workflows. Users
109+ should transition to the ` ` nox` ` -based command to leverage full customisation
110+ features.
0 commit comments