Skip to content

Commit d2e4ddd

Browse files
committed
Add an exception list for some hidden operators to still expose until deprecation
Signed-off-by: paul.profizi <[email protected]>
1 parent 7fba1a5 commit d2e4ddd

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/ansys/dpf/core/operators/build.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,24 @@ def build_operators():
183183
succeeded = 0
184184
done = 0
185185
hidden = 0
186+
# List of hidden operators to still expose for retro-compatibility
187+
# until they are fully deprecated
188+
hidden_to_expose = [ # Use internal names
189+
"rescope_fc", # Switch to "change_fc" once server is updated
190+
"dot", "dot_tensor",
191+
"scale_by_field", "scale_by_field_fc",
192+
"invert", "invert_fc",
193+
]
186194
categories = set()
187195
for operator_name in available_operators:
188196
if succeeded == done + 100:
189197
done += 100
190198
print(f"{done} operators done...")
191199
specification = dpf.Operator.operator_specification(operator_name)
192200

193-
if specification.properties["exposure"] in ["hidden", "private"]:
201+
if (specification.properties["exposure"] in ["hidden", "private"]
202+
and
203+
operator_name not in hidden_to_expose):
194204
hidden += 1
195205
continue
196206

0 commit comments

Comments
 (0)