Skip to content

Commit 69550db

Browse files
authored
Merge pull request #437 from aperture-data/release-0.4.27
Release 0.4.27
2 parents 89b0b2a + e69f732 commit 69550db

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

aperturedb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
logger = logging.getLogger(__name__)
99

10-
__version__ = "0.4.26"
10+
__version__ = "0.4.27"
1111

1212
# set log level
1313
logger.setLevel(logging.DEBUG)

aperturedb/cli/transact.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@
1717
logger = logging.getLogger(__file__)
1818

1919
FUSE_AVAIALBLE = False
20-
try:
21-
from aperturedb.cli.mount_coco import mount_images_from_aperturedb
22-
FUSE_AVAIALBLE = True
23-
except ImportError as e:
24-
logger.warning(
25-
"fuse not found for this env. This is not critical for adb to continue.")
2620

27-
app = typer.Typer()
21+
22+
def load_fuse():
23+
global FUSE_AVAIALBLE
24+
try:
25+
from aperturedb.cli.mount_coco import mount_images_from_aperturedb
26+
FUSE_AVAIALBLE = True
27+
except ImportError as e:
28+
logger.warning(
29+
"fuse not found for this env. This is not critical for adb to continue.")
30+
31+
32+
app = typer.Typer(callback=load_fuse)
2833

2934

3035
class OutputTypes(str, Enum):
@@ -57,7 +62,7 @@ def mount_as_coco_ds(db: Connector, transaction: dict, **kwargs):
5762
else:
5863
console.log(f"No entities found in FindImage {i} response")
5964
try:
60-
65+
from aperturedb.cli.mount_coco import mount_images_from_aperturedb
6166
images = Images(db, response=image_entities)
6267
console.log(f"Found {len(images)} images")
6368
mount_images_from_aperturedb(images)
@@ -80,6 +85,7 @@ def from_json_file(
8085
output_types = {
8186
OutputTypes.STDOUT: dump_to_stdout
8287
}
88+
global FUSE_AVAIALBLE
8389
if FUSE_AVAIALBLE:
8490
output_types[OutputTypes.MOUNT_COCO] = mount_as_coco_ds
8591

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies = [
2222
'scikit-image', 'image', 'requests', 'boto3',
2323
'numpy', 'matplotlib', 'pandas', 'kaggle', 'google-cloud-storage',
2424
'ipython', 'dask[complete]', 'ipywidgets', 'pydantic', 'devtools', 'typer[all]',
25-
"opencv-python",
25+
"opencv-python-headless",
2626
# Pinning this to be able to install google-cloud-bigquery
2727
'grpcio-status==1.48.2',
2828
# Pinning this to resolve test errors temporarily

0 commit comments

Comments
 (0)