Skip to content

Commit ff7362b

Browse files
authored
Fix inconsistency in API docs Pipeline & Node (#5256)
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
1 parent 3edb135 commit ff7362b

6 files changed

Lines changed: 8 additions & 9 deletions

File tree

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
::: kedro.pipeline.Pipeline
1+
::: kedro.pipeline.pipeline
22
options:
3-
members: true
43
show_source: true

docs/api/pipeline/kedro.pipeline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88

99
| Name | Type | Description |
1010
|-------------------------------|------------|--------------------------------------------------|
11-
| [`kedro.pipeline.node`](kedro.pipeline.node.md) | Function | A decorator to define a node in a Kedro pipeline. |
11+
| [`kedro.pipeline.Node`](kedro.pipeline.node.md) | Class | A class to define a node in a Kedro pipeline. |
1212
| [`kedro.pipeline.Pipeline`](kedro.pipeline.Pipeline.md)| Class | Represents a Kedro pipeline. |

docs/build/pipeline_introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
We previously introduced [Nodes](./nodes.md) as building blocks that represent tasks, and can be combined in a pipeline to build your workflow. A pipeline organises the dependencies and execution order of your collection of nodes, and connects inputs and outputs while keeping your code modular. The pipeline resolves dependencies to determine the node execution order, and does *not* necessarily run the nodes in the order in which they are passed in.
44

5-
To benefit from Kedro's automatic dependency resolution, you can chain your nodes into a [kedro.pipeline.Pipeline][] object, which is a list of nodes that use a shared set of variables. That class can be instantiated using the [kedro.pipeline.Pipeline][] constructor, based on nodes or other pipelines (in which case all nodes from that pipeline will be used).
5+
To benefit from Kedro's automatic dependency resolution, you can chain your nodes into a [`Pipeline`][kedro.pipeline.pipeline.Pipeline] object, which is a list of nodes that use a shared set of variables. That class can be instantiated using the [`Pipeline`][kedro.pipeline.pipeline.Pipeline] constructor, based on nodes or other pipelines (in which case all nodes from that pipeline will be used).
66

77
The following sections explain how to create and use Kedro pipelines:
88

docs/build/pipeline_registry.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The pipeline registry
22

3-
Projects generated using Kedro 0.17.2 or later define their pipelines in `src/<package_name>/pipeline_registry.py`. This, in turn, populates the `pipelines` variable in [`kedro.framework.project`][kedro.framework.project] that the Kedro CLI and plugins use to access project pipelines. The `pipeline_registry` module must contain a top-level `register_pipelines()` function that returns a mapping from pipeline names to [`Pipeline`][kedro.pipeline.Pipeline] objects. For example, the [pipeline registry in the Kedro starter for the completed spaceflights tutorial](https://github.com/kedro-org/kedro-starters/blob/main/spaceflights-pandas/{{ cookiecutter.repo_name }}/src/{{ cookiecutter.python_package }}/pipeline_registry.py) could define the following `register_pipelines()` function that exposes the data processing pipeline, the data science pipeline, and a third, default pipeline that combines both of the aforementioned pipelines:
3+
Projects generated using Kedro 0.17.2 or later define their pipelines in `src/<package_name>/pipeline_registry.py`. This, in turn, populates the `pipelines` variable in [`kedro.framework.project`][kedro.framework.project] that the Kedro CLI and plugins use to access project pipelines. The `pipeline_registry` module must contain a top-level `register_pipelines()` function that returns a mapping from pipeline names to [`Pipeline`][kedro.pipeline.pipeline.Pipeline] objects. For example, the [pipeline registry in the Kedro starter for the completed spaceflights tutorial](https://github.com/kedro-org/kedro-starters/blob/main/spaceflights-pandas/{{ cookiecutter.repo_name }}/src/{{ cookiecutter.python_package }}/pipeline_registry.py) could define the following `register_pipelines()` function that exposes the data processing pipeline, the data science pipeline, and a third, default pipeline that combines both of the aforementioned pipelines:
44

55
```python
66
import spaceflights.pipelines.data_processing as dp
@@ -44,11 +44,11 @@ def register_pipelines() -> Dict[str, Pipeline]:
4444
return pipelines
4545
```
4646

47-
Under the hood, the `find_pipelines()` function traverses the `src/<package_name>/pipelines/` directory and returns a mapping from pipeline directory name to [`Pipeline`][kedro.pipeline.Pipeline] object by:
47+
Under the hood, the `find_pipelines()` function traverses the `src/<package_name>/pipelines/` directory and returns a mapping from pipeline directory name to [`Pipeline`][kedro.pipeline.pipeline.Pipeline] object by:
4848

4949
1. Importing the `<package_name>.pipelines.<pipeline_name>` module
5050
2. Calling the `create_pipeline()` function exposed by the `<package_name>.pipelines.<pipeline_name>` module
51-
3. Validating that the constructed object is a [`Pipeline`][kedro.pipeline.Pipeline]
51+
3. Validating that the constructed object is a [`Pipeline`][kedro.pipeline.pipeline.Pipeline]
5252

5353
By default, if any of these steps fail, `find_pipelines()` (or `find_pipelines(raise_errors=False)`) raises an appropriate warning and skips the current pipeline but continues traversal. During development, this enables you to run your project with some pipelines, even if other pipelines are broken or works in progress.
5454

docs/extend/common_use_cases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Kedro has a few built-in mechanisms for you to extend its behaviour. This docume
44

55
## Use Case 1: How to add extra behaviour to Kedro's execution timeline
66

7-
The execution timeline of a Kedro pipeline can be thought of as a sequence of actions performed by various Kedro library components, such as the [kedro-datasets documentation](https://docs.kedro.org/projects/kedro-datasets/en/stable/), [kedro.io.DataCatalog][], [kedro.pipeline.Pipeline][], [kedro.pipeline.node.Node][] and [kedro.framework.context.KedroContext][].
7+
The execution timeline of a Kedro pipeline can be thought of as a sequence of actions performed by various Kedro library components, such as the [kedro-datasets documentation](https://docs.kedro.org/projects/kedro-datasets/en/stable/), [kedro.io.DataCatalog][], [kedro.pipeline.pipeline.Pipeline][], [kedro.pipeline.node.Node][] and [kedro.framework.context.KedroContext][].
88

99
At different points in the lifecycle of these components, you might want to add extra behaviour: for example, you could add extra computation for profiling purposes _before_ and _after_ a node runs, or _before_ and _after_ the I/O actions of a dataset, namely the `load` and `save` actions.
1010

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ nav:
430430
- kedro.logging: api/kedro.logging.md
431431
- kedro.pipeline:
432432
- Overview: api/pipeline/kedro.pipeline.md
433-
- node: api/pipeline/kedro.pipeline.node.md
433+
- Node: api/pipeline/kedro.pipeline.node.md
434434
- Pipeline: api/pipeline/kedro.pipeline.Pipeline.md
435435
- kedro.runner:
436436
- Overview: api/runner/kedro.runner.md

0 commit comments

Comments
 (0)