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

Feature/remove session store #2219

Merged
Merged
Show file tree
Hide file tree
Changes from 17 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
18 changes: 0 additions & 18 deletions cypress/tests/ui/flowchart/flowchart.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,24 +173,6 @@ describe('Flowchart DAG', () => {
).should('exist');
});

it('verifies that users can navigate to experiment tracking by clicking on Open in Experiment Tracking button on the metadata panel. #TC-32', () => {
const nodeToClickText = 'R2 Score';

// Assert before action
cy.location('pathname').should('not.eq', '/experiment-tracking');
cy.location('search').should('not.eq', '?view=Metrics');

// Action
cy.contains('text', nodeToClickText).click({ force: true });
cy.get('.pipeline-metadata__link').click();

// Assert after action
cy.location('pathname').should('eq', '/experiment-tracking');
cy.location('search').should('eq', '?view=Metrics');
cy.get('.details-mainframe').should('exist');
cy.get('.details__tabs').should('exist');
});

it('verifies that users see an error message when there are no nodes/pipelines. #TC-33', () => {
// Intercept the network request to mock with a fixture
cy.__interceptRest__('/api/main', 'GET', '/mock/emptyDataset.json');
Expand Down
11 changes: 0 additions & 11 deletions cypress/tests/ui/toolbar/global-toolbar.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ describe('Global Toolbar', () => {
cy.get('.details__tabs').should('not.exist');
});

it('verifies that users can access the experiment tracking page through the experiment tracking button, when in the flowchart view. #TC-2', () => {
cy.get('[data-test="global-toolbar-experiments-btn"]').click();
cy.location('pathname').should('eq', '/experiment-tracking');

// should exist
cy.get('.details__tabs').should('exist');

// should not exist
cy.get('.pipeline-wrapper').should('not.exist');
});

it('verifies that users can change the theme from light to dark theme, or dark to light theme. #TC-3', () => {
// Alias
cy.get('[data-test*="global-toolbar-theme-btn-"]').as('toggleTheme');
Expand Down
13 changes: 0 additions & 13 deletions demo-project/src/demo_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@
# List the installed plugins for which to disable auto-registry
# DISABLE_HOOKS_FOR_PLUGINS = ("kedro-viz",)

from pathlib import Path

# Define where to store data from a KedroSession. Defaults to BaseSessionStore.
# from kedro.framework.session.store import ShelveStore
from kedro_viz.integrations.kedro.sqlite_store import SQLiteStore

SESSION_STORE_CLASS = SQLiteStore
SESSION_STORE_ARGS = {"path": str(Path(__file__).parents[2] / "data")}

# Setup for collaborative experiment tracking.
# SESSION_STORE_ARGS = {"path": str(Path(__file__).parents[2] / "data"),
# "remote_path": "s3://{path-to-session_store}" }

# Define custom context class. Defaults to `KedroContext`
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can keep the code from line 18-23 as is, as this is not related to ET

# CONTEXT_CLASS = KedroContext

Expand Down
2 changes: 1 addition & 1 deletion docs/source/experiment_tracking.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,4 +357,4 @@ Additionally, you can monitor the changes to metrics over time from the pipeline

Clicking on any `MetricsDataset` node opens a side panel displaying how the metric value has changed over time:

![](./images/pipeline_show_metrics.gif)
![](./images/pipeline_show_metrics.gif)
2 changes: 1 addition & 1 deletion docs/source/kedro-viz_visualisation.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,4 +326,4 @@
Type `kedro: Run Kedro Viz` and select the command.
This will launch Kedro-Viz and display your pipeline visually within the extension.

![Kedro Viz in VSCode](./images/viz-in-vscode.gif)
![Kedro Viz in VSCode](./images/viz-in-vscode.gif)

Check warning on line 329 in docs/source/kedro-viz_visualisation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/source/kedro-viz_visualisation.md#L329

[Kedro-viz.Spellings] Did you really mean 'VSCode'?
Raw output
{"message": "[Kedro-viz.Spellings] Did you really mean 'VSCode'?", "location": {"path": "docs/source/kedro-viz_visualisation.md", "range": {"start": {"line": 329, "column": 16}}}, "severity": "WARNING"}
2 changes: 1 addition & 1 deletion package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,4 +307,4 @@

## Citation

If you're an academic, Kedro-Viz can also help you, for example, as a tool to visualise how your publication's pipeline is structured. Find our citation reference on [Zenodo](https://doi.org/10.5281/zenodo.4277218).
If you're an academic, Kedro-Viz can also help you, for example, as a tool to visualise how your publication's pipeline is structured. Find our citation reference on [Zenodo](https://doi.org/10.5281/zenodo.4277218).

Check warning on line 310 in package/README.md

View workflow job for this annotation

GitHub Actions / vale

[vale] package/README.md#L310

[Kedro-viz.Spellings] Did you really mean 'Zenodo'?
Raw output
{"message": "[Kedro-viz.Spellings] Did you really mean 'Zenodo'?", "location": {"path": "package/README.md", "range": {"start": {"line": 310, "column": 168}}}, "severity": "WARNING"}
41 changes: 0 additions & 41 deletions package/kedro_viz/database.py

This file was deleted.

12 changes: 4 additions & 8 deletions package/kedro_viz/integrations/kedro/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from kedro import __version__
from kedro.framework.project import configure_project, pipelines
from kedro.framework.session import KedroSession
from kedro.framework.session.store import BaseSessionStore
from kedro.framework.startup import bootstrap_project
from kedro.io import DataCatalog
from kedro.pipeline import Pipeline
Expand Down Expand Up @@ -73,8 +72,7 @@ def _load_data_helper(
configuration.
is_lite: A flag to run Kedro-Viz in lite mode.
Returns:
A tuple containing the data catalog, pipeline dictionary, session store
and dataset stats dictionary.
A tuple containing the data catalog, pipeline dictionary and dataset stats dictionary.
"""

with KedroSession.create(
Expand All @@ -88,7 +86,6 @@ def _load_data_helper(
session._hook_manager = _VizNullPluginManager() # type: ignore

context = session.load_context()
session_store = session._store

# patch the AbstractDataset class for a custom
# implementation to handle kedro.io.core.DatasetError
Expand All @@ -110,7 +107,7 @@ def _load_data_helper(
# Useful for users who have `get_current_session` in their `register_pipelines()`.
pipelines_dict = dict(pipelines)
stats_dict = _get_dataset_stats(project_path)
return catalog, pipelines_dict, session_store, stats_dict
return catalog, pipelines_dict, stats_dict


def load_data(
Expand All @@ -120,7 +117,7 @@ def load_data(
package_name: Optional[str] = None,
extra_params: Optional[Dict[str, Any]] = None,
is_lite: bool = False,
) -> Tuple[DataCatalog, Dict[str, Pipeline], BaseSessionStore, Dict]:
) -> Tuple[DataCatalog, Dict[str, Pipeline], Dict]:
"""Load data from a Kedro project.
Args:
project_path: the path where the Kedro project is located.
Expand All @@ -134,8 +131,7 @@ def load_data(
configuration.
is_lite: A flag to run Kedro-Viz in lite mode.
Returns:
A tuple containing the data catalog, pipeline dictionary, session store
and dataset stats dictionary.
A tuple containing the data catalog, pipeline dictionary,and dataset stats dictionary.
"""
if package_name:
configure_project(package_name)
Expand Down
201 changes: 0 additions & 201 deletions package/kedro_viz/integrations/kedro/sqlite_store.py

This file was deleted.

Loading
Loading