Utilities for use with click.
Class |
|
Modified from the Click one to still run the source groups function. |
Class |
|
Exceptions generated from the Kedro CLI. |
Function | call |
Run a subprocess command and raise if it fails. |
Function | env |
Add --env CLI option to a function. |
Function | find |
Fetch all stylesheets used in the official Kedro documentation |
Function | forward |
A command that receives the rest of the command line as 'args'. |
Function | get |
Get package version from requirements.txt. |
Function | python |
Run a subprocess command that invokes a Python module. |
Function | split |
Split string by comma, ignoring commas enclosed by square parentheses. This avoids splitting the string of nodes names on commas included in default node names, which have the pattern <function_name>([<input_name>,... |
Function | split |
Split string by comma. |
Constant | CONTEXT |
Undocumented |
Constant | CUTOFF |
Undocumented |
Constant | ENTRY |
Undocumented |
Constant | ENV |
Undocumented |
Constant | MAX |
Undocumented |
Variable | logger |
Undocumented |
Function | _check |
Undocumented |
Function | _clean |
Recursively clean all __pycache__ folders from path . |
Function | _click |
Click option for enabling verbose mode. |
Function | _config |
CLI callback that replaces command line options with values specified in a config file. If command line options are passed, they override config file values. |
Function | _deprecate |
Undocumented |
Function | _filter |
Temporarily suppress all DeprecationWarnings. |
Function | _get |
Get all kedro related entry points |
Function | _get |
Undocumented |
Function | _reformat |
Reformat data structure from tuple to dictionary for load-version , e.g.: ('dataset1:time1', 'dataset2:time2') -> {"dataset1": "time1", "dataset2": "time2"}. |
Function | _safe |
Load entrypoint safely, if fails it will just skip the entrypoint. |
Function | _split |
Undocumented |
Function | _split |
Undocumented |
Function | _suggest |
Undocumented |
Function | _update |
Undocumented |
Run a subprocess command and raise if it fails.
Parameters | |
cmd:List[ | List of command parts. |
**kwargs | Optional keyword arguments passed to subprocess.run . |
Raises | |
click.exceptions.Exit | If subprocess.run returns non-zero code. |
Get package version from requirements.txt.
Parameters | |
reqsUnion[ | Path to requirements.txt file. |
packagestr | Package to search for. |
Returns | |
str | Package and its version as specified in requirements.txt. |
Raises | |
KedroCliError | If the file specified in reqs_path does not exist or package_name was not found in that file. |
Split string by comma, ignoring commas enclosed by square parentheses. This avoids splitting the string of nodes names on commas included in default node names, which have the pattern <function_name>([<input_name>,...]) -> [<output_name>,...])
Note
to_split
will have such commas if and only if it includes a
default node name. User-defined node names cannot include commas or square brackets. - This function will no longer be necessary from Kedro 0.19.*, in which default node names will no longer contain commas
Parameters | |
ctx | Undocumented |
param | Undocumented |
tostr | the string to split safely |
Returns | |
List[ | A list containing the result of safe-splitting the string. |
Undocumented
Value |
|
Recursively clean all __pycache__ folders from path
.
Parameters | |
path:Path | Existing local directory to clean __pycache__ folders from. |
CLI callback that replaces command line options with values specified in a config file. If command line options are passed, they override config file values.
Reformat data structure from tuple to dictionary for load-version
, e.g.:
('dataset1:time1', 'dataset2:time2') -> {"dataset1": "time1", "dataset2": "time2"}.