From a3e06ce5ae3d167ed941726d459fa7df6b7bb347 Mon Sep 17 00:00:00 2001 From: golmschenk Date: Mon, 5 Feb 2024 23:03:17 -0800 Subject: [PATCH] Disable uvloop dependency on Windows --- pyproject.toml | 2 +- .../analysis/light_curve_folding_vizualizer/application.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8c9f0d9a..a4a7e3ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ dependencies = [ "beautifulsoup4>=4.11.2", "lxml>=4.9.2", "lightkurve>=2.3.0", -"uvloop>=0.17.0", +"uvloop>=0.17.0; platform_system != 'Windows'", "filelock>=3.9.0", "torch>=2.0.1", "torchvision>=0.15.2", diff --git a/src/ramjet/analysis/light_curve_folding_vizualizer/application.py b/src/ramjet/analysis/light_curve_folding_vizualizer/application.py index 328dc992..f3a14d01 100644 --- a/src/ramjet/analysis/light_curve_folding_vizualizer/application.py +++ b/src/ramjet/analysis/light_curve_folding_vizualizer/application.py @@ -2,7 +2,6 @@ import platform from pathlib import Path -import uvloop from bokeh import plotting from bokeh.application import Application from bokeh.application.handlers import DirectoryHandler @@ -13,6 +12,7 @@ def run_viewer(light_curve_path: Path, port: int = 5007): if platform.system() != 'Windows': + import uvloop uvloop.install() print(f'Opening viewer on http://localhost:{port}/') handler = DirectoryHandler(filename=str(Path(__file__).parent), argv=[light_curve_path])