From 9473783240407330e6fce8d806e41ceeebd3e7d9 Mon Sep 17 00:00:00 2001 From: zealous-ideal-monk Date: Thu, 14 Nov 2024 04:55:35 +0530 Subject: [PATCH 1/3] move streamlit and other dev tools to optional dependencies --- pyproject.toml | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cc21213..3b4c216 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,32 +6,40 @@ build-backend = "setuptools.build_meta" name = "quartz_solar_forecast" version = "1.0.81" description = "Open Source Solar Forecasting for a Site" -authors = [ - { name = "Peter Dudfield", email = "info@openclimatefix.org" } -] +authors = [{ name = "Peter Dudfield", email = "info@openclimatefix.org" }] readme = "README.md" requires-python = ">=3.6" license = { text = "MIT" } dependencies = [ + # Core data processing and ML "xarray==2022.12.0", "pv-site-prediction==0.1.19", "pydantic==2.6.2", - "huggingface_hub==0.17.3", # only for evaluation + "xgboost==2.0.3", + # API and server dependencies + "fastapi", + "uvicorn", + "pydantic_settings", + "httpx", + "async_timeout", + # HTTP/Request handling "python-dotenv==1.0.1", "openmeteo-requests==1.2.0", "requests-cache==1.2.0", "retry-requests==2.0.0", - "gdown==5.1.0", - "xgboost==2.0.3", - "plotly", + # CLI tools "typer", - "streamlit", - "async_timeout", - "uvicorn", - "fastapi", - "pydantic_settings", - "httpx" +] + +dev = [ + # Development and visualization tools + "streamlit", # Development UI/dashboards + "plotly", # Visualization during development + + # Model evaluation and data download + "huggingface_hub==0.17.3", # Noted as evaluation only + "gdown==5.1.0", # Data/model download during development ] [project.urls] From dfbd8efba620c2df10aa58e89574034761722878 Mon Sep 17 00:00:00 2001 From: zealous-ideal-monk Date: Fri, 15 Nov 2024 04:36:18 +0530 Subject: [PATCH 2/3] Moved dependencies in the respected place holder created before --- pyproject.toml | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3b4c216..ac7cf73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,35 +11,23 @@ readme = "README.md" requires-python = ">=3.6" license = { text = "MIT" } +[project] dependencies = [ - # Core data processing and ML + # Keep core dependencies that are needed for the app to run "xarray==2022.12.0", "pv-site-prediction==0.1.19", "pydantic==2.6.2", - "xgboost==2.0.3", - # API and server dependencies - "fastapi", - "uvicorn", - "pydantic_settings", - "httpx", - "async_timeout", - # HTTP/Request handling "python-dotenv==1.0.1", "openmeteo-requests==1.2.0", "requests-cache==1.2.0", "retry-requests==2.0.0", - # CLI tools + "xgboost==2.0.3", "typer", -] - -dev = [ - # Development and visualization tools - "streamlit", # Development UI/dashboards - "plotly", # Visualization during development - - # Model evaluation and data download - "huggingface_hub==0.17.3", # Noted as evaluation only - "gdown==5.1.0", # Data/model download during development + "async_timeout", + "uvicorn", + "fastapi", + "pydantic_settings", + "httpx", ] [project.urls] @@ -50,7 +38,8 @@ packages = { find = { include = ["*"] } } package-data = { "quartz_solar_forecast" = ["*"] } [project.optional-dependencies] -dev = [] +dev = ["streamlit", "plotly", "huggingface_hub==0.17.3", "gdown==5.1.0"] + # additional vendor-specific dependencies for connecting to inverter APIs inverters = ["ocf_vrmapi"] # victron all = ["ocf_vrmapi"] From 90c6870d91f1101e9e2ac0ae0b520f3b7ead6603 Mon Sep 17 00:00:00 2001 From: zealous-ideal-monk Date: Fri, 15 Nov 2024 14:25:05 +0530 Subject: [PATCH 3/3] refactor: reorganize dependencies and add 'all' group --- pyproject.toml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ac7cf73..f245d5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,6 @@ dependencies = [ "typer", "async_timeout", "uvicorn", - "fastapi", "pydantic_settings", "httpx", ] @@ -38,11 +37,24 @@ packages = { find = { include = ["*"] } } package-data = { "quartz_solar_forecast" = ["*"] } [project.optional-dependencies] -dev = ["streamlit", "plotly", "huggingface_hub==0.17.3", "gdown==5.1.0"] +dev = [ + "streamlit", + "plotly", + "huggingface_hub==0.17.3", + "gdown==5.1.0", + "fastapi", +] # additional vendor-specific dependencies for connecting to inverter APIs inverters = ["ocf_vrmapi"] # victron -all = ["ocf_vrmapi"] +all = [ + "ocf_vrmapi", + "streamlit", + "plotly", + "huggingface_hub==0.17.3", + "gdown==5.1.0", + "fastapi", +] [tool.mypy]