Skip to content

Commit

Permalink
Define kfp as extra and update error messages (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgesLorre authored Aug 17, 2023
1 parent e580189 commit 9a022aa
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 91 deletions.
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,13 @@ gcsfs = { version = ">= 2023.4.0", optional = true }
s3fs = { version = ">= 2023.4.0", optional = true }
adlfs = { version = ">= 2023.4.0", optional = true }
kfp = { version = ">= 1.8.19, < 2", optional = true }
kubernetes = { version = ">= 18.20.0", optional = true }
pandas = { version = ">= 1.3.5", optional = true }

[tool.poetry.extras]
aws = ["fsspec", "s3fs"]
azure = ["fsspec", "adlfs"]
gcp = ["fsspec", "gcsfs"]
pipelines = ["kfp", "kubernetes"]
kfp = ["kfp"]

[tool.poetry.group.test.dependencies]
pre-commit = "^3.1.1"
Expand Down
2 changes: 1 addition & 1 deletion src/fondant/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def _resolve_imports(self):
self.kfp = kfp
except ImportError:
msg = """You need to install kfp to use the Kubeflow compiler,\n
you can install it with `pip install --extras pipelines`"""
you can install it with `pip install fondant[kfp]`"""
raise ImportError(
msg,
)
Expand Down
41 changes: 0 additions & 41 deletions src/fondant/import_utils.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/fondant/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _resolve_imports(self):
self.kfp = kfp
except ImportError:
msg = """You need to install kfp to use the Kubeflow compiler,\n
you can install it with `pip install --extras pipelines`"""
you can install it with `pip install fondant[kfp]`"""
raise ImportError(
msg,
)
Expand Down
46 changes: 0 additions & 46 deletions tests/test_import_utils.py

This file was deleted.

0 comments on commit 9a022aa

Please sign in to comment.