Repository: voxel51/fiftyone

Issue:
[INSTALL] Some `setup.py` dependencies are not used.
### System information

-   **OS Platform and Distribution** (e.g., Linux Ubuntu 16.04): Ubuntu 22.04
-   **Python version** (`python --version`): 3.9.17
-   **FiftyOne version** (`fiftyone --version`): 0.21
-   **FiftyOne installed from** (pip or source): pip/poetry

### Describe the problem

My main issue was related to `eventlet` library, so I started looking where it's used. When I didn't find a place where it's used I decided to go through `setup.py` to find other unused ones. Here's the list with comments:

- `eventlet` - not used in the project but causes issues when it's installed; for example, `FastAPI` crashes during file downloading with a traceback pointing to a file descriptor used by a `socket` library (which is basically `asyncio` internals), and that makes sense because `eventlet` is just a hack to make sync code async. Also I saw the same issues with `s3fs` library.
- `future` - this library is for Python2/3 compatibility; not sure if this is needed since the minimum version of Python this project supports is 3.7.
- `kaleido` - `kaleido` after installation exports the same symbol `plotly` which I believe is being overwritten with the `plotly` library.

**Question**: Am I missing something or these dependencies are really not used in the project? If so is it possible to remove them? (I can make a PR)


Discussion:
Hi @eugene-graft. I will double check things, but yes I agree these dependencies can probably be removed.
@benjaminpkane thank you for a quick reply. Please let me know if you want me to create a PR for that change.

Resolving patch:
diff --git a/app/packages/looker-3d/load_kiti.py b/app/packages/looker-3d/load_kiti.py
deleted file mode 100644
--- a/app/packages/looker-3d/load_kiti.py
+++ /dev/null
@@ -1,24 +0,0 @@
-import fiftyone as fo
-import fiftyone.zoo as foz
-import os
-
-# dataset = foz.load_zoo_dataset("kitti", split="train")
-
-dataset = fo.load_dataset("kitti-copy")
-
-dataset.add_sample_field("pcd_filepath", fo.StringField)
-
-# firstSample = dataset.first()
-
-# dataDir = os.path.dirname(firstSample.filepath)
-# dataDirParent = os.path.dirname(dataDir)
-# pointsDir = os.path.join(dataDirParent, 'pcds')
-# print(pointsDir)
-
-# for sample in dataset.iter_samples(progress=True):
-#   base = os.path.basename(sample.filepath)
-#   filename = os.path.splitext(base)[0]
-#   pcd_filename = filename + '.bin.pcd'
-#   pcd_filepath = os.path.join(pointsDir, pcd_filename)
-#   sample['pcd_filepath'] = pcd_filepath
-#   sample.save()
diff --git a/app/packages/looker-3d/load_kitti_labels.py b/app/packages/looker-3d/load_kitti_labels.py
deleted file mode 100644
--- a/app/packages/looker-3d/load_kitti_labels.py
+++ /dev/null
@@ -1,26 +0,0 @@
-import fiftyone as fo
-import fiftyone.zoo as foz
-import os
-
-# dataset = foz.load_zoo_dataset("kitti", split="train")
-
-dataset = fo.load_dataset("kitti-pcd")
-
-# dataset.add_sample_field('pcd_filepath', fo.StringField)
-
-firstSample = dataset.first()
-
-print(firstSample)
-
-# dataDir = os.path.dirname(firstSample.filepath)
-# dataDirParent = os.path.dirname(dataDir)
-# pointsDir = os.path.join(dataDirParent, 'pcds')
-# print(pointsDir)
-
-# for sample in dataset.iter_samples(progress=True):
-#   base = os.path.basename(sample.filepath)
-#   filename = os.path.splitext(base)[0]
-#   pcd_filename = filename + '.bin.pcd'
-#   pcd_filepath = os.path.join(pointsDir, pcd_filename)
-#   sample['pcd_filepath'] = pcd_filepath
-#   sample.save()
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -40,12 +40,12 @@ def get_version():
     "cachetools",
     "dacite>=1.6.0,<1.8.0",
     "Deprecated",
-    "eventlet",
     "ftfy",
-    "future",
     "hypercorn>=0.13.2",
     "importlib-metadata; python_version<'3.8'",
     "Jinja2>=3",
+    # kaleido indirectly required by plotly for image export
+    # https://plotly.com/python/static-image-export/
     "kaleido",
     "matplotlib",
     "mongoengine==0.24.2",


Test patch: