From 1e0ea007a33f4e419157675490724167827a52b5 Mon Sep 17 00:00:00 2001 From: Sara Burns Date: Thu, 26 Sep 2024 10:13:15 -0400 Subject: [PATCH] fix: remove duplicate name warnings --- tutoraspects/asset_command_helpers.py | 24 ------------------------ tutoraspects/commands_v1.py | 6 ------ 2 files changed, 30 deletions(-) diff --git a/tutoraspects/asset_command_helpers.py b/tutoraspects/asset_command_helpers.py index 5edec1889..aab7948b6 100644 --- a/tutoraspects/asset_command_helpers.py +++ b/tutoraspects/asset_command_helpers.py @@ -475,30 +475,6 @@ def deduplicate_superset_assets(echo): echo("Deduplication complete.") -def check_asset_names(echo): - """ - Warn about any duplicate asset names. - """ - echo("Looking for duplicate names...") - warn = 0 - - names = set() - for _, asset in _get_asset_files(): - for k in ("slice_name", "dashboard_title", "database_name"): - if k in asset: - if asset[k] in names: - warn += 1 - echo( - f"WARNING: Duplicate {k} {asset[k]} in {asset.get('_file_name')}" - ) - names.add(asset[k]) - break - - echo( - f"{warn} duplicate names detected. This could confuse users, consider changing them." - ) - - def _get_all_chart_dataset_uuids(): """ Return the UUIDs of all datasets and charts in our file assets. diff --git a/tutoraspects/commands_v1.py b/tutoraspects/commands_v1.py index ba5e5f2cf..75ca5f0e8 100644 --- a/tutoraspects/commands_v1.py +++ b/tutoraspects/commands_v1.py @@ -11,7 +11,6 @@ from tutoraspects.asset_command_helpers import ( ASSETS_PATH, SupersetCommandError, - check_asset_names, deduplicate_superset_assets, import_superset_assets, delete_aspects_unused_assets, @@ -360,8 +359,6 @@ def serialize_zip(file, base_assets_path): click.echo() deduplicate_superset_assets(click.echo) - click.echo() - check_asset_names(click.echo) click.echo() delete_aspects_unused_assets() @@ -383,9 +380,6 @@ def check_superset_assets(): """ deduplicate_superset_assets(click.echo) - click.echo() - check_asset_names(click.echo) - click.echo() delete_aspects_unused_assets()