From 0f6bd58302562304af95a36a4a4dd28ba759ae19 Mon Sep 17 00:00:00 2001 From: Pavan More Date: Thu, 16 Oct 2025 13:43:12 +0530 Subject: [PATCH 1/8] feat: implement single source of truth for version management --- VERSION | 1 + packages/tui/Makefile | 4 +- packages/tui/cmd/rogue/main.go | 81 ++++++++++++++++++---------- packages/tui/internal/tui/app.go | 2 +- packages/tui/internal/tui/version.go | 5 ++ pyproject.toml | 11 +++- rogue/__init__.py | 21 +++++++- uv.lock | 1 - 8 files changed, 92 insertions(+), 34 deletions(-) create mode 100644 VERSION create mode 100644 packages/tui/internal/tui/version.go diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..0e24a92f --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.1.12 diff --git a/packages/tui/Makefile b/packages/tui/Makefile index 121cba34..44e7f9a1 100644 --- a/packages/tui/Makefile +++ b/packages/tui/Makefile @@ -6,12 +6,12 @@ BINARY_NAME=rogue-tui BUILD_DIR?=dist CMD_DIR=cmd/rogue -VERSION?=dev +VERSION?=$(shell cat ../../VERSION 2>/dev/null || echo "dev") COMMIT?=$(shell git rev-parse --short HEAD) DATE?=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ") # Build flags -LDFLAGS=-ldflags "-X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.date=$(DATE)" +LDFLAGS=-ldflags "-X github.com/rogue/tui/internal/tui.Version=v$(VERSION) -X main.commit=$(COMMIT) -X main.date=$(DATE)" # Default target all: build diff --git a/packages/tui/cmd/rogue/main.go b/packages/tui/cmd/rogue/main.go index 875d8d4a..0e2b3db6 100644 --- a/packages/tui/cmd/rogue/main.go +++ b/packages/tui/cmd/rogue/main.go @@ -1,35 +1,60 @@ package main import ( - "fmt" - "os" + "fmt" + "os" - "github.com/rogue/tui/internal/commands" - "github.com/spf13/cobra" + "github.com/rogue/tui/internal/commands" + "github.com/rogue/tui/internal/tui" + "github.com/spf13/cobra" ) func main() { - rootCmd := &cobra.Command{ - Use: "rogue", - Short: "Rogue Agent Evaluator TUI", - Long: "A modern terminal user interface for the Rogue Agent Evaluator, built with Go and Bubble Tea.", - Run: func(cmd *cobra.Command, args []string) { - // Default to TUI mode - commands.RunTUI() - }, - } - // Global flags - rootCmd.PersistentFlags().String("server-url", "http://localhost:8000", "Rogue server URL") - rootCmd.PersistentFlags().Bool("debug", false, "Enable debug mode") - rootCmd.PersistentFlags().Bool("no-color", false, "Disable colors") - rootCmd.PersistentFlags().String("model", "", "Default LLM model") - rootCmd.PersistentFlags().String("theme", "aura", "UI theme") - - // Add subcommands - rootCmd.AddCommand(commands.NewTUICommand()) - - if err := rootCmd.Execute(); err != nil { - fmt.Fprintf(os.Stderr, "Error: %v\n", err) - os.Exit(1) - } -} + rootCmd := &cobra.Command{ + Use: "rogue", + Short: "Rogue Agent Evaluator TUI", + Long: "A modern terminal user interface for the Rogue Agent Evaluator, built with Go and Bubble Tea.", + Run: func(cmd *cobra.Command, args []string) { + // Default to TUI mode + commands.RunTUI() + }, + } + + // Global flags + rootCmd.PersistentFlags().String("server-url", "http://localhost:8000", "Rogue server URL") + rootCmd.PersistentFlags().Bool("debug", false, "Enable debug mode") + rootCmd.PersistentFlags().Bool("no-color", false, "Disable colors") + rootCmd.PersistentFlags().String("model", "", "Default LLM model") + rootCmd.PersistentFlags().String("theme", "UI theme", "aura") + + // Add version flag to root command + var showVersion bool + rootCmd.Flags().BoolVarP(&showVersion, "version", "v", false, "Show version information") + + // Add version command + versionCmd := &cobra.Command{ + Use: "version", + Short: "Show version information", + Long: "Display the current version of rogue-tui", + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("rogue-tui %s\n", tui.Version) + }, + } + rootCmd.AddCommand(versionCmd) + + // Add existing subcommands + rootCmd.AddCommand(commands.NewTUICommand()) + + // Handle version flag on root command before execution + rootCmd.PreRun = func(cmd *cobra.Command, args []string) { + if showVersion { + fmt.Printf("rogue-tui %s\n", tui.Version) + os.Exit(0) + } + } + + if err := rootCmd.Execute(); err != nil { + fmt.Fprintf(os.Stderr, "Error: %v\n", err) + os.Exit(1) + } +} \ No newline at end of file diff --git a/packages/tui/internal/tui/app.go b/packages/tui/internal/tui/app.go index 2dde5cd4..a66e3c10 100644 --- a/packages/tui/internal/tui/app.go +++ b/packages/tui/internal/tui/app.go @@ -275,7 +275,7 @@ func (a *App) Run() error { Theme: "aura", APIKeys: make(map[string]string), }, - version: "v0.1.10", + version: Version, commandInput: components.NewCommandInput(), scenarioEditor: components.NewScenarioEditor(), diff --git a/packages/tui/internal/tui/version.go b/packages/tui/internal/tui/version.go new file mode 100644 index 00000000..9a7a56a3 --- /dev/null +++ b/packages/tui/internal/tui/version.go @@ -0,0 +1,5 @@ +package tui + +// Version will be set at build time via ldflags +// Default to "dev" if not set during build +var Version = "vdev" diff --git a/pyproject.toml b/pyproject.toml index c3b7a3ee..5f473e93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "rogue-ai" -version = "0.1.10" +dynamic = ["version"] description = "Rogue agent evaluator by Qualifire" readme = "README.md" requires-python = ">=3.10" @@ -45,6 +45,10 @@ examples = ["langchain==0.3.26", "langchain-openai==0.3.27", "langgraph==0.5.2"] requires = ["hatchling"] build-backend = "hatchling.build" +[tool.hatch.version] +path = "VERSION" +pattern = "(?P^\\s*[^\\r\\n\\s]+)" + [tool.hatch.build.targets.wheel] packages = ["rogue", "examples"] @@ -55,3 +59,8 @@ packages = ["rogue", "examples"] [project.scripts] rogue-ai = "rogue.__main__:main" rogue-ai-example-tshirt = "examples.tshirt_store_agent.__main__:main" + +[tool.pytest.ini_options] +markers = [ + "integration: marks tests as integration tests (deselect with '-m \"not integration\"')", +] \ No newline at end of file diff --git a/rogue/__init__.py b/rogue/__init__.py index 16773415..791cd8f7 100644 --- a/rogue/__init__.py +++ b/rogue/__init__.py @@ -4,6 +4,8 @@ This module provides a clean, library-oriented API for agent evaluation. """ +from pathlib import Path + # Import submodules for backward compatibility from . import ( common, @@ -43,7 +45,24 @@ "ui", ] +# Read version from VERSION file +def _get_version(): + try: + # In development, prioritize VERSION file over installed metadata + version_file = Path(__file__).parent.parent / "VERSION" + if version_file.exists(): + return version_file.read_text().strip() + except Exception: + pass + + try: + # Fall back to installed package metadata + from importlib.metadata import version + return version("rogue-ai") + except Exception: + return "0.0.0-dev" + # Version info -__version__ = "0.1.10" +__version__ = _get_version() __author__ = "Qualifire" __description__ = "Library for evaluating AI agents against scenarios" diff --git a/uv.lock b/uv.lock index 58b24429..0a1c636d 100644 --- a/uv.lock +++ b/uv.lock @@ -3522,7 +3522,6 @@ wheels = [ [[package]] name = "rogue-ai" -version = "0.1.10" source = { editable = "." } dependencies = [ { name = "a2a-sdk" }, From 3e4abb6e4535e34460338257b5ff499da8a0b5a6 Mon Sep 17 00:00:00 2001 From: Pavan More Date: Thu, 16 Oct 2025 15:20:26 +0530 Subject: [PATCH 2/8] feat: centralise version management --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5f473e93..0f002cf4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,3 @@ packages = ["rogue", "examples"] rogue-ai = "rogue.__main__:main" rogue-ai-example-tshirt = "examples.tshirt_store_agent.__main__:main" -[tool.pytest.ini_options] -markers = [ - "integration: marks tests as integration tests (deselect with '-m \"not integration\"')", -] \ No newline at end of file From 613a5aef7b2e9d9572d3dfe89a809ee631b616d0 Mon Sep 17 00:00:00 2001 From: Pavan More Date: Fri, 17 Oct 2025 16:41:59 +0530 Subject: [PATCH 3/8] style: fix indentation and apply review fixes --- packages/tui/cmd/rogue/main.go | 2 +- rogue/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/tui/cmd/rogue/main.go b/packages/tui/cmd/rogue/main.go index 0e2b3db6..a264bf66 100644 --- a/packages/tui/cmd/rogue/main.go +++ b/packages/tui/cmd/rogue/main.go @@ -25,7 +25,7 @@ func main() { rootCmd.PersistentFlags().Bool("debug", false, "Enable debug mode") rootCmd.PersistentFlags().Bool("no-color", false, "Disable colors") rootCmd.PersistentFlags().String("model", "", "Default LLM model") - rootCmd.PersistentFlags().String("theme", "UI theme", "aura") + rootCmd.PersistentFlags().String("theme", "aura", "UI theme") // Add version flag to root command var showVersion bool diff --git a/rogue/__init__.py b/rogue/__init__.py index 791cd8f7..e3981773 100644 --- a/rogue/__init__.py +++ b/rogue/__init__.py @@ -46,7 +46,7 @@ ] # Read version from VERSION file -def _get_version(): +def _get_version() -> str: try: # In development, prioritize VERSION file over installed metadata version_file = Path(__file__).parent.parent / "VERSION" From a286cc74652f629abdb59afe012bd7feeb970398 Mon Sep 17 00:00:00 2001 From: Pavan More Date: Sun, 19 Oct 2025 09:01:44 +0530 Subject: [PATCH 4/8] build(sdk): centralize versioning for python sdk --- sdks/python/pyproject.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.toml index ffa567ec..bfb745d0 100644 --- a/sdks/python/pyproject.toml +++ b/sdks/python/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "rogue-ai-sdk" -version = "0.1.4" +dynamic = ["version"] description = "Python SDK for Rogue Agent Evaluator" readme = "README.md" requires-python = ">=3.9" @@ -46,5 +46,9 @@ Issues = "https://github.com/qualifire/rogue-agent-evaluator/issues" requires = ["hatchling"] build-backend = "hatchling.build" +[tool.hatch.version] +path = "../../VERSION" +pattern = "(?P^\\s*[^\\r\\n\\s]+)" + [tool.hatch.build.targets.wheel] packages = ["rogue_sdk"] From 7c8ca92c012f7e02e4926a08957b29b2345ac738 Mon Sep 17 00:00:00 2001 From: Pavan More Date: Sun, 19 Oct 2025 17:02:44 +0530 Subject: [PATCH 5/8] chore: centralize versioning and improve local development workflow --- packages/tui/cmd/rogue/main.go | 106 +++++++++++++++--------------- pyproject.toml | 3 + rogue/__init__.py | 19 +----- rogue/common/version.py | 41 ++++++++++++ sdks/python/pyproject.toml | 2 + sdks/python/rogue_sdk/__init__.py | 7 +- sdks/python/uv.lock | 36 +++++++++- uv.lock | 30 ++++++--- 8 files changed, 164 insertions(+), 80 deletions(-) create mode 100644 rogue/common/version.py diff --git a/packages/tui/cmd/rogue/main.go b/packages/tui/cmd/rogue/main.go index a264bf66..d7453000 100644 --- a/packages/tui/cmd/rogue/main.go +++ b/packages/tui/cmd/rogue/main.go @@ -1,60 +1,60 @@ package main import ( - "fmt" - "os" + "fmt" + "os" - "github.com/rogue/tui/internal/commands" - "github.com/rogue/tui/internal/tui" - "github.com/spf13/cobra" + "github.com/rogue/tui/internal/commands" + "github.com/rogue/tui/internal/tui" + "github.com/spf13/cobra" ) func main() { - rootCmd := &cobra.Command{ - Use: "rogue", - Short: "Rogue Agent Evaluator TUI", - Long: "A modern terminal user interface for the Rogue Agent Evaluator, built with Go and Bubble Tea.", - Run: func(cmd *cobra.Command, args []string) { - // Default to TUI mode - commands.RunTUI() - }, - } - - // Global flags - rootCmd.PersistentFlags().String("server-url", "http://localhost:8000", "Rogue server URL") - rootCmd.PersistentFlags().Bool("debug", false, "Enable debug mode") - rootCmd.PersistentFlags().Bool("no-color", false, "Disable colors") - rootCmd.PersistentFlags().String("model", "", "Default LLM model") - rootCmd.PersistentFlags().String("theme", "aura", "UI theme") - - // Add version flag to root command - var showVersion bool - rootCmd.Flags().BoolVarP(&showVersion, "version", "v", false, "Show version information") - - // Add version command - versionCmd := &cobra.Command{ - Use: "version", - Short: "Show version information", - Long: "Display the current version of rogue-tui", - Run: func(cmd *cobra.Command, args []string) { - fmt.Printf("rogue-tui %s\n", tui.Version) - }, - } - rootCmd.AddCommand(versionCmd) - - // Add existing subcommands - rootCmd.AddCommand(commands.NewTUICommand()) - - // Handle version flag on root command before execution - rootCmd.PreRun = func(cmd *cobra.Command, args []string) { - if showVersion { - fmt.Printf("rogue-tui %s\n", tui.Version) - os.Exit(0) - } - } - - if err := rootCmd.Execute(); err != nil { - fmt.Fprintf(os.Stderr, "Error: %v\n", err) - os.Exit(1) - } -} \ No newline at end of file + rootCmd := &cobra.Command{ + Use: "rogue", + Short: "Rogue Agent Evaluator TUI", + Long: "A modern terminal user interface for the Rogue Agent Evaluator, built with Go and Bubble Tea.", + Run: func(cmd *cobra.Command, args []string) { + // Default to TUI mode + commands.RunTUI() + }, + } + + // Global flags + rootCmd.PersistentFlags().String("server-url", "http://localhost:8000", "Rogue server URL") + rootCmd.PersistentFlags().Bool("debug", false, "Enable debug mode") + rootCmd.PersistentFlags().Bool("no-color", false, "Disable colors") + rootCmd.PersistentFlags().String("model", "", "Default LLM model") + rootCmd.PersistentFlags().String("theme", "aura", "UI theme") + + // Add version flag to root command + var showVersion bool + rootCmd.Flags().BoolVarP(&showVersion, "version", "v", false, "Show version information") + + // Add version command + versionCmd := &cobra.Command{ + Use: "version", + Short: "Show version information", + Long: "Display the current version of rogue-tui", + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("rogue-tui %s\n", tui.Version) + }, + } + rootCmd.AddCommand(versionCmd) + + // Add existing subcommands + rootCmd.AddCommand(commands.NewTUICommand()) + + // Handle version flag on root command before execution + rootCmd.PreRun = func(cmd *cobra.Command, args []string) { + if showVersion { + fmt.Printf("rogue-tui %s\n", tui.Version) + os.Exit(0) + } + } + + if err := rootCmd.Execute(); err != nil { + fmt.Fprintf(os.Stderr, "Error: %v\n", err) + os.Exit(1) + } +} diff --git a/pyproject.toml b/pyproject.toml index 0f002cf4..87317218 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,6 +56,9 @@ packages = ["rogue", "examples"] "rogue" = "rogue" "examples" = "examples" +[tool.uv.sources] +rogue-ai-sdk = { path = "sdks/python", editable = true } + [project.scripts] rogue-ai = "rogue.__main__:main" rogue-ai-example-tshirt = "examples.tshirt_store_agent.__main__:main" diff --git a/rogue/__init__.py b/rogue/__init__.py index e3981773..7e94cdd9 100644 --- a/rogue/__init__.py +++ b/rogue/__init__.py @@ -20,6 +20,7 @@ # Import the new library interface from .server.services.evaluation_library import EvaluationLibrary +from .common.version import get_version # Main library interface evaluate_agent = EvaluationLibrary.evaluate_agent @@ -45,24 +46,8 @@ "ui", ] -# Read version from VERSION file -def _get_version() -> str: - try: - # In development, prioritize VERSION file over installed metadata - version_file = Path(__file__).parent.parent / "VERSION" - if version_file.exists(): - return version_file.read_text().strip() - except Exception: - pass - - try: - # Fall back to installed package metadata - from importlib.metadata import version - return version("rogue-ai") - except Exception: - return "0.0.0-dev" # Version info -__version__ = _get_version() +__version__ = get_version("rogue-ai") __author__ = "Qualifire" __description__ = "Library for evaluating AI agents against scenarios" diff --git a/rogue/common/version.py b/rogue/common/version.py new file mode 100644 index 00000000..096625c8 --- /dev/null +++ b/rogue/common/version.py @@ -0,0 +1,41 @@ +""" +Shared version retrieval logic. +""" +from pathlib import Path + + +def get_version(package_name: str) -> str: + """ + Retrieves the package version. + + It first tries to find a 'VERSION' file by traversing up from the current + file's location. If found, its content is returned. + + As a fallback, it tries to get the version from the installed package + metadata using importlib.metadata. + + If both methods fail, it returns a default development version string. + + Args: + package_name: The name of the package to look up in the metadata. + + Returns: + The version string. + """ + try: + # Find project root by looking for the VERSION file + current_path = Path(__file__).resolve() + for parent in current_path.parents: + version_file = parent / "VERSION" + if version_file.exists(): + return version_file.read_text().strip() + except Exception: + pass # nosec B110 + + try: + # Fall back to installed package metadata + from importlib.metadata import version + + return version(package_name) + except Exception: + return "0.0.0-dev" \ No newline at end of file diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.toml index bfb745d0..c183ec4d 100644 --- a/sdks/python/pyproject.toml +++ b/sdks/python/pyproject.toml @@ -25,6 +25,8 @@ dependencies = [ "pydantic>=2.0.0", "websockets>=11.0.0", "typing-extensions>=4.0.0", + "loguru>=0.7.0", + "backoff>=2.2.1", ] [project.optional-dependencies] diff --git a/sdks/python/rogue_sdk/__init__.py b/sdks/python/rogue_sdk/__init__.py index 80d791d4..ee695fd2 100644 --- a/sdks/python/rogue_sdk/__init__.py +++ b/sdks/python/rogue_sdk/__init__.py @@ -53,7 +53,12 @@ async def main(): from .websocket import RogueWebSocketClient # Version -__version__ = "1.0.0" +try: + from importlib.metadata import version + __version__ = version("rogue-ai-sdk") +except Exception: + # Fallback for development environments where the package isn't installed + __version__ = "0.0.0-dev" # Default export __all__ = [ diff --git a/sdks/python/uv.lock b/sdks/python/uv.lock index 55d51796..e1f6be2c 100644 --- a/sdks/python/uv.lock +++ b/sdks/python/uv.lock @@ -30,6 +30,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/6f/12/e5e0282d673bb9746bacfb6e2dba8719989d3660cdb2ea79aee9a9651afb/anyio-4.10.0-py3-none-any.whl", hash = "sha256:60e474ac86736bbfd6f210f7a61218939c318f43f9972497381f1c5e930ed3d1", size = 107213, upload-time = "2025-08-04T08:54:24.882Z" }, ] +[[package]] +name = "backoff" +version = "2.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/47/d7/5bbeb12c44d7c4f2fb5b56abce497eb5ed9f34d85701de869acedd602619/backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba", size = 17001, upload-time = "2022-10-05T19:19:32.061Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/df/73/b6e24bd22e6720ca8ee9a85a0c4a2971af8497d8f3193fa05390cbd46e09/backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8", size = 15148, upload-time = "2022-10-05T19:19:30.546Z" }, +] + [[package]] name = "backports-asyncio-runner" version = "1.2.0" @@ -216,6 +225,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c1/11/114d0a5f4dabbdcedc1125dee0888514c3c3b16d3e9facad87ed96fad97c/isort-6.0.1-py3-none-any.whl", hash = "sha256:2dc5d7f65c9678d94c88dfc29161a320eec67328bc97aad576874cb4be1e9615", size = 94186, upload-time = "2025-02-26T21:13:14.911Z" }, ] +[[package]] +name = "loguru" +version = "0.7.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "win32-setctime", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3a/05/a1dae3dffd1116099471c643b8924f5aa6524411dc6c63fdae648c4f1aca/loguru-0.7.3.tar.gz", hash = "sha256:19480589e77d47b8d85b2c827ad95d49bf31b0dcde16593892eb51dd18706eb6", size = 63559, upload-time = "2024-12-06T11:20:56.608Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0c/29/0348de65b8cc732daa3e33e67806420b2ae89bdce2b04af740289c5c6c8c/loguru-0.7.3-py3-none-any.whl", hash = "sha256:31a33c10c8e1e10422bfd431aeb5d351c7cf7fa671e3c4df004162264b28220c", size = 61595, upload-time = "2024-12-06T11:20:54.538Z" }, +] + [[package]] name = "mccabe" version = "0.7.0" @@ -506,10 +528,11 @@ wheels = [ [[package]] name = "rogue-ai-sdk" -version = "0.1.0" source = { editable = "." } dependencies = [ + { name = "backoff" }, { name = "httpx" }, + { name = "loguru" }, { name = "pydantic" }, { name = "typing-extensions" }, { name = "websockets" }, @@ -527,10 +550,12 @@ dev = [ [package.metadata] requires-dist = [ + { name = "backoff", specifier = ">=2.2.1" }, { name = "black", marker = "extra == 'dev'", specifier = ">=23.0.0" }, { name = "flake8", marker = "extra == 'dev'", specifier = ">=6.0.0" }, { name = "httpx", specifier = ">=0.24.0" }, { name = "isort", marker = "extra == 'dev'", specifier = ">=5.0.0" }, + { name = "loguru", specifier = ">=0.7.0" }, { name = "mypy", marker = "extra == 'dev'", specifier = ">=1.0.0" }, { name = "pydantic", specifier = ">=2.0.0" }, { name = "pytest", marker = "extra == 'dev'", specifier = ">=7.0.0" }, @@ -684,3 +709,12 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/cb/c3/30e2f9c539b8da8b1d76f64012f3b19253271a63413b2d3adb94b143407f/websockets-15.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:21c1fa28a6a7e3cbdc171c694398b6df4744613ce9b36b1a498e816787e28123", size = 176877, upload-time = "2025-03-05T20:03:37.199Z" }, { url = "https://files.pythonhosted.org/packages/fa/a8/5b41e0da817d64113292ab1f8247140aac61cbf6cfd085d6a0fa77f4984f/websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f", size = 169743, upload-time = "2025-03-05T20:03:39.41Z" }, ] + +[[package]] +name = "win32-setctime" +version = "1.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b3/8f/705086c9d734d3b663af0e9bb3d4de6578d08f46b1b101c2442fd9aecaa2/win32_setctime-1.2.0.tar.gz", hash = "sha256:ae1fdf948f5640aae05c511ade119313fb6a30d7eabe25fef9764dca5873c4c0", size = 4867, upload-time = "2024-12-07T15:28:28.314Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e1/07/c6fe3ad3e685340704d314d765b7912993bcb8dc198f0e7a89382d37974b/win32_setctime-1.2.0-py3-none-any.whl", hash = "sha256:95d644c4e708aba81dc3704a116d8cbc974d70b3bdb8be1d150e36be6e9d1390", size = 4083, upload-time = "2024-12-07T15:28:26.465Z" }, +] diff --git a/uv.lock b/uv.lock index 49f1b9cb..c2e4fbcb 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 2 +revision = 3 requires-python = ">=3.10" resolution-markers = [ "python_full_version >= '3.13'", @@ -3582,7 +3582,7 @@ requires-dist = [ { name = "python-dotenv", specifier = "==1.1.1" }, { name = "requests", specifier = ">=2.32.4" }, { name = "rich", specifier = ">=14.0.0" }, - { name = "rogue-ai-sdk", specifier = ">=0.1.3" }, + { name = "rogue-ai-sdk", editable = "sdks/python" }, { name = "uvicorn", specifier = ">=0.32.0" }, ] @@ -3608,18 +3608,32 @@ examples = [ [[package]] name = "rogue-ai-sdk" -version = "0.1.3" -source = { registry = "https://pypi.org/simple" } +source = { editable = "sdks/python" } dependencies = [ + { name = "backoff" }, { name = "httpx" }, + { name = "loguru" }, { name = "pydantic" }, { name = "typing-extensions" }, { name = "websockets" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/3b/74/793861d6440d73ffcbd9413bc48a06b0d141c1b6a78972fa5cdd20882d4c/rogue_ai_sdk-0.1.3.tar.gz", hash = "sha256:a52f58edd2a611faa1aebede8bd2168d20c6d462b299c570f21ec7c2b251b964", size = 50868, upload-time = "2025-09-22T08:49:11.941Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/39/98/1ad1f5b5bf09e85202a5a70e7c913e35ad1e0ac8212b37f7159260f8b738/rogue_ai_sdk-0.1.3-py3-none-any.whl", hash = "sha256:f71cd934f3818d2c5d69815b38df9504ea9c975427945764293240250fef3399", size = 20383, upload-time = "2025-09-22T08:49:10.722Z" }, -] + +[package.metadata] +requires-dist = [ + { name = "backoff", specifier = ">=2.2.1" }, + { name = "black", marker = "extra == 'dev'", specifier = ">=23.0.0" }, + { name = "flake8", marker = "extra == 'dev'", specifier = ">=6.0.0" }, + { name = "httpx", specifier = ">=0.24.0" }, + { name = "isort", marker = "extra == 'dev'", specifier = ">=5.0.0" }, + { name = "loguru", specifier = ">=0.7.0" }, + { name = "mypy", marker = "extra == 'dev'", specifier = ">=1.0.0" }, + { name = "pydantic", specifier = ">=2.0.0" }, + { name = "pytest", marker = "extra == 'dev'", specifier = ">=7.0.0" }, + { name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=0.21.0" }, + { name = "typing-extensions", specifier = ">=4.0.0" }, + { name = "websockets", specifier = ">=11.0.0" }, +] +provides-extras = ["dev"] [[package]] name = "rpds-py" From 558a8217d42194b16fd1efd6337f01dfa43942c7 Mon Sep 17 00:00:00 2001 From: Pavan More Date: Mon, 20 Oct 2025 07:17:48 +0530 Subject: [PATCH 6/8] chore: fix code formatting to pass codestyle checks --- rogue/common/version.py | 3 ++- sdks/python/rogue_sdk/__init__.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rogue/common/version.py b/rogue/common/version.py index 096625c8..713624b0 100644 --- a/rogue/common/version.py +++ b/rogue/common/version.py @@ -1,6 +1,7 @@ """ Shared version retrieval logic. """ + from pathlib import Path @@ -38,4 +39,4 @@ def get_version(package_name: str) -> str: return version(package_name) except Exception: - return "0.0.0-dev" \ No newline at end of file + return "0.0.0-dev" diff --git a/sdks/python/rogue_sdk/__init__.py b/sdks/python/rogue_sdk/__init__.py index ee695fd2..368c1901 100644 --- a/sdks/python/rogue_sdk/__init__.py +++ b/sdks/python/rogue_sdk/__init__.py @@ -55,6 +55,7 @@ async def main(): # Version try: from importlib.metadata import version + __version__ = version("rogue-ai-sdk") except Exception: # Fallback for development environments where the package isn't installed From e71128ec5e69a494aa16119d26d86ff523ddf36e Mon Sep 17 00:00:00 2001 From: Pavan More Date: Mon, 20 Oct 2025 07:47:29 +0530 Subject: [PATCH 7/8] chore: refine version management in rogue-sdk per coding guidelines --- sdks/python/rogue_sdk/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sdks/python/rogue_sdk/__init__.py b/sdks/python/rogue_sdk/__init__.py index 368c1901..bce24497 100644 --- a/sdks/python/rogue_sdk/__init__.py +++ b/sdks/python/rogue_sdk/__init__.py @@ -51,13 +51,18 @@ async def main(): # All types from .types import * from .websocket import RogueWebSocketClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + pass # Version +__version__: str try: - from importlib.metadata import version + from importlib.metadata import PackageNotFoundError, version __version__ = version("rogue-ai-sdk") -except Exception: +except PackageNotFoundError: # Fallback for development environments where the package isn't installed __version__ = "0.0.0-dev" From 545da85aa8a56fa124b3795bb625ffa75e253a6c Mon Sep 17 00:00:00 2001 From: yuval-qf Date: Mon, 20 Oct 2025 14:25:41 +0300 Subject: [PATCH 8/8] Apply suggestion from @yuval-qf --- sdks/python/rogue_sdk/__init__.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sdks/python/rogue_sdk/__init__.py b/sdks/python/rogue_sdk/__init__.py index bce24497..9308c7f8 100644 --- a/sdks/python/rogue_sdk/__init__.py +++ b/sdks/python/rogue_sdk/__init__.py @@ -51,10 +51,6 @@ async def main(): # All types from .types import * from .websocket import RogueWebSocketClient -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - pass # Version __version__: str