-
Notifications
You must be signed in to change notification settings - Fork 87
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
Create a new command databricks labs ucx lint-local-code #1594
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1594 +/- ##
=========================================
+ Coverage 0 89.38% +89.38%
=========================================
Files 0 79 +79
Lines 0 10296 +10296
Branches 0 1820 +1820
=========================================
+ Hits 0 9203 +9203
- Misses 0 722 +722
- Partials 0 371 +371 ☔ View full report in Codecov by Sentry. |
…s labls ucx lint-local-code - Note that adding a lint method to local_file_migrator may or may not be the way to go. Signed-off-by: Jim.Idle <[email protected]>
Signed-off-by: Jim.Idle <[email protected]>
- LocalFileLinter now receives the workspace client - Detects notebooks and calls the notebook linter for them - Otherwise receives the linters from the Languages instance - Languages is recreated for each lint so that the state is reset for each notebook. - Notebooks are assumed to have .py or .sql extensions with the file magic header Signed-off-by: Jim.Idle <[email protected]>
Signed-off-by: Jim.Idle <[email protected]>
- TODO: There is only the workspace version of dependency checker right now so I use it to provie the mechanism, but when local NOtebook loading hits main, this will change to use that of course. Signed-off-by: Jim.Idle <[email protected]>
@ericvergnaud do it based on ucx/src/databricks/labs/ucx/source_code/notebooks/sources.py Lines 111 to 154 in 1ae345a
|
superseded by #1710 because the source branch is jim's and needs massive rebase |
closing as per last comment |
A new command is created within the ucx cli that allows linting of local python files and local notebooks.
Will prompt to ask if all files in the current directory and child directories should be linted. Upon confirmation, the
local python files and notebooks will be discovered and advisories will be raised for any issues identified.
Changes
Linked issues
Resolves #1541
Functionality
databricks labs ucx ...
...
...
Tests