From 5b4de3ffc3ac2e4f195a2450218842cfb08b7cc8 Mon Sep 17 00:00:00 2001 From: ioangatop Date: Mon, 22 Jan 2024 18:16:25 +0100 Subject: [PATCH] Add vision extra sub-module (#33) --- pdm.lock | 4 ++-- pyproject.toml | 3 +++ src/eva/vision/__init__.py | 10 ++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 src/eva/vision/__init__.py diff --git a/pdm.lock b/pdm.lock index 4c38c3c6..1ac2facd 100644 --- a/pdm.lock +++ b/pdm.lock @@ -2,10 +2,10 @@ # It is not intended for manual editing. [metadata] -groups = ["default", "dev", "lint", "test"] +groups = ["default", "dev", "lint", "test", "vision"] strategy = ["cross_platform"] lock_version = "4.4.1" -content_hash = "sha256:ca34999d64a12dbc4bc8f9a76ee30e24eca48b07ff8143119bbd19b0178a039c" +content_hash = "sha256:403c9513780da970306fe4920430af39c34bd51950ddc0e345605df4ba477fce" [[package]] name = "aiohttp" diff --git a/pyproject.toml b/pyproject.toml index 0c28cad1..93cf1762 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,9 @@ dependencies = [ ] [project.optional-dependencies] +vision = [ +] +all = ["eva[vision]"] lint = [ "isort>=5.12.0", "black>=23.1.0", diff --git a/src/eva/vision/__init__.py b/src/eva/vision/__init__.py new file mode 100644 index 00000000..7b8b442c --- /dev/null +++ b/src/eva/vision/__init__.py @@ -0,0 +1,10 @@ +"""EVA vision API.""" +try: + pass +except ImportError as e: + msg = ( + "EVA vision requirements are not installed.\n\n" + "Please pip install as follows:\n" + ' python -m pip install "eva[vision]" --upgrade' + ) + raise ImportError(str(e) + "\n\n" + msg) from e