aglinxinyuan commented on code in PR #9419: URL: https://github.com/apache/texera/pull/9419#discussion_r4581397648
########## common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/PythonCodeFragment.scala: ########## @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.texera.amber.operator.visualization + +private[visualization] object PythonCodeFragment { + def render(code: String, indent: Int, keepLine: String => Boolean): String = Review Comment: Agreed — the export now carries the shared body's comments and blank lines, so `keepLine` and the four `runtime` flags are gone, in fb23be38c2. Every runtime script stays byte-identical; only the exported Gauge, Radar and Tree scripts gain those comment and blank lines. ########## common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/StandaloneChartCode.scala: ########## @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.texera.amber.operator.visualization + +import org.apache.texera.amber.pybuilder.PythonTemplateBuilder.pyStringLiteral + +private[visualization] object StandaloneChartCode { + def standaloneError(title: String, plural: Boolean = false, typed: Boolean = false): String = Review Comment: Good catch — WordCloud's not-text page and the Hierarchy and Icicle `render_error` and save blocks now use these helpers, with byte-identical output, in fb23be38c2. VolcanoPlot has the same blocks too, but three open volcano plot PRs edit that file, so it stays as is for now. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
