Skip to content

Commit

Permalink
bump: version 1.0.5 → 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bsamseth committed Feb 10, 2023
1 parent 1ba5094 commit 84aeb8e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 31 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.0.0 (2023-02-10)

### BREAKING CHANGE

- add newline at the end of formatted notebooks (#36)

## 1.0.5 (2023-02-07)

### Fix
Expand Down
31 changes: 21 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,14 @@ A formatting tool for your Databricks notebooks.
- Python cells are formatted with [black](https://github.com/psf/black)
- SQL cells are formatted with [sqlparse](https://github.com/andialbrecht/sqlparse)

## Breaking changes with version 1.0

Earlier versions of blackbricks applied a patched version of black in order to allow two-space indentation. This was
done because Databricks used two-space indentation, and did not allow you to change that.

Since then, Databricks has added the option to choose. Because you can now choose, blackbricks re-joins black in being
uncompromising, and since version 1.0 you can no longer choose anything but 4 space indentation.

If you _must_ keep using two-space indentation, then stick to versions `<1.0`.

## Table of Contents

* [Installation](#installation)
* [Usage](#usage)
* [Version control integration](#version-control-integration)
* [Contributing](#contributing)
* [FAQ](#faq)
* [Breaking changes](#breaking-changes)

## Installation

Expand Down Expand Up @@ -207,3 +198,23 @@ your installation method of choice.
### Shell commands like `!ls` throws an error

See https://github.com/inspera/blackbricks/issues/21.

## Breaking changes

### Breaking changes with version 2.0

Notebooks will be terminated with a `\n` starting with version `2.0.0`. This harmonizes EOF handling and should be much
less annoying in practice than prior versions. This causes a diff on _any_ notebook that was previously formatted with
`blackbricks<2.0.0`.

Also, the deprecated and non-functional flag for two space indentation is removed, and providing said flag is now an error.

### Breaking changes with version 1.0

Earlier versions of blackbricks applied a patched version of black in order to allow two-space indentation. This was
done because Databricks used two-space indentation, and did not allow you to change that.

Since then, Databricks has added the option to choose. Because you can now choose, blackbricks re-joins black in being
uncompromising, and since version 1.0 you can no longer choose anything but 4 space indentation.

If you _must_ keep using two-space indentation, then stick to versions `<1.0`.
2 changes: 1 addition & 1 deletion blackbricks/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.5"
__version__ = "2.0.0"
18 changes: 0 additions & 18 deletions blackbricks/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,6 @@ def main(
sql_upper: bool = typer.Option(
True, help="SQL keywords should be UPPERCASE or lowercase."
),
no_indent_with_two_spaces: Optional[bool] = typer.Option(
None,
"--no-indent-with-two-spaces",
help="DEPRECATED: Blackbricks now uses 4 spaces for indentation by default. This option will be removed in future versions.",
),
check: bool = typer.Option(
False,
"--check",
Expand Down Expand Up @@ -183,19 +178,6 @@ def main(
"""
assert not version, "If version is set, we don't get here."

if no_indent_with_two_spaces is not None:
warnings.simplefilter("always", DeprecationWarning)
warnings.warn(
textwrap.dedent(
"""
Blackbricks now uses 4 spaces for indentation by default.
Please stop using the `--no-indent-with-two-spaces` option, as it will be removed in future versions.
"""
),
category=DeprecationWarning,
stacklevel=0,
)

mutually_exclusive(["--check", "--diff"], [check, diff])

if not filenames:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "blackbricks"
version = "1.0.5"
version = "2.0.0"
description = "Black for Databricks notebooks"
authors = ["Bendik Samseth <[email protected]>"]
license = "MIT"
Expand Down Expand Up @@ -41,7 +41,7 @@ mypy = "^0.971"

[tool.commitizen]
name = "cz_conventional_commits"
version = "1.0.5"
version = "2.0.0"
tag_format = "$version"
version_files = [
"blackbricks/__init__.py:version",
Expand Down

0 comments on commit 84aeb8e

Please sign in to comment.