Skip to content

Fix/hybim 807 renaming resource dir path#69

Merged
pradystar merged 2 commits into
mainfrom
fix/HYBIM-807-renaming-resource-dir-path
Jul 8, 2026
Merged

Fix/hybim 807 renaming resource dir path#69
pradystar merged 2 commits into
mainfrom
fix/HYBIM-807-renaming-resource-dir-path

Conversation

@pradystar

Copy link
Copy Markdown
Collaborator

Summary

  • Point autogenerated API client output at src/splunk_ao/resources (was src/galileo/resources) and rewrite the generated galileo.exceptions / galileo.utils.headers_data imports to splunk_ao.*.
  • Fix the codegen seam so regeneration stays correct: codegen_templates/endpoint_module.py.jinja now emits splunk_ao.* imports, and scripts/auto-generate-api-client.sh writes to the new path.
  • Sweep every non-generated caller (src/splunk_ao/, tests/, examples/, README_API_CLIENT.md, @patch(...) targets) from galileo.resources to splunk_ao.resources.
  • Delete the legacy src/galileo/ compatibility shim (__init__.py, exceptions.py, utils/) and the now-obsolete tests/test_namespace_compatibility.py.
  • Remove the dead _splunk_ao_suppress_galileo_deprecation_warning flag from src/splunk_ao/__init__.py (only existed to silence the deleted shim) and drop the galileo.resources. branch in utils/headers_data.py.
  • Update tooling config: pyproject.toml (drop galileo package include, retarget ruff exclude and coverage omit), .pre-commit-config.yaml, and tasks.py mypy exclude.

Notes

  • The generated tree was relocated with git mv + a two-line import rewrite (not a full regen), preserving git rename history and avoiding post-hook formatting churn. The result matches what a regen now produces because the template was fixed.
  • Intentionally left in place: SplunkAOConfig._bridge_env_vars() (bridges SPLUNK_AO_* -> GALILEO_* for the external galileo-core dep), the X-Galileo-SDK header value, and galileo.ai URLs/docstrings sourced from openapi.yaml.

Test plan

  • poetry install --all-extras --no-root
  • poetry run pytest
  • poetry run pre-commit run --all-files (ruff + mypy clean)
  • ./scripts/auto-generate-api-client.sh yields an empty diff (not run created https://splunk.atlassian.net/browse/HYBIM-853)
  • python -c "import splunk_ao; from splunk_ao.resources.api.auth import login_api_key_login_api_key_post" succeeds
  • import galileo fails (namespace fully removed)

pradystar added 2 commits July 7, 2026 15:40
…drop galileo namespace

Relocate the openapi-python-client output from src/galileo/resources to
src/splunk_ao/resources and rewrite all galileo.* imports to splunk_ao.*.
Update the codegen template and generator script so future regenerations
emit the correct namespace. Delete the legacy src/galileo compatibility
shim entirely.

@fercor-cisco fercor-cisco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This review was generated by the Astra agent (claude-opus-4-8). It may contain mistakes.

Verdict: approve — Clean, complete mechanical namespace rename; no broken imports, HYBIM-853 fix preserved, config consistent.

Follow-ups

Suggested follow-up work that could be tracked as Shortcut stories:

  • examples/logging-samples/openai-responses/main.py:15-16: Stale comment says "Because we imported from galileo" but the code imports from splunk_ao import openai. Pre-existing inaccuracy, not part of this PR's rename scope; update for clarity when convenient.

@fercor-cisco

Copy link
Copy Markdown
Collaborator

I'll create a follow-up ticket for the comment on examples/logging-samples/openai-responses/main.py

@pradystar pradystar merged commit 33949d8 into main Jul 8, 2026
13 checks passed
@pradystar pradystar deleted the fix/HYBIM-807-renaming-resource-dir-path branch July 8, 2026 18:33
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants