Fix/hybim 807 renaming resource dir path#69
Open
pradystar wants to merge 2 commits into
Open
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/splunk_ao/resources(wassrc/galileo/resources) and rewrite the generatedgalileo.exceptions/galileo.utils.headers_dataimports tosplunk_ao.*.codegen_templates/endpoint_module.py.jinjanow emitssplunk_ao.*imports, andscripts/auto-generate-api-client.shwrites to the new path.src/splunk_ao/,tests/,examples/,README_API_CLIENT.md,@patch(...)targets) fromgalileo.resourcestosplunk_ao.resources.src/galileo/compatibility shim (__init__.py,exceptions.py,utils/) and the now-obsoletetests/test_namespace_compatibility.py._splunk_ao_suppress_galileo_deprecation_warningflag fromsrc/splunk_ao/__init__.py(only existed to silence the deleted shim) and drop thegalileo.resources.branch inutils/headers_data.py.pyproject.toml(dropgalileopackage include, retarget ruffexcludeand coverageomit),.pre-commit-config.yaml, andtasks.pymypy exclude.Notes
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.SplunkAOConfig._bridge_env_vars()(bridgesSPLUNK_AO_*->GALILEO_*for the externalgalileo-coredep), theX-Galileo-SDKheader value, andgalileo.aiURLs/docstrings sourced fromopenapi.yaml.Test plan
poetry install --all-extras --no-rootpoetry run pytestpoetry run pre-commit run --all-files(ruff + mypy clean)./scripts/auto-generate-api-client.shyields 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"succeedsimport galileofails (namespace fully removed)