Skip to content

Commit

Permalink
Release v0.5.0 (#102)
Browse files Browse the repository at this point in the history
* Added content assertion for `assert_file_uploaded` and
`assert_file_dbfs_uploaded` in `MockInstallation`
([#101](#101)). The
recent commit introduces a content assertion feature to the
`MockInstallation` class, enhancing its testing capabilities. This is
achieved by adding an optional `expected` parameter of type `bytes` to
the `assert_file_uploaded` and `assert_file_dbfs_uploaded` methods,
allowing users to verify the uploaded content's correctness. The
`_assert_upload` method has also been updated to accept this new
parameter, ensuring the actual uploaded content matches the expected
content. Furthermore, the commit includes informative docstrings for the
new and updated methods, providing clear explanations of their
functionality and usage. To support these improvements, new test cases
`test_assert_file_uploaded` and `test_load_empty_data_class` have been
added to the `tests/unit/test_installation.py` file, enabling more
rigorous testing of the `MockInstallation` class and ensuring that the
expected content is uploaded correctly.
* Added handling for partial functions in `parallel.Threads`
([#93](#93)). In this
release, we have enhanced the `parallel.Threads` module with the ability
to handle partial functions, addressing issue
[#93](#93). This
improvement includes the addition of a new static method,
`_get_result_function_signature`, to obtain the signature of a function
or a string representation of its arguments and keywords if it is a
partial function. The `_wrap_result` class method has also been updated
to log an error message with the function's signature if an exception
occurs. Furthermore, we have added a new test case,
`test_odd_partial_failed`, to the unit tests, ensuring that the `gather`
function handles partial functions that raise errors correctly. The
Python version required for this project remains at 3.10, and the
`pyproject.toml` file has been updated to include "isort", "mypy",
"types-PyYAML", and `types-requests` in the list of dependencies. These
adjustments are aimed at improving the functionality and type checking
in the `parallel.Threads` module.
* Align configurations with UCX project
([#96](#96)). This
commit brings project configurations in line with the UCX project
through various fixes and updates, enhancing compatibility and
streamlining collaboration. It addresses pylint configuration warnings,
adjusts GitHub Actions workflows, and refines the `pyproject.toml` file.
Additionally, the `NiceFormatter` class in `logger.py` has been improved
for better code readability, and the versioning scheme has been updated
to ensure SemVer and PEP440 compliance, making it easier to manage and
understand the project's versioning. Developers adopting the project
will benefit from these alignments, as they promote adherence to the
project's standards and up-to-date best practices.
* Check backwards compatibility with UCX, Remorph, and LSQL
([#84](#84)). This
release includes an update to the dependabot configuration to check for
daily updates in both the pip and github-actions package ecosystems,
with a new directory parameter added for the pip ecosystem for more
precise update management. Additionally, a new GitHub Actions workflow,
"downstreams", has been added to ensure backwards compatibility with
UCX, Remorph, and LSQL by running automated downstream checks on pull
requests, merge groups, and pushes to the main branch. The workflow has
appropriate permissions for writing id-tokens, reading contents, and
writing pull-requests, and runs the downstreams action from the
databrickslabs/sandbox repository using GITHUB_TOKEN for authentication.
These changes improve the security and maintainability of the project by
ensuring compatibility with downstream projects and staying up-to-date
with the latest package versions, reducing the risk of potential
security vulnerabilities and bugs.

Dependency updates:

* Bump actions/setup-python from 4 to 5
([#89](#89)).
* Bump softprops/action-gh-release from 1 to 2
([#87](#87)).
* Bump actions/checkout from 2.5.0 to 4.1.2
([#88](#88)).
* Bump codecov/codecov-action from 1 to 4
([#85](#85)).
* Bump actions/checkout from 4.1.2 to 4.1.3
([#95](#95)).
* Bump actions/checkout from 4.1.3 to 4.1.5
([#100](#100)).
  • Loading branch information
nfx authored May 8, 2024
1 parent 47ab384 commit c959367
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Version changelog

## 0.5.0

* Added content assertion for `assert_file_uploaded` and `assert_file_dbfs_uploaded` in `MockInstallation` ([#101](https://github.com/databrickslabs/blueprint/issues/101)). The recent commit introduces a content assertion feature to the `MockInstallation` class, enhancing its testing capabilities. This is achieved by adding an optional `expected` parameter of type `bytes` to the `assert_file_uploaded` and `assert_file_dbfs_uploaded` methods, allowing users to verify the uploaded content's correctness. The `_assert_upload` method has also been updated to accept this new parameter, ensuring the actual uploaded content matches the expected content. Furthermore, the commit includes informative docstrings for the new and updated methods, providing clear explanations of their functionality and usage. To support these improvements, new test cases `test_assert_file_uploaded` and `test_load_empty_data_class` have been added to the `tests/unit/test_installation.py` file, enabling more rigorous testing of the `MockInstallation` class and ensuring that the expected content is uploaded correctly.
* Added handling for partial functions in `parallel.Threads` ([#93](https://github.com/databrickslabs/blueprint/issues/93)). In this release, we have enhanced the `parallel.Threads` module with the ability to handle partial functions, addressing issue [#93](https://github.com/databrickslabs/blueprint/issues/93). This improvement includes the addition of a new static method, `_get_result_function_signature`, to obtain the signature of a function or a string representation of its arguments and keywords if it is a partial function. The `_wrap_result` class method has also been updated to log an error message with the function's signature if an exception occurs. Furthermore, we have added a new test case, `test_odd_partial_failed`, to the unit tests, ensuring that the `gather` function handles partial functions that raise errors correctly. The Python version required for this project remains at 3.10, and the `pyproject.toml` file has been updated to include "isort", "mypy", "types-PyYAML", and `types-requests` in the list of dependencies. These adjustments are aimed at improving the functionality and type checking in the `parallel.Threads` module.
* Align configurations with UCX project ([#96](https://github.com/databrickslabs/blueprint/issues/96)). This commit brings project configurations in line with the UCX project through various fixes and updates, enhancing compatibility and streamlining collaboration. It addresses pylint configuration warnings, adjusts GitHub Actions workflows, and refines the `pyproject.toml` file. Additionally, the `NiceFormatter` class in `logger.py` has been improved for better code readability, and the versioning scheme has been updated to ensure SemVer and PEP440 compliance, making it easier to manage and understand the project's versioning. Developers adopting the project will benefit from these alignments, as they promote adherence to the project's standards and up-to-date best practices.
* Check backwards compatibility with UCX, Remorph, and LSQL ([#84](https://github.com/databrickslabs/blueprint/issues/84)). This release includes an update to the dependabot configuration to check for daily updates in both the pip and github-actions package ecosystems, with a new directory parameter added for the pip ecosystem for more precise update management. Additionally, a new GitHub Actions workflow, "downstreams", has been added to ensure backwards compatibility with UCX, Remorph, and LSQL by running automated downstream checks on pull requests, merge groups, and pushes to the main branch. The workflow has appropriate permissions for writing id-tokens, reading contents, and writing pull-requests, and runs the downstreams action from the databrickslabs/sandbox repository using GITHUB_TOKEN for authentication. These changes improve the security and maintainability of the project by ensuring compatibility with downstream projects and staying up-to-date with the latest package versions, reducing the risk of potential security vulnerabilities and bugs.

Dependency updates:

* Bump actions/setup-python from 4 to 5 ([#89](https://github.com/databrickslabs/blueprint/pull/89)).
* Bump softprops/action-gh-release from 1 to 2 ([#87](https://github.com/databrickslabs/blueprint/pull/87)).
* Bump actions/checkout from 2.5.0 to 4.1.2 ([#88](https://github.com/databrickslabs/blueprint/pull/88)).
* Bump codecov/codecov-action from 1 to 4 ([#85](https://github.com/databrickslabs/blueprint/pull/85)).
* Bump actions/checkout from 4.1.2 to 4.1.3 ([#95](https://github.com/databrickslabs/blueprint/pull/95)).
* Bump actions/checkout from 4.1.3 to 4.1.5 ([#100](https://github.com/databrickslabs/blueprint/pull/100)).

## 0.4.4

* If `Threads.strict()` raises just one error, don't wrap it with `ManyError` ([#79](https://github.com/databrickslabs/blueprint/issues/79)). The `strict` method in the `gather` function of the `parallel.py` module in the `databricks/labs/blueprint` package has been updated to change the way it handles errors. Previously, if any task in the `tasks` sequence failed, the `strict` method would raise a `ManyError` exception containing all the errors. With this change, if only one error occurs, that error will be raised directly without being wrapped in a `ManyError` exception. This simplifies error handling and avoids unnecessary nesting of exceptions. Additionally, the `__tracebackhide__` dunder variable has been added to the method to improve the readability of tracebacks by hiding it from the user. This update aims to provide a more streamlined and user-friendly experience for handling errors in parallel processing tasks.
Expand Down
2 changes: 1 addition & 1 deletion src/databricks/labs/blueprint/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.4"
__version__ = "0.5.0"

0 comments on commit c959367

Please sign in to comment.