Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
databricks.labs.blueprint.paths.WorkspacePath
aspathlib.Path
equivalent (#115). This commit introduces thedatabricks.labs.blueprint.paths.WorkspacePath
library, providing Python-nativepathlib.Path
-like interfaces to simplify working with Databricks Workspace paths. The library includesWorkspacePath
andWorkspacePathDuringTest
classes offering advanced functionality for handling user home folders, relative file paths, browser URLs, and file manipulation methods such asread/write_text()
,read/write_bytes()
, andglob()
. This addition brings enhanced, Pythonic ways to interact with Databricks Workspace paths, including creating and moving files, managing directories, and generating browser-accessible URIs. Additionally, the commit includes updates to existing methods and introduces new fixtures for creating notebooks, accompanied by extensive unit tests to ensure reliability and functionality.blueprint
version intoUser-Agent
header when it is used as library (#114). A new feature has been introduced in the library that allows for the propagation of theblueprint
version and the name of the command line interface (CLI) command used in theUser-Agent
header when the library is utilized as a library. This feature includes the addition of two new pairs ofOtherInfo
:blueprint/X.Y.Z
to indicate that the request is made using theblueprint
library andcmd/<name>
to store the name of the CLI command used for making the request. The implementation involves using thewith_user_agent_extra
function fromdatabricks.sdk.config
to set the user agent consistently with the Databricks CLI. Several changes have been made to the test file fortest_useragent.py
to include a new test case,test_user_agent_is_propagated
, which checks if theblueprint
version and the name of the command are correctly propagated to theUser-Agent
header. A context managerhttp_fixture_server
has been added that creates an HTTP server with a custom handler, which extracts theblueprint
version and the command name from theUser-Agent
header and stores them in theuser_agent
dictionary. The test case calls thefoo
command with a mockedWorkspaceClient
instance and sets theDATABRICKS_HOST
andDATABRICKS_TOKEN
environment variables to test the propagation of theblueprint
version and the command name in theUser-Agent
header. The test case then asserts that theblueprint
version and the name of the command are present and correctly set in theuser_agent
dictionary.Checkout Code
step of the acceptance workflow has been updated from 4.1.6 to 4.1.7. This update may include bug fixes, performance improvements, and new features, although specific changes are not mentioned in the commit message. TheUnshallow
step remains unchanged, continuing to fetch and clean up the repository's history. This update ensures that the latest enhancements from the "actions/checkout" action are utilized, aiming to improve the reliability and performance of the code checkout process in the GitHub Actions workflow. Software engineers should be aware of this update and its potential impact on their workflows.Dependency updates: