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 2 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
4 changes: 4 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Please follow the established format:

- Update Kedro-Viz telemetry for opt-out model (#2022)

## Bug fixes and other changes

- Improve `kedro viz build` usage documentation (#2126)


# Release 10.0.0

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 build folder with the command `kedro viz build`, it creates a build directory with an `index.html` file, which is the entry point for visualizing your pipeline. However, simply opening `index.html` using the file protocol `file://` is not supported due to Cross-Origin Resource Sharing Policy 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": 153}}}, "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": 180}}}, "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": 189}}}, "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": 189}}}, "severity": "WARNING"}
jitu5 marked this conversation as resolved.
Show resolved Hide resolved

### 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