Skip to content

Commit

Permalink
Release v0.9.2 (#264)
Browse files Browse the repository at this point in the history
* Make hatch a prerequisite
([#259](#259)). In this
commit, Eric Vergnaud has introduced a change to make the installation
of `hatch` version 1.9.4 a prerequisite for the project to avoid errors
related to `pip` command recognition. The Makefile has been updated to
handle the installation of hatch automatically, and the `hatch env
create` command is now used instead of `pip install hatch==1.7.0`. This
change ensures that the development environment is consistent and
reliable by maintaining the correct version of hatch and automatically
handling its installation. Additionally, the `.venv/bin/python` and
`dev` targets have been updated accordingly to reflect these changes.
This commit also formats all files using the `make dev fmt` command,
which helps maintain consistent code formatting throughout the project.
* add support for exclusions in `fmt` command
([#263](#263)). In this
release, we have added support for exclusions to the `fmt` command in
the 'databricks/labs/lsql/cli.py' module. This feature allows users to
specify a list of directories or files to exclude while formatting SQL
files, which is particularly useful when verifying SQL notebooks in ucx.
The `fmt` command now accepts a new optional parameter 'exclude', which
accepts an iterable of strings that specify the relative paths to
exclude. Any `sql_file` that is a descendant of any `exclusion` is
skipped during formatting. The exclusions are implemented by converting
the relative paths into `Path` objects. This change addresses the issue
where single line comments are converted into inlined comments, causing
misinterpretation. The added unit test is manually verified, and this
pull request fixes issue
[#261](#261). This feature
was authored and co-authored by Eric Vergnaud.
  • Loading branch information
nfx authored Sep 3, 2024
1 parent aadae61 commit 092dbc6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Version changelog

## 0.9.2

* Make hatch a prerequisite ([#259](https://github.com/databrickslabs/lsql/issues/259)). In this commit, Eric Vergnaud has introduced a change to make the installation of `hatch` version 1.9.4 a prerequisite for the project to avoid errors related to `pip` command recognition. The Makefile has been updated to handle the installation of hatch automatically, and the `hatch env create` command is now used instead of `pip install hatch==1.7.0`. This change ensures that the development environment is consistent and reliable by maintaining the correct version of hatch and automatically handling its installation. Additionally, the `.venv/bin/python` and `dev` targets have been updated accordingly to reflect these changes. This commit also formats all files using the `make dev fmt` command, which helps maintain consistent code formatting throughout the project.
* add support for exclusions in `fmt` command ([#263](https://github.com/databrickslabs/lsql/issues/263)). In this release, we have added support for exclusions to the `fmt` command in the 'databricks/labs/lsql/cli.py' module. This feature allows users to specify a list of directories or files to exclude while formatting SQL files, which is particularly useful when verifying SQL notebooks in ucx. The `fmt` command now accepts a new optional parameter 'exclude', which accepts an iterable of strings that specify the relative paths to exclude. Any `sql_file` that is a descendant of any `exclusion` is skipped during formatting. The exclusions are implemented by converting the relative paths into `Path` objects. This change addresses the issue where single line comments are converted into inlined comments, causing misinterpretation. The added unit test is manually verified, and this pull request fixes issue [#261](https://github.com/databrickslabs/lsql/issues/261). This feature was authored and co-authored by Eric Vergnaud.


## 0.9.1

* Fixed dataclass field types ([#257](https://github.com/databrickslabs/lsql/issues/257)). This PR introduces a workaround to a Python bug affecting the `dataclasses.fields()` function, which sometimes returns field types as string type names instead of types. This can cause the ORM to malfunction. The workaround involves checking if the returned `f.type` is a string, and if so, converting it to a type by looking it up in the `__builtins__` dictionary. This change is global and affects the `_schema_for` function in the `backends.py` file, which is responsible for creating a schema for a given dataclass, taking into account any necessary type conversions. This change ensures consistent and accurate type handling in the face of the Python bug, improving the reliability of our ORM.
Expand Down
2 changes: 1 addition & 1 deletion src/databricks/labs/lsql/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.9.1"
__version__ = "0.9.2"

0 comments on commit 092dbc6

Please sign in to comment.