Skip to content

Fix/hybim 807 renaming resource dir path#69

Open
pradystar wants to merge 2 commits into
mainfrom
fix/HYBIM-807-renaming-resource-dir-path
Open

Fix/hybim 807 renaming resource dir path#69
pradystar wants to merge 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant