Skip to content

Commit

Permalink
Merge branch 'feature/disable-preview' into feature/disable-preview-ui
Browse files Browse the repository at this point in the history
Signed-off-by: <>
  • Loading branch information
jitu5 committed May 31, 2024
2 parents 6f088b5 + 57aec4e commit 2f54122
Show file tree
Hide file tree
Showing 21 changed files with 276 additions and 67 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
- name: Setup Tests
uses: "./.github/actions/setup_tests"

- name: Install wheel
run: pip install wheel

- name: Make Python package
run: make package

Expand Down
18 changes: 14 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,32 @@ Please follow the established format:
-->
# Next release

# Release 9.1.0

## Major features and improvements
- Introduce the toggle to expand and collapse all pipelines button in the utility bar. (#1858)
- Allow Kedro-Viz commands to run from any sub directory within Kedro project. (#1871)

- Enable/disable preview for all the datasets when publishing Kedro-Viz from CLI. (#1894)
- Enable/disable preview for all the datasets when publishing Kedro-Viz from UI. (#1895)

## Bug fixes and other changes

- Upgrade the gitpod workspace-full to a newer version which includes both Node 18 and Python 3.11.5. (#1862)
- Fix broken URL when active pipeline name changes on initial load. (#1914)
- Fix bug related to tag filtering and sharing with stateful URL. (#1878)
- Update settings panel design (#1875)
- Migrate from CircleCi to GitHub Actions. (#1876)
- Include expandAllPipelines in initial state. (#1896)
- Refactor backend integration with Kedro by replacing bootstrap_project with configure_project. (#1796)
- Enhance kedro-viz doc integration. (#1874)
- Fix Kedro-Viz waiting for valid Kedro project. (#1871)
- Include expandAllPipelines in initial state. (#1896)
- Enhance Kedro-Viz documentation by using Kedro-sphinx-theme. (#1898)
- Remove default props from functional components. (#1906)
- Fix for schema change in strawberry-graphql JSON scalar. (#1903)
- Fix messaging level when package compatibility is not satisfied. (#1904)
- Upgrade GitPod to include Node 18 and Python 3.11. (#1862)
- Add utility functions related to Transcoding to Kedro viz. (#1928)
- Include JSON dataset in the demo-project. (#1930)
- Update intersphinx_mapping of kedro-datasets. (#1911)
- Add GitPod to the local hosts list. (#1923)

# Release 9.0.0

Expand Down
2 changes: 1 addition & 1 deletion demo-project/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.0.0
9.1.0
7 changes: 7 additions & 0 deletions demo-project/conf/base/catalog_08_reporting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,10 @@ reporting.confusion_matrix:
type: matplotlib.MatplotlibWriter
filepath: ${_base_location}/08_reporting/confusion_matrix.png
versioned: true

reporting.top_shuttle_data:
type: json.JSONDataset
filepath: ${_base_location}/08_reporting/top_shuttle_data.json
metadata:
kedro-viz:
layer: reporting
147 changes: 147 additions & 0 deletions demo-project/data/08_reporting/top_shuttle_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
[
{
"shuttle_id": 63561,
"shuttle_location": "Niue",
"shuttle_type": "Type V5",
"engine_type": "Quantum",
"engine_vendor": "ThetaBase Services",
"engines": 1.0,
"passenger_capacity": 2,
"cancellation_policy": "strict",
"crew": 1.0,
"d_check_complete": false,
"moon_clearance_complete": false,
"price": 1325.0,
"company_id": 35029,
"review_scores_rating": 97,
"review_scores_comfort": 10,
"review_scores_amenities": 9,
"review_scores_trip": 10,
"review_scores_crew": 10,
"review_scores_location": 9,
"review_scores_price": 10,
"number_of_reviews": 133,
"reviews_per_month": 1.65,
"review_id": 1,
"company_rating": 1.0,
"company_location": "Niue",
"total_fleet_count": 4.0,
"iata_approved": false
},
{
"shuttle_id": 53260,
"shuttle_location": "Niue",
"shuttle_type": "Type V5",
"engine_type": "Quantum",
"engine_vendor": "Banks, Wood and Phillips",
"engines": 1.0,
"passenger_capacity": 2,
"cancellation_policy": "strict",
"crew": 1.0,
"d_check_complete": false,
"moon_clearance_complete": false,
"price": 1325.0,
"company_id": 35029,
"review_scores_rating": 98,
"review_scores_comfort": 10,
"review_scores_amenities": 9,
"review_scores_trip": 10,
"review_scores_crew": 10,
"review_scores_location": 9,
"review_scores_price": 10,
"number_of_reviews": 37,
"reviews_per_month": 0.48,
"review_id": 1354,
"company_rating": 1.0,
"company_location": "Niue",
"total_fleet_count": 4.0,
"iata_approved": false
},
{
"shuttle_id": 51019,
"shuttle_location": "Niue",
"shuttle_type": "Type V5",
"engine_type": "Quantum",
"engine_vendor": "ThetaBase Services",
"engines": 1.0,
"passenger_capacity": 2,
"cancellation_policy": "flexible",
"crew": 1.0,
"d_check_complete": false,
"moon_clearance_complete": false,
"price": 1260.0,
"company_id": 35029,
"review_scores_rating": 92,
"review_scores_comfort": 10,
"review_scores_amenities": 9,
"review_scores_trip": 10,
"review_scores_crew": 10,
"review_scores_location": 9,
"review_scores_price": 9,
"number_of_reviews": 10,
"reviews_per_month": 0.15,
"review_id": 1985,
"company_rating": 1.0,
"company_location": "Niue",
"total_fleet_count": 4.0,
"iata_approved": false
},
{
"shuttle_id": 53898,
"shuttle_location": "Niue",
"shuttle_type": "Type V5",
"engine_type": "Plasma",
"engine_vendor": "ThetaBase Services",
"engines": 3.0,
"passenger_capacity": 5,
"cancellation_policy": "strict",
"crew": 3.0,
"d_check_complete": false,
"moon_clearance_complete": false,
"price": 2196.0,
"company_id": 35029,
"review_scores_rating": 98,
"review_scores_comfort": 10,
"review_scores_amenities": 9,
"review_scores_trip": 10,
"review_scores_crew": 10,
"review_scores_location": 9,
"review_scores_price": 10,
"number_of_reviews": 11,
"reviews_per_month": 0.21,
"review_id": 4879,
"company_rating": 1.0,
"company_location": "Niue",
"total_fleet_count": 4.0,
"iata_approved": false
},
{
"shuttle_id": 36260,
"shuttle_location": "Anguilla",
"shuttle_type": "Type V5",
"engine_type": "Quantum",
"engine_vendor": "ThetaBase Services",
"engines": 1.0,
"passenger_capacity": 2,
"cancellation_policy": "strict",
"crew": 1.0,
"d_check_complete": true,
"moon_clearance_complete": false,
"price": 1780.0,
"company_id": 30292,
"review_scores_rating": 90,
"review_scores_comfort": 8,
"review_scores_amenities": 9,
"review_scores_trip": 10,
"review_scores_crew": 9,
"review_scores_location": 9,
"review_scores_price": 9,
"number_of_reviews": 3,
"reviews_per_month": 0.09,
"review_id": 2,
"company_rating": 0.67,
"company_location": "Anguilla",
"total_fleet_count": 6.0,
"iata_approved": false
}
]
2 changes: 1 addition & 1 deletion demo-project/lightsail.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"serviceName": "kedro-viz-live-demo",
"containers": {
"kedro-viz-live-demo": {
"image": "public.ecr.aws/g0x0s3o2/kedro-viz-live-demo:9.0.0",
"image": "public.ecr.aws/g0x0s3o2/kedro-viz-live-demo:9.1.0",
"ports": {
"4141": "HTTP"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def create_pipeline(**kwargs) -> Pipeline:
inputs=["reviews", "params:typing.reviews.columns_as_floats"],
outputs="int_typed_reviews",
name='apply_types_to_reviews'

),
node(
func=aggregate_company_data,
Expand Down
20 changes: 19 additions & 1 deletion demo-project/src/demo_project/pipelines/reporting/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import plotly.express as px
import seaborn as sn
from plotly import graph_objects as go

from typing import Dict
from .image_utils import DrawTable


Expand Down Expand Up @@ -119,3 +119,21 @@ def create_matplotlib_chart(companies: pd.DataFrame) -> plt:
)
sn.heatmap(confusion_matrix, annot=True)
return plt


def get_top_shuttles_data(model_input_table: pd.DataFrame) -> Dict:
"""This function retrieves the head from the input table
and converts them into a JSON dataset.
Args:
model_input_table (pd.DataFrame): The data to retrieve the top N rows from
top_n (int, optional): The number of top rows to retrieve. Defaults to 5.
Returns:
str: A JSON string representing the top N rows of the dataset.
"""

# Get the top N rows of the model input table
top_shuttle_df = model_input_table.head(5)
top_shuttle_json = top_shuttle_df.to_dict(orient="records")
return top_shuttle_json
6 changes: 6 additions & 0 deletions demo-project/src/demo_project/pipelines/reporting/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
make_cancel_policy_bar_chart,
make_price_analysis_image,
make_price_histogram,
get_top_shuttles_data,
)


Expand Down Expand Up @@ -43,6 +44,11 @@ def create_pipeline(**kwargs) -> Pipeline:
inputs="prm_shuttle_company_reviews",
outputs="confusion_matrix",
),
node(
func=get_top_shuttles_data,
inputs="prm_shuttle_company_reviews",
outputs="top_shuttle_data",
),
],
inputs=["prm_shuttle_company_reviews", "feature_importance_output"],
namespace="reporting",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quantumblack/kedro-viz",
"version": "9.0.0",
"version": "9.1.0",
"description": "Kedro-Viz is an interactive development tool for building data science pipelines with Kedro.",
"main": "lib/components/app/index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion package/kedro_viz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys
import warnings

__version__ = "9.0.0"
__version__ = "9.1.0"


class KedroVizPythonVersionWarning(UserWarning):
Expand Down
2 changes: 1 addition & 1 deletion package/kedro_viz/data_access/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from kedro.io import DataCatalog
from kedro.pipeline import Pipeline as KedroPipeline
from kedro.pipeline.node import Node as KedroNode
from kedro.pipeline.pipeline import _strip_transcoding
from sqlalchemy.orm import sessionmaker

from kedro_viz.constants import DEFAULT_REGISTERED_PIPELINE_ID, ROOT_MODULAR_PIPELINE_ID
Expand All @@ -26,6 +25,7 @@
TranscodedDataNode,
)
from kedro_viz.services import layers_services, modular_pipelines_services
from kedro_viz.utils import _strip_transcoding

from .repositories import (
CatalogRepository,
Expand Down
9 changes: 1 addition & 8 deletions package/kedro_viz/data_access/repositories/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,10 @@
from typing import TYPE_CHECKING, Dict, Optional

from kedro.io import DataCatalog

try:
# kedro 0.19.4 onwards
from kedro.pipeline._transcoding import TRANSCODING_SEPARATOR, _strip_transcoding
except ImportError: # pragma: no cover
# older versions
from kedro.pipeline.pipeline import TRANSCODING_SEPARATOR, _strip_transcoding # type: ignore

from packaging.version import parse

from kedro_viz.constants import KEDRO_VERSION
from kedro_viz.utils import TRANSCODING_SEPARATOR, _strip_transcoding

try:
# kedro 0.18.11 onwards
Expand Down
10 changes: 1 addition & 9 deletions package/kedro_viz/integrations/kedro/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@
from kedro.io import DataCatalog
from kedro.io.core import get_filepath_str

try:
# kedro 0.19.4 onwards
from kedro.pipeline._transcoding import TRANSCODING_SEPARATOR, _strip_transcoding
except ImportError: # pragma: no cover
# older versions
from kedro.pipeline.pipeline import ( # type: ignore
TRANSCODING_SEPARATOR,
_strip_transcoding,
)
from kedro_viz.utils import TRANSCODING_SEPARATOR, _strip_transcoding

logger = logging.getLogger(__name__)

Expand Down
Loading

0 comments on commit 2f54122

Please sign in to comment.