Task Summary
Rename the PythonCodegenBase object (and its file + spec) to HuggingFaceCodegenBase so its scope is clear. Pure internal rename, no behavior change.
Context
PythonCodegenBase reads like a generic, cross-operator base for Python code generation, but it isn't. It lives in common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/huggingFace/codegen/, is referenced only within that package, and "Base" refers to it being the shared base of the Hugging Face per-task codegens, the TaskCodegen implementations (TextGenCodegen, ImageTaskCodegen, AudioTaskCodegen, MediaGenCodegen, QaRankingCodegen).
Renaming to HuggingFaceCodegenBase matches the sibling codegens and HuggingFaceInferenceOpDesc, making the scope obvious at a glance.
This is behavior-neutral: it does not change the generated Python (the emitted class is ProcessTableOperator; the object name never appears in output), serialized workflow JSON, or any public API.
Proposed change
All within the workflow-operator module, huggingFace package:
- Rename
codegen/PythonCodegenBase.scala → codegen/HuggingFaceCodegenBase.scala (object + file).
- Rename
codegen/PythonCodegenBaseSpec.scala → codegen/HuggingFaceCodegenBaseSpec.scala.
- Update references in
HuggingFaceInferenceOpDesc.scala (import, call site, doc comments), ImageTaskCodegen.scala, and TaskCodegen.scala (doc comments).
Required test
No new test needed, this is just a rename. Existing coverage confirms it's behavior-neutral: sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.huggingFace.*" passes, including PythonCodeRawInvalidTextSpec, which py-compiles every operator's generated Python.
Related
Review comment on PR #6972 (where this was flagged as a follow-up).
Task Type
Task Summary
Rename the
PythonCodegenBaseobject (and its file + spec) toHuggingFaceCodegenBaseso its scope is clear. Pure internal rename, no behavior change.Context
PythonCodegenBasereads like a generic, cross-operator base for Python code generation, but it isn't. It lives incommon/workflow-operator/src/main/scala/org/apache/texera/amber/operator/huggingFace/codegen/, is referenced only within that package, and "Base" refers to it being the shared base of the Hugging Face per-task codegens, theTaskCodegenimplementations (TextGenCodegen,ImageTaskCodegen,AudioTaskCodegen,MediaGenCodegen,QaRankingCodegen).Renaming to
HuggingFaceCodegenBasematches the sibling codegens andHuggingFaceInferenceOpDesc, making the scope obvious at a glance.This is behavior-neutral: it does not change the generated Python (the emitted class is
ProcessTableOperator; the object name never appears in output), serialized workflow JSON, or any public API.Proposed change
All within the
workflow-operatormodule,huggingFacepackage:codegen/PythonCodegenBase.scala→codegen/HuggingFaceCodegenBase.scala(object + file).codegen/PythonCodegenBaseSpec.scala→codegen/HuggingFaceCodegenBaseSpec.scala.HuggingFaceInferenceOpDesc.scala(import, call site, doc comments),ImageTaskCodegen.scala, andTaskCodegen.scala(doc comments).Required test
No new test needed, this is just a rename. Existing coverage confirms it's behavior-neutral:
sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.huggingFace.*"passes, includingPythonCodeRawInvalidTextSpec, which py-compiles every operator's generated Python.Related
Review comment on PR #6972 (where this was flagged as a follow-up).
Task Type