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

Improve kedro viz build usage documentation #2126

Merged
merged 5 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ Please follow the established format:

## Bug fixes and other changes

- Improve `kedro viz build` usage documentation (#2126)
- Fix unserializable parameters value (#2122)


# Release 10.0.0

## Major features and improvements
Expand Down
26 changes: 26 additions & 0 deletions docs/source/platform_agnostic_sharing_with_kedro_viz.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,32 @@

This creates a `build` folder containing your Kedro-Viz app package in your project directory.

## Running Kedro-Viz Locally

Check warning on line 49 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L49

[Kedro-viz.headings] 'Running Kedro-Viz Locally' should use sentence-style capitalization.
Raw output
{"message": "[Kedro-viz.headings] 'Running Kedro-Viz Locally' should use sentence-style capitalization.", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 49, "column": 4}}}, "severity": "WARNING"}

When you generate the build folder using the command `kedro viz build`, it creates a build directory with an `index.html` file, which serves as the entry point for visualizing your pipeline. However, simply opening `index.html` using the `file://` protocol is not supported due to Cross-Origin Resource Sharing (CORS) policies in modern browsers.

Check warning on line 51 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L51

[Kedro-viz.ukspelling] In general, use UK English spelling instead of 'visualizing'.
Raw output
{"message": "[Kedro-viz.ukspelling] In general, use UK English spelling instead of 'visualizing'.", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 51, "column": 165}}}, "severity": "WARNING"}

Check warning on line 51 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L51

[Kedro-viz.toowordy] 'However' is too wordy
Raw output
{"message": "[Kedro-viz.toowordy] 'However' is too wordy", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 51, "column": 192}}}, "severity": "WARNING"}

Check warning on line 51 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L51

[Kedro-viz.words] Use '' instead of 'simply'.
Raw output
{"message": "[Kedro-viz.words] Use '' instead of 'simply'.", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 51, "column": 201}}}, "severity": "WARNING"}

Check warning on line 51 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L51

[Kedro-viz.weaselwords] 'simply' is a weasel word!
Raw output
{"message": "[Kedro-viz.weaselwords] 'simply' is a weasel word!", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 51, "column": 201}}}, "severity": "WARNING"}

### Using a Local Server

Check warning on line 53 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L53

[Kedro-viz.headings] 'Using a Local Server' should use sentence-style capitalization.
Raw output
{"message": "[Kedro-viz.headings] 'Using a Local Server' should use sentence-style capitalization.", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 53, "column": 5}}}, "severity": "WARNING"}

To view your pipeline visualization correctly, you need to serve `index.html` using an HTTP server. Here are a few simple ways to do this:

Check warning on line 55 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L55

[Kedro-viz.ukspelling] In general, use UK English spelling instead of 'visualization'.
Raw output
{"message": "[Kedro-viz.ukspelling] In general, use UK English spelling instead of 'visualization'.", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 55, "column": 23}}}, "severity": "WARNING"}

Check warning on line 55 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L55

[Kedro-viz.weaselwords] 'correctly' is a weasel word!
Raw output
{"message": "[Kedro-viz.weaselwords] 'correctly' is a weasel word!", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 55, "column": 37}}}, "severity": "WARNING"}

Check warning on line 55 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L55

[Kedro-viz.weaselwords] 'few' is a weasel word!
Raw output
{"message": "[Kedro-viz.weaselwords] 'few' is a weasel word!", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 55, "column": 112}}}, "severity": "WARNING"}

Check warning on line 55 in docs/source/platform_agnostic_sharing_with_kedro_viz.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/platform_agnostic_sharing_with_kedro_viz.md#L55

[Kedro-viz.words] Use '' instead of 'simple'.
Raw output
{"message": "[Kedro-viz.words] Use '' instead of 'simple'.", "location": {"path": "docs/source/platform_agnostic_sharing_with_kedro_viz.md", "range": {"start": {"line": 55, "column": 116}}}, "severity": "WARNING"}

1. Python's Built-in HTTP Server:
- Navigate to the build directory and run:
```bash
python -m http.server
```
- This starts a web server at `http://localhost:8000`, which you can use to view index.html.

2. Node's http-server:
- First, install it globally:
```bash
npm install -g http-server
```
- Then, run it from the build directory:
```bash
http-server
```


## Static website hosting platforms such as GitHub Pages

Follow the steps [listed in the GitHub pages documentation](https://docs.github.com/en/pages/quickstart) to create a Git repository that supports GitHub Pages. On completion, push the contents of the previously created `build` folder to this new repository. Your site will be available at the following URL: `http://<username>.github.io`
Loading