Skip to content

Commit

Permalink
Merge pull request #4888 from voxel51/bug/quickstart
Browse files Browse the repository at this point in the history
Remove deprecated fiftyone-desktop refs
  • Loading branch information
brimoor authored Oct 4, 2024
2 parents cc430f4 + 2496795 commit 2580fb5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 23 deletions.
8 changes: 0 additions & 8 deletions fiftyone/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,3 @@

# Server setup
SERVER_DIR = os.path.join(FIFTYONE_DIR, "server")

# App setup
try:
from fiftyone.desktop import FIFTYONE_DESKTOP_APP_DIR
except ImportError:
FIFTYONE_DESKTOP_APP_DIR = os.path.normpath(
os.path.join(FIFTYONE_DIR, "../app")
)
2 changes: 1 addition & 1 deletion fiftyone/core/session/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ def wait(self, wait: float = 3) -> None:
if wait < 0:
while True:
time.sleep(10)
elif self.remote:
else:
self._wait_closed = False
while not self._wait_closed:
time.sleep(wait)
Expand Down
22 changes: 8 additions & 14 deletions fiftyone/utils/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
import fiftyone.zoo.datasets as fozd


def quickstart(
video=False, port=None, address=None, remote=False, desktop=None
):
def quickstart(video=False, port=None, address=None, remote=False):
"""Runs the FiftyOne quickstart.
This method loads an interesting dataset from the Dataset Zoo, launches the
Expand All @@ -27,9 +25,6 @@ def quickstart(
``fiftyone.config.default_app_address`` is used
remote (False): whether this is a remote session, and opening the App
should not be attempted
desktop (None): whether to launch the App in the browser (False) or as
a desktop App (True). If None, ``fiftyone.config.desktop_app`` is
used. Not applicable to notebook contexts
Returns:
a tuple containing
Expand All @@ -39,30 +34,29 @@ def quickstart(
the App that was launched
"""
if video:
return _video_quickstart(port, address, remote, desktop)
return _video_quickstart(port, address, remote)

return _quickstart(port, address, remote, desktop)
return _quickstart(port, address, remote)


def _quickstart(port, address, remote, desktop):
def _quickstart(port, address, remote):
print(_QUICKSTART_GUIDE)
dataset = fozd.load_zoo_dataset("quickstart")
return _launch_app(dataset, port, address, remote, desktop)
return _launch_app(dataset, port, address, remote)


def _video_quickstart(port, address, remote, desktop):
def _video_quickstart(port, address, remote):
print(_VIDEO_QUICKSTART_GUIDE)
dataset = fozd.load_zoo_dataset("quickstart-video")
return _launch_app(dataset, port, address, remote, desktop)
return _launch_app(dataset, port, address, remote)


def _launch_app(dataset, port, address, remote, desktop):
def _launch_app(dataset, port, address, remote):
session = fos.launch_app(
dataset=dataset,
port=port,
address=address,
remote=remote,
desktop=desktop,
)

return dataset, session
Expand Down

0 comments on commit 2580fb5

Please sign in to comment.