Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install ruff==0.15.4
pip install "ruff>=0.14.0,<0.16.0"

- name: Run Ruff
run: |
Expand Down
34 changes: 23 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,33 @@ dependencies = [
"isage>=0.2.4.21",

# Flownet runtime (distributed dataflow execution, replaces Ray)
"isage-flownet>=0.1.1",
# Python 3.10 CI cannot resolve transitive dependency isage-common from flownet.
"isage-flownet>=0.1.1; python_version >= '3.11'",

# sageLLM - IntelliStream自研推理引擎(包含Gateway、Control Plane、Backend等完整推理能力)
"isagellm>=0.5.4.3",

# Agentic dependencies (independent packages)
"isage-agentic>=0.1.0.3",
"isage-libs-intent>=0.1.0.7", # Intent recognition (L3)
# Python 3.10 CI cannot resolve transitive dependency isage-intent from isage-agentic.
"isage-agentic>=0.1.0.3; python_version >= '3.11'",
"isage-libs-intent>=0.1.0.7", # Intent recognition (L3)

# Memory management (independent package)
"isage-neuromem>=0.2.1.4", # Memory collection & vector storage (L4)
# Python 3.10 CI cannot resolve neuromem transitive dependency isage-libs>=0.2.4.29.
"isage-neuromem>=0.2.1.4; python_version >= '3.11'", # Memory collection & vector storage (L4)

# Data management (independent package)
"isage-data>=0.2.3.2", # Dataset management (used by finetune data endpoints)
# Python 3.10 CI cannot resolve transitive dependency isage-common from data.
"isage-data>=0.2.3.2; python_version >= '3.11'", # Dataset management (used by finetune data endpoints)

# Fine-tune dependencies (independent package)
"isage-finetune>=0.1.0.5",
# PyPI currently exposes newer finetune builds for 3.11+ while 3.10 resolves up to 0.1.0.3.
"isage-finetune>=0.1.0.3; python_version == '3.10'",
"isage-finetune>=0.1.0.5; python_version >= '3.11'",

# Backend API dependencies
"pydantic[email]>=2.10.0,<3.0.0",
"pydantic>=2.10.0,<3.0.0",
"email-validator>=2.2.0",
"fastapi>=0.115.0,<1.0.0",
"starlette>=0.40,<0.53",
"uvicorn[standard]>=0.34.0,<1.0.0",
Expand All @@ -72,16 +79,20 @@ dependencies = [
"packaging>=24.0,<27.0", # 兼容 streamlit 等版本

# SAGE kernel integration (includes sage.middleware.* pipeline layer)
"isage-kernel>=0.2.5.0",
"isage-vida>=0.1.0",
# Py3.10 resolves kernel up to 0.2.4.13; newer builds target 3.11+.
"isage-kernel>=0.2.4.13; python_version == '3.10'",
"isage-kernel>=0.2.5.0; python_version >= '3.11'",
# Python 3.10 CI cannot resolve transitive dependency isage-common from vida.
"isage-vida>=0.1.0; python_version >= '3.11'",
]

license = { text = "MIT" }

[project.optional-dependencies]
full = [
# Continual-learning / coreset selection for tool-use features
"isage-sias>=0.1.0",
# SIAS wheels are not currently published for Python 3.10.
"isage-sias>=0.1.0; python_version >= '3.11'",
# Backend API / auth / config helpers (optional for lightweight studio installs)
"aiofiles>=23.0.0",
"configparser>=5.3.0",
Expand All @@ -93,9 +104,10 @@ full = [
]

dev = [
"isage-studio[full]",
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"ruff==0.15.4",
"ruff>=0.14.0,<0.16.0",
"isage-pypi-publisher>=0.2.1.0",
]

Expand Down
2 changes: 1 addition & 1 deletion src/sage/studio/_version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Version information for sage-studio package."""

# 独立硬编码版本
__version__ = "0.2.4.37"
__version__ = "0.2.4.43"
__author__ = "IntelliStream Team"
__email__ = "shuhao_zhang@hust.edu.cn"
21 changes: 9 additions & 12 deletions tests/integration/test_studio_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
from unittest.mock import patch

import pytest

# Import from sage-cli (which hosts the studio command)
from sage.cli.main import app as sage_app
from typer.testing import CliRunner

from sage.studio.cli import app as studio_app

# Test runner
runner = CliRunner()

Expand Down Expand Up @@ -88,9 +87,7 @@ def test_studio_start_command(mock_studio_manager):
"""Test that 'sage studio start' command works."""
# Patch at the import location before CLI invocation
with patch("sage.studio.cli.studio_manager", mock_studio_manager):
result = runner.invoke(
sage_app, ["studio", "start", "--host", "127.0.0.1", "--port", "9001"]
)
result = runner.invoke(studio_app, ["start", "--host", "127.0.0.1", "--port", "9001"])
# Print output for debugging
if result.exit_code != 0:
print(f"Exit code: {result.exit_code}")
Expand All @@ -108,7 +105,7 @@ def test_studio_start_command(mock_studio_manager):
def test_studio_status_command(mock_studio_manager):
"""Test that 'sage studio status' command works."""
with patch("sage.studio.cli.studio_manager", mock_studio_manager):
result = runner.invoke(sage_app, ["studio", "status"])
result = runner.invoke(studio_app, ["status"])
assert result.exit_code == 0


Expand All @@ -118,7 +115,7 @@ def test_studio_stop_command(mock_studio_manager):
mock_studio_manager._running = True

with patch("sage.studio.cli.studio_manager", mock_studio_manager):
result = runner.invoke(sage_app, ["studio", "stop"])
result = runner.invoke(studio_app, ["stop"])
assert result.exit_code == 0
# After stop command, manager should not be running
assert mock_studio_manager._running is False
Expand All @@ -127,27 +124,27 @@ def test_studio_stop_command(mock_studio_manager):
def test_studio_install_command(mock_studio_manager):
"""Test that 'sage studio install' command works."""
with patch("sage.studio.cli.studio_manager", mock_studio_manager):
result = runner.invoke(sage_app, ["studio", "install"])
result = runner.invoke(studio_app, ["install"])
assert result.exit_code == 0


def test_studio_build_command(mock_studio_manager):
"""Test that 'sage studio build' command works."""
with patch("sage.studio.cli.studio_manager", mock_studio_manager):
result = runner.invoke(sage_app, ["studio", "build"])
result = runner.invoke(studio_app, ["build"])
assert result.exit_code == 0


def test_studio_help_command():
"""Test that 'sage studio --help' command works."""
result = runner.invoke(sage_app, ["studio", "--help"])
result = runner.invoke(studio_app, ["--help"])
assert result.exit_code == 0
assert "Studio" in result.stdout or "studio" in result.stdout


def test_studio_npm_command(mock_studio_manager):
"""Test that 'sage studio npm install' command works."""
with patch("sage.studio.cli.studio_manager", mock_studio_manager):
result = runner.invoke(sage_app, ["studio", "npm", "install"])
result = runner.invoke(studio_app, ["npm", "install"])
assert result.exit_code == 0
assert getattr(mock_studio_manager, "_last_npm", None) == ["install"]
Loading