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

feat(clone_methods): collection, dashboard and card #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lucmerceron
Copy link

@lucmerceron lucmerceron commented May 30, 2024

Hello,

This MR encapsulates a bunch of scripts that we use at our company when we want to clone a collection and its components (dashboards / cards) while changing the targeted database of the cards to another one. This is useful when we have a new client and we need to instantiate a template collection for its database or when we need to duplicate a collection to do some tests without putting noise into the original one.

I couldn't properly create tests for the functions.
Related to #18 & #32

Regards

@lucmerceron lucmerceron force-pushed the feat/clone_dashboard_target_database branch from 3cd752e to 9c1140e Compare May 30, 2024 14:06
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 3.75000% with 154 lines in your changes are missing coverage. Please review.

Project coverage is 51.88%. Comparing base (607f5b8) to head (3cd752e).
Report is 6 commits behind head on master.

Current head 3cd752e differs from pull request most recent head 9c1140e

Please upload reports for the commit 9c1140e to get more accurate results.

Files Patch % Lines
metabase_api/clone_methods.py 2.68% 145 Missing ⚠️
metabase_api/_helper_methods.py 10.00% 9 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           master      #52       +/-   ##
===========================================
- Coverage   62.39%   51.88%   -10.51%     
===========================================
  Files           7        8        +1     
  Lines         734      900      +166     
===========================================
+ Hits          458      467        +9     
- Misses        276      433      +157     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vvaezian
Copy link
Owner

Hi @lucmerceron, thanks for the PR. I'll review it soon.

@vvaezian vvaezian self-assigned this May 30, 2024
@lucmerceron
Copy link
Author

Thanks @vvaezian, tell me if I can be of any help

@vvaezian
Copy link
Owner

vvaezian commented Jun 6, 2024

@lucmerceron If you can create some unittests that would be great. There is a sqlite DB in tests/data. You can duplicate that with a different name and use it as the target db. You can use https://sqliteviewer.flowsoft7.com/ to view the content of sqlite DBs. Instructions for unittesting is available in the tests dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants