Skip to content
Merged
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
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[project]
name = "galileo"
version = "2.3.0"
description = "Client library for the Galileo platform."
authors = [{ name = "Galileo Technologies Inc.", email = "team@galileo.ai" }]
name = "splunk-ao"
version = "0.1.0"
description = "Splunk Agent Observability SDK for Python."
authors = [{ name = "Splunk Inc." }]
readme = "README.md"
requires-python = ">=3.10,<3.15"
dynamic = ["dependencies"]
license = "Apache-2.0"

[project.urls]
Repository = "https://github.com/rungalileo/galileo-python"
Repository = "https://github.com/splunk/splunk-ao-python"

[tool.poetry]
packages = [
Expand Down
2 changes: 1 addition & 1 deletion src/splunk_ao/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

vars(sys)["_splunk_ao_suppress_galileo_deprecation_warning"] = False

__version__ = "2.3.0"
__version__ = "0.1.0"

__all__ = [
"APIError",
Expand Down
2 changes: 1 addition & 1 deletion src/splunk_ao/utils/headers_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
def get_package_version() -> str:
"""Get the installed SDK distribution version."""
try:
return version("galileo")
return version("splunk-ao")
except PackageNotFoundError:
return "0.0.0" # Unknown version

Expand Down
17 changes: 17 additions & 0 deletions tests/test_api_headers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Tests for X-Galileo-SDK header in API calls."""

from importlib.metadata import PackageNotFoundError
from unittest.mock import patch

from galileo.resources.api.datasets.get_dataset_datasets_dataset_id_get import _get_kwargs as dataset_get_kwargs
Expand All @@ -13,6 +14,22 @@
class TestApiHeaders:
"""Test that X-Galileo-SDK headers are properly included in API calls."""

@patch("splunk_ao.utils.headers_data.version")
def test_get_package_version_uses_splunk_ao_distribution(self, mock_version) -> None:
"""Test package version lookup uses the rebranded distribution name."""
mock_version.return_value = "0.1.0"

assert get_package_version() == "0.1.0"
mock_version.assert_called_once_with("splunk-ao")

@patch("splunk_ao.utils.headers_data.version")
def test_get_package_version_preserves_missing_package_fallback(self, mock_version) -> None:
"""Test missing package metadata still returns the fallback version."""
mock_version.side_effect = PackageNotFoundError

assert get_package_version() == "0.0.0"
mock_version.assert_called_once_with("splunk-ao")

def test_generated_api_method_includes_sdk_header(self) -> None:
"""Test that generated API methods include the X-Galileo-SDK header with method name."""
# Test the _get_kwargs function which is responsible for setting headers
Expand Down
Loading