refactor(extract): move extract_terraform to extractors/terraform.py (verbatim)#1721
Open
Cekaru wants to merge 1 commit into
Open
refactor(extract): move extract_terraform to extractors/terraform.py (verbatim)#1721Cekaru wants to merge 1 commit into
Cekaru wants to merge 1 commit into
Conversation
…(verbatim) Ports the Terraform/HCL extractor out of the 17k-line extract.py into its own per-language module, continuing the split tracked in Graphify-Labs#1212. - extract_terraform and its private _TF_META_HEADS constant moved verbatim (git diff --color-moved confirms byte-identity; the existing test_terraform.py suite passing is the behavior-preservation proof). - extract.py keeps the facade re-export so all existing importers are unchanged. - Registered in extractors/__init__.LANGUAGE_EXTRACTORS (alphabetical). - Added tests/test_extractors_registry.py with module/facade/registry identity checks; MIGRATION.md status table updated.
e897e91 to
404b222
Compare
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.
Part of the
extract.pysplit tracked in #1212. Ports the Terraform/HCL extractor into its own per-language module.What changed
extract_terraformand its private_TF_META_HEADSconstant verbatim intographify/extractors/terraform.py.extract.pykeeps the facade re-export (from graphify.extractors.terraform import extract_terraform # noqa: F401), so every existing importer (__main__.py,watch.py, tests, etc.) is unchanged.extractors/__init__.LANGUAGE_EXTRACTORS(alphabetical).tests/test_extractors_registry.pywith module-import / facade-identity / registry-identity checks.extractors/MIGRATION.mdstatus table.Behavior preservation
git diff --color-movedconfirms the function + constant are byte-identical (verified locally withdiff).extract.py: -178 lines, +1 import line — a pure move._TF_META_HEADShad 0 remaining uses after the move → private → moved with the function (per MIGRATION.md).Tests
test_terraform.py(8) +test_extractors_registry.py(1) pass.test_extract.py(114) pass.