Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a tip on YAML anchors to docs on dataset layers #2181

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

yury-fedotov
Copy link
Contributor

@yury-fedotov yury-fedotov commented Nov 8, 2024

Description

Closes #2127

Checklist

  • Test if docs render as expected
  • Confirm that content matches expectations

@yury-fedotov yury-fedotov changed the title Give YAML anchors example in docs Add a tip on YAML anchors to docs on dataset layers Nov 8, 2024
layer: raw
can be avoided by leveraging YAML's native syntax for anchors and aliases.
See [this example from the Kedro docs](https://docs.kedro.org/en/stable/data/data_catalog_yaml_examples.html#load-multiple-datasets-with-similar-configuration-using-yaml-anchors).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that those are the docs of a separate project - I assume there's no way to link it other than through static URL?

@yury-fedotov
Copy link
Contributor Author

yury-fedotov commented Nov 8, 2024

Rendered docs: https://kedro--2181.org.readthedocs.build/projects/kedro-viz/en/2181/kedro-viz_visualisation.html#visualise-layers

image

We can't have yaml block nested inside RST note or tip block, so I decided to do just yaml instead. Because without it, RST format compresses those three lines into one: metadata: kedro-viz: layer: raw which is misleading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document how to leverage YAML anchors & aliases to avoid copy-pasting properties in catalog
1 participant