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

Prevent silencing of pylint #65

Merged
merged 1 commit into from
Mar 22, 2024
Merged

Prevent silencing of pylint #65

merged 1 commit into from
Mar 22, 2024

Conversation

nfx
Copy link
Collaborator

@nfx nfx commented Mar 22, 2024

@nfx nfx merged commit 2f3a6aa into main Mar 22, 2024
6 of 7 checks passed
@nfx nfx deleted the nfx-patch-1 branch March 22, 2024 15:18
nfx added a commit to databrickslabs/blueprint that referenced this pull request Mar 22, 2024
nfx added a commit to databrickslabs/blueprint that referenced this pull request Mar 22, 2024
Copy link

✅ 17/17 passed, 2 skipped, 53m15s total

Running from acceptance #36

nfx added a commit that referenced this pull request Mar 25, 2024
* Fixed `Builder` object is not callable error ([#67](#67)). In this release, we have made an enhancement to the `Backends` class in the `databricks/labs/lsql/backends.py` file. The `DatabricksSession.builder()` method call in the `__init__` method has been changed to `DatabricksSession.builder`. This update uses the `builder` attribute to create a new instance of `DatabricksSession` without calling it like a function. The `sdk_config` method is then used to configure the instance with the required settings. Finally, the `getOrCreate` method is utilized to obtain a `SparkSession` object, which is then passed as a parameter to the parent class constructor. This modification simplifies the code and eliminates the error caused by treating the `builder` attribute as a callable object. Software engineers may benefit from this change by having a more streamlined and error-free codebase when working with the open-source library.
* Prevent silencing of `pylint` ([#65](#65)). In this release, we have introduced a new job, "no-lint-disabled", to the GitHub Actions workflow for the repository. This job runs on the latest Ubuntu version and checks out the codebase with a full history. It verifies that no new instances of code suppressing `pylint` checks have been added, by filtering the differences between the current branch and the main branch for new lines of code, and then checking if any of those new lines contain a `pylint` disable comment. If any such lines are found, the job will fail and print a message indicating the offending lines of code, thereby ensuring that the codebase maintains a consistent level of quality by not allowing linting checks to be bypassed.
* Updated `_SparkBackend.fetch()` to return iterator instead of list ([#62](#62)). In this release, the `fetch()` method of the `_SparkBackend` class has been updated to return an iterator instead of a list, which can result in reduced memory usage and improved performance, as the results of the SQL query can now be processed one element at a time. A new exception has been introduced to wrap any exceptions that occur during query execution, providing better debugging and error handling capabilities. The `test_runtime_backend_fetch()` unit test has been updated to reflect this change, and users of the `fetch()` method should be aware that it now returns an iterator and must be consumed to obtain the desired data. Thorough testing is recommended to ensure that the updated method still meets the needs of the application.
@nfx nfx mentioned this pull request Mar 25, 2024
nfx added a commit that referenced this pull request Mar 25, 2024
* Fixed `Builder` object is not callable error
([#67](#67)). In this
release, we have made an enhancement to the `Backends` class in the
`databricks/labs/lsql/backends.py` file. The
`DatabricksSession.builder()` method call in the `__init__` method has
been changed to `DatabricksSession.builder`. This update uses the
`builder` attribute to create a new instance of `DatabricksSession`
without calling it like a function. The `sdk_config` method is then used
to configure the instance with the required settings. Finally, the
`getOrCreate` method is utilized to obtain a `SparkSession` object,
which is then passed as a parameter to the parent class constructor.
This modification simplifies the code and eliminates the error caused by
treating the `builder` attribute as a callable object. Software
engineers may benefit from this change by having a more streamlined and
error-free codebase when working with the open-source library.
* Prevent silencing of `pylint`
([#65](#65)). In this
release, we have introduced a new job, "no-lint-disabled", to the GitHub
Actions workflow for the repository. This job runs on the latest Ubuntu
version and checks out the codebase with a full history. It verifies
that no new instances of code suppressing `pylint` checks have been
added, by filtering the differences between the current branch and the
main branch for new lines of code, and then checking if any of those new
lines contain a `pylint` disable comment. If any such lines are found,
the job will fail and print a message indicating the offending lines of
code, thereby ensuring that the codebase maintains a consistent level of
quality by not allowing linting checks to be bypassed.
* Updated `_SparkBackend.fetch()` to return iterator instead of list
([#62](#62)). In this
release, the `fetch()` method of the `_SparkBackend` class has been
updated to return an iterator instead of a list, which can result in
reduced memory usage and improved performance, as the results of the SQL
query can now be processed one element at a time. A new exception has
been introduced to wrap any exceptions that occur during query
execution, providing better debugging and error handling capabilities.
The `test_runtime_backend_fetch()` unit test has been updated to reflect
this change, and users of the `fetch()` method should be aware that it
now returns an iterator and must be consumed to obtain the desired data.
Thorough testing is recommended to ensure that the updated method still
meets the needs of the application.
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.

1 participant