Skip to content

Move create_dashboard mehod to DashboardMetadata#216

Merged
nfx merged 4 commits intomainfrom
feature/move_create_dashboards_to_dashboard_metadata
Jul 11, 2024
Merged

Move create_dashboard mehod to DashboardMetadata#216
nfx merged 4 commits intomainfrom
feature/move_create_dashboards_to_dashboard_metadata

Conversation

@JCZuurmond
Copy link
Copy Markdown
Contributor

Resolves #215

@JCZuurmond JCZuurmond requested a review from nfx July 11, 2024 10:14
@JCZuurmond JCZuurmond self-assigned this Jul 11, 2024

def as_lakeview(self) -> Dashboard:
"""Create a lakeview dashboard from the dashboard metadata."""
datasets = self._get_datasets()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@nfx : My intuition is to remove the validate now as it is a side effect of as_lakeview and should be called by the user before as_lakeview. We also do not validate in the as_dict

database_to_replace : str | None (default: None)
The database to replace, if None, all databases are replaced

Source :
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Was not in the right place anymore

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 11, 2024

✅ 35/35 passed, 2 skipped, 9m40s total

Running from acceptance #304

assert tile.position.y == 8


def test_dashboards_saves_sql_files_to_folder(tmp_path):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved the save_to_folder tests down to keep the test order somewhat consistent

ws.assert_not_called()


def test_dashboards_creates_dashboard_with_id_collisions_raises_value_error(tmp_path):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed as validate is removed from as_lakeview

Copy link
Copy Markdown
Collaborator

@nfx nfx left a comment

Choose a reason for hiding this comment

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

lgtm

@nfx nfx merged commit f86d823 into main Jul 11, 2024
@nfx nfx deleted the feature/move_create_dashboards_to_dashboard_metadata branch July 11, 2024 10:26
@nfx nfx added the internal label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TECH DEBT] Move create_dashboards to DashboardMetadata.as_lakeview

2 participants