diff --git a/flixopt/flow_system.py b/flixopt/flow_system.py index 90913b05a..d911b8e63 100644 --- a/flixopt/flow_system.py +++ b/flixopt/flow_system.py @@ -245,7 +245,7 @@ def plot_network( def start_network_app(self): """Visualizes the network structure of a FlowSystem using Dash, Cytoscape, and networkx. - Requires optional dependencies: dash, dash-cytoscape, networkx, werkzeug. + Requires optional dependencies: dash, dash-cytoscape, dash-daq, networkx, flask, werkzeug. """ from .network_app import DASH_CYTOSCAPE_AVAILABLE, VISUALIZATION_ERROR, flow_graph, shownetwork @@ -258,7 +258,8 @@ def start_network_app(self): if not DASH_CYTOSCAPE_AVAILABLE: raise ImportError( f'Network visualization requires optional dependencies. ' - f'Install with: pip install flixopt[viz], flixopt[full] or pip install dash dash_cytoscape networkx werkzeug. ' + f'Install with: `pip install flixopt[network_viz]`, `pip install flixopt[full]` ' + f'or: `pip install dash dash-cytoscape dash-daq networkx werkzeug`. ' f'Original error: {VISUALIZATION_ERROR}' ) @@ -278,7 +279,8 @@ def stop_network_app(self): if not DASH_CYTOSCAPE_AVAILABLE: raise ImportError( f'Network visualization requires optional dependencies. ' - f'Install with: pip install flixopt[viz]. ' + f'Install with: `pip install flixopt[network_viz]`, `pip install flixopt[full]` ' + f'or: `pip install dash dash-cytoscape dash-daq networkx werkzeug`. ' f'Original error: {VISUALIZATION_ERROR}' ) diff --git a/pyproject.toml b/pyproject.toml index 2384dcdc3..b1c2461ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,73 +36,76 @@ dependencies = [ # Core scientific computing "numpy >= 1.21.5, < 3", "pandas >= 2.0.0, < 3", + "xarray >= 2024.2.0, < 2026.0", # CalVer: allow through next calendar year # Optimization and data handling - "linopy >=0.5.7, <0.5.8", # Update and test regularly + "linopy >= 0.5.1, < 0.6", # Widened from patch pin to minor range "netcdf4 >= 1.6.1, < 2", # Utilities - "PyYAML >= 6.0.0, < 7", - "rich >= 13.0.0", - "tomli >= 2.0.1; python_version < '3.11'", # Only needed with python 3.10 or earlier + "pyyaml >= 6.0.0, < 7", + "rich >= 13.0.0, < 15", + "tomli >= 2.0.1, < 3; python_version < '3.11'", # Only needed with python 3.10 or earlier # Default solver - "highspy >= 1.5.3", + "highspy >= 1.5.3, < 2", # Visualization - "matplotlib >= 3.5.2, < 4.0.0", - "plotly >=5.15.0, <6.4.0", + "matplotlib >= 3.5.2, < 4", + "plotly >= 5.15.0, < 7", ] [project.optional-dependencies] # Interactive network visualization with enhanced color picker -network-viz = [ - "dash >= 3.0.0", - "dash-cytoscape >= 1.0.0", - "dash-daq >= 0.6.0", - "networkx >= 3.0.0", - "werkzeug >= 3.0.0", +network_viz = [ + "dash >= 3.0.0, < 4", + "dash-cytoscape >= 1.0.0, < 2", + "dash-daq >= 0.6.0, < 1", + "networkx >= 3.0.0, < 4", + "werkzeug >= 3.0.0, < 4", + "flask >= 3.0.0, < 4", # Explicit Flask cap to prevent transitive major bumps ] # Full feature set (everything except dev tools) full = [ - "pyvis ==0.3.2", # Visualizing FlowSystem Network - "tsam >= 2.3.1, < 3.0.0", # Time series aggregation - "scipy >= 1.15.1, < 2.0.0", # Used by tsam. Prior versions have conflict with highspy. See https://github.com/scipy/scipy/issues/22257 - "gurobipy >= 10.0.0", - "dash >= 3.0.0", # Visualizing FlowSystem Network as app - "dash-cytoscape >= 1.0.0", # Visualizing FlowSystem Network as app - "dash-daq >= 0.6.0", # Visualizing FlowSystem Network as app - "networkx >= 3.0.0", # Visualizing FlowSystem Network as app - "werkzeug >= 3.0.0", # Visualizing FlowSystem Network as app + "pyvis==0.3.2", # Visualizing FlowSystem Network + "tsam >= 2.3.1, < 3", # Time series aggregation + "scipy >= 1.15.1, < 2", # Used by tsam. Prior versions have conflict with highspy. See https://github.com/scipy/scipy/issues/22257 + "gurobipy >= 10.0.0, < 13", + "dash >= 3.0.0, < 4", # Visualizing FlowSystem Network as app + "dash-cytoscape >= 1.0.0, < 2", # Visualizing FlowSystem Network as app + "dash-daq >= 0.6.0, < 1", # Visualizing FlowSystem Network as app + "networkx >= 3.0.0, < 4", # Visualizing FlowSystem Network as app + "werkzeug >= 3.0.0, < 4", # Visualizing FlowSystem Network as app + "flask >= 3.0.0, < 4", # Explicit Flask cap to prevent transitive major bumps ] # Development tools and testing dev = [ - "pytest >= 7.0.0", - "nbformat>=4.2.0", # Related to failing CI with Plotly>6 - "ruff >= 0.9.0", - "pre-commit >= 4.0.0", - "pyvis ==0.3.2", # Visualizing FlowSystem - "tsam >= 2.3.1, < 3.0.0", # Time series aggregation - "scipy >= 1.15.1, < 2.0.0", # Used by tsam. Prior versions have conflict with highspy. See https://github.com/scipy/scipy/issues/22257 - "gurobipy >= 10.0.0", - "dash >= 3.0.0", - "dash-cytoscape >= 1.0.0", - "dash-daq >= 0.6.0", - "networkx >= 3.0.0", - "werkzeug >= 3.0.0", + "pytest==8.4.2", + "nbformat==5.10.4", + "ruff==0.13.0", + "pre-commit==4.3.0", + "pyvis==0.3.2", + "tsam==2.3.1", + "scipy==1.15.1", + "gurobipy==12.0.3", + "dash==3.0.0", + "dash-cytoscape==1.0.0", + "dash-daq==0.6.0", + "networkx==3.0.0", + "werkzeug==3.0.0", ] # Documentation building docs = [ - "mkdocs-material >= 9.0.0, < 10", - "mkdocstrings-python >= 1.0.0", - "mkdocs-table-reader-plugin >= 2.0.0", - "mkdocs-gen-files >= 0.4.0", - "mkdocs-include-markdown-plugin >= 6.0.0", - "mkdocs-literate-nav >= 0.6.0", - "markdown-include >= 0.8.0", - "pymdown-extensions >= 10.0.0", - "pygments >= 2.14.0", - "mike >= 2.0.0", + "mkdocs-material==9.6.19", + "mkdocstrings-python==1.18.2", + "mkdocs-table-reader-plugin==3.1.0", + "mkdocs-gen-files==0.5.0", + "mkdocs-include-markdown-plugin==7.1.7", + "mkdocs-literate-nav==0.6.2", + "markdown-include==0.8.1", + "pymdown-extensions==10.16.1", + "pygments==2.19.2", + "mike==2.1.3", ] [project.urls]