databrickslabs / blueprint

Baseline for Databricks Labs projects written in Python
https://pypi.org/project/databricks-labs-blueprint/
Other
19 stars 8 forks source link

Aligned `Installation` framework with UCX project #32

Closed nfx closed 9 months ago

nfx commented 9 months ago

This pull request introduces several changes to the Installation framework in order to align it with the UCX project. The main changes are the addition of new methods to the Installation class, as well as modifications to the tests in test_installer.py.

In the Installation class, several new methods have been added: load_local, username, remove, workspace_link, workspace_markdown_link, and _host. The load_local method loads an object of a specific type from a local file, while username returns the username associated with the installation. The remove method removes the installation folder from the workspace, and workspace_link and workspace_markdown_link return links to files in the workspace. The _host method returns the host URL for the workspace.

In the test_installer.py file, the tests for the InstallState class have been updated to include a new test for the from_installation method, which creates an InstallState object from an existing Installation object. Additionally, the test_state_corrupt test has been added to test the behavior of the InstallState class when the installation is not found.

Overall, this pull request aims to improve the functionality and robustness of the Installation framework by adding new methods and updating the tests.

Relevant PRs:

codecov[bot] commented 9 months ago

Codecov Report

Attention: 38 lines in your changes are missing coverage. Please review.

Comparison is base (2f8d21a) 77.95% compared to head (e2ecd49) 77.43%.

Files Patch % Lines
src/databricks/labs/blueprint/installation.py 57.64% 34 Missing and 2 partials :warning:
src/databricks/labs/blueprint/installer.py 83.33% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #32 +/- ## ========================================== - Coverage 77.95% 77.43% -0.53% ========================================== Files 13 13 Lines 1175 1232 +57 Branches 217 222 +5 ========================================== + Hits 916 954 +38 - Misses 172 190 +18 - Partials 87 88 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.