Skip to content

Commit 486b97e

Browse files
authored
updating the library versions (#208)
* updating the library versions * fixing formatting issues
1 parent bce8c6b commit 486b97e

File tree

8 files changed

+106
-110
lines changed

8 files changed

+106
-110
lines changed

brickflow/cli/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ def local_mode_callback(ctx: click.Context, param: str, value: Any) -> None: #
9797
"Configuring environment to %s...",
9898
BrickflowDefaultEnvs.LOCAL.value,
9999
)
100-
os.environ[
101-
BrickflowEnvVars.BRICKFLOW_ENV.value
102-
] = BrickflowDefaultEnvs.LOCAL.value
100+
os.environ[BrickflowEnvVars.BRICKFLOW_ENV.value] = (
101+
BrickflowDefaultEnvs.LOCAL.value
102+
)
103103

104104
def set_up_bundle_for_workflow_dir(
105105
ctx: click.Context, param: str, value: Any # pylint: disable=unused-argument

brickflow/cli/bundles.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ def download_and_unzip_databricks_cli(url: str, version: str) -> str:
225225

226226
def bundle_synth(**kwargs: Any) -> None:
227227
entrypoint_file = get_entrypoint(**kwargs)
228-
os.environ[
229-
BrickflowEnvVars.BRICKFLOW_DEPLOYMENT_MODE.value
230-
] = BrickflowDeployMode.BUNDLE.value
228+
os.environ[BrickflowEnvVars.BRICKFLOW_DEPLOYMENT_MODE.value] = (
229+
BrickflowDeployMode.BUNDLE.value
230+
)
231231
os.environ[BrickflowEnvVars.BRICKFLOW_MODE.value] = "deploy"
232232
_ilog.info("Synthesizing bundle...")
233233
exec_command(get_entrypoint_python(), entrypoint_file, [])

brickflow/cli/projects.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ def add_project(self, project: BrickflowProject) -> None:
167167
BrickflowRootProjectConfig(projects={}),
168168
)
169169
project_root_config.projects[project.name] = project
170-
self._project_config_dict[
171-
project.path_from_repo_root_to_project_root
172-
] = project_root_config
170+
self._project_config_dict[project.path_from_repo_root_to_project_root] = (
171+
project_root_config
172+
)
173173

174174
def project_exists(self, project: BrickflowProject) -> bool:
175175
return project.name in self._brickflow_multi_project_config.project_roots

brickflow/engine/project.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ class Project:
149149
batch: bool = True
150150
codegen_mechanism: Optional[Type[CodegenInterface]] = None
151151
codegen_kwargs: Optional[Dict[str, Any]] = None
152-
bundle_obj_name: Optional[
153-
str
154-
] = None # repo name or folder where bundle assets will be saved
152+
bundle_obj_name: Optional[str] = (
153+
None # repo name or folder where bundle assets will be saved
154+
)
155155
bundle_base_path: Optional[str] = None
156156
enable_plugins: bool = False
157157
_project: _Project = field(init=False)

brickflow_plugins/airflow/vendor/timezone.py

+10-16
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,11 @@ def utc_epoch() -> dt.datetime:
6868

6969

7070
@overload
71-
def convert_to_utc(value: None) -> None:
72-
...
71+
def convert_to_utc(value: None) -> None: ...
7372

7473

7574
@overload
76-
def convert_to_utc(value: dt.datetime) -> DateTime:
77-
...
75+
def convert_to_utc(value: dt.datetime) -> DateTime: ...
7876

7977

8078
def convert_to_utc(value: dt.datetime | None) -> DateTime | None:
@@ -95,18 +93,17 @@ def convert_to_utc(value: dt.datetime | None) -> DateTime | None:
9593

9694

9795
@overload
98-
def make_aware(value: None, timezone: dt.tzinfo | None = None) -> None:
99-
...
96+
def make_aware(value: None, timezone: dt.tzinfo | None = None) -> None: ...
10097

10198

10299
@overload
103-
def make_aware(value: DateTime, timezone: dt.tzinfo | None = None) -> DateTime:
104-
...
100+
def make_aware(value: DateTime, timezone: dt.tzinfo | None = None) -> DateTime: ...
105101

106102

107103
@overload
108-
def make_aware(value: dt.datetime, timezone: dt.tzinfo | None = None) -> dt.datetime:
109-
...
104+
def make_aware(
105+
value: dt.datetime, timezone: dt.tzinfo | None = None
106+
) -> dt.datetime: ...
110107

111108

112109
def make_aware(
@@ -200,18 +197,15 @@ def parse(string: str, timezone=None) -> DateTime:
200197

201198

202199
@overload
203-
def coerce_datetime(v: None, tz: dt.tzinfo | None = None) -> None:
204-
...
200+
def coerce_datetime(v: None, tz: dt.tzinfo | None = None) -> None: ...
205201

206202

207203
@overload
208-
def coerce_datetime(v: DateTime, tz: dt.tzinfo | None = None) -> DateTime:
209-
...
204+
def coerce_datetime(v: DateTime, tz: dt.tzinfo | None = None) -> DateTime: ...
210205

211206

212207
@overload
213-
def coerce_datetime(v: dt.datetime, tz: dt.tzinfo | None = None) -> DateTime:
214-
...
208+
def coerce_datetime(v: dt.datetime, tz: dt.tzinfo | None = None) -> DateTime: ...
215209

216210

217211
def coerce_datetime(

poetry.lock

+69-71
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extend-exclude = '''
2828

2929
[tool.poetry.dependencies]
3030
python = ">=3.9,<3.12" # pyspark <3.5 does not play happy with python 3.11
31-
Jinja2 = "3.1.2"
31+
Jinja2 = ">=3.1.5"
3232
click = "^8.1.3"
3333
databricks-sdk = ">=0.1.8 <1.0.0"
3434
networkx = "3.1"
@@ -47,7 +47,7 @@ bf = "brickflow.cli:cli"
4747
brickflow = "brickflow.cli:cli"
4848

4949
[tool.poetry.group.dev.dependencies]
50-
black = "^23.3.0"
50+
black = "^24.3.0"
5151
coverage = "^7.2.5"
5252
datamodel-code-generator = "^0.25.2"
5353
deepdiff = "^6.3.0"
@@ -67,6 +67,7 @@ cerberus-python-client = "^2.5.4"
6767
watchdog = "<4.0.0"
6868
requests-mock = "1.12.1"
6969
pyspark = "^3.0.0"
70+
apache-airflow-providers-fab = ">=1.5.2"
7071

7172
[tool.poetry.group.docs.dependencies]
7273
mdx-include = "^1.4.2"

tests/databricks_plugins/test_box_operator.py

+12-9
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,10 @@ def test_execute_download_files_by_name(self):
244244
self.operator.execute()
245245

246246
# Assert
247-
with open(
248-
os.path.join(self.operator.volume_path, "file1.txt"), "rb"
249-
) as f1, open(os.path.join(self.operator.volume_path, "file2.txt"), "rb") as f2:
247+
with (
248+
open(os.path.join(self.operator.volume_path, "file1.txt"), "rb") as f1,
249+
open(os.path.join(self.operator.volume_path, "file2.txt"), "rb") as f2,
250+
):
250251
self.assertEqual(f1.read(), b"Test file content")
251252
self.assertEqual(f2.read(), b"Test file content")
252253

@@ -298,9 +299,10 @@ def test_execute_download_files_by_pattern(self):
298299
self.operator.execute()
299300

300301
# Assert
301-
with open(
302-
os.path.join(self.operator.volume_path, "file1.txt"), "rb"
303-
) as f1, open(os.path.join(self.operator.volume_path, "file3.txt"), "rb") as f3:
302+
with (
303+
open(os.path.join(self.operator.volume_path, "file1.txt"), "rb") as f1,
304+
open(os.path.join(self.operator.volume_path, "file3.txt"), "rb") as f3,
305+
):
304306
self.assertEqual(f1.read(), b"Test file content")
305307
self.assertEqual(f3.read(), b"Test file content")
306308
self.assertFalse(
@@ -326,9 +328,10 @@ def test_execute_download_all_files(self):
326328
self.operator.execute()
327329

328330
# Assert
329-
with open(
330-
os.path.join(self.operator.volume_path, "file1.txt"), "rb"
331-
) as f1, open(os.path.join(self.operator.volume_path, "file2.txt"), "rb") as f2:
331+
with (
332+
open(os.path.join(self.operator.volume_path, "file1.txt"), "rb") as f1,
333+
open(os.path.join(self.operator.volume_path, "file2.txt"), "rb") as f2,
334+
):
332335
self.assertEqual(f1.read(), b"Test file content")
333336
self.assertEqual(f2.read(), b"Test file content")
334337

0 commit comments

Comments
 (0)