Conversation
Add method modeler.get_objects_by_name to be consistent with modeler.get_objects_by_material
…_object' into fix/7257_improve_consistency_get_object
Co-authored-by: Maxime Rey <87315832+MaxJPRey@users.noreply.github.com>
Co-authored-by: Maxime Rey <87315832+MaxJPRey@users.noreply.github.com>
SMoraisAnsys
left a comment
There was a problem hiding this comment.
Should we rework the API to work differently ? Like having a single method to do both approaches ? We could allow different kind of matching mechanism, e.g. (exact, contains, start/endswith, regex), whille keeping the pattern argument (meaning varying depending on the matching mechanism) and en/disabling case sensitive.
Open to discussion
A file containing x,y datapoints can be assigned as a table to permeability.
…_object' into fix/7257_improve_consistency_get_object
|
Any thoughts on my comment @Devin-Crawford @Samuelopez-ansys @MaxJPRey (you reviewed, blame yourself for the ping :p) |
| name, xlist, ylist, is_project_dataset=is_project_dataset, x_unit=units[0], y_unit=units[1], sort=sort | ||
| ) | ||
| else: | ||
| self.logger.error("Input file does not exist.") |
There was a problem hiding this comment.
I think it should raise an Exception
There was a problem hiding this comment.
I agree.
| self.logger.error("Input file does not exist.") | |
| error_message = f"Input file '{in_file}' does not exist." | |
| self.logger.error(error_message) | |
| raise FileNotFoundError(error_message) |
What do you mean @SMoraisAnsys ? get_objects_by_name and get_object_from_name? I would keep get_object_from_name which already exist, and I would add a new argument to specify if you want a perfect match (like now) or partial (with Sebastien's ideas). |
Thanks. Co-authored-by: Sébastien Morais <146729917+SMoraisAnsys@users.noreply.github.com>
|
Description
Add method
modeler.get_objects_by_nameto be consistent withmodeler.get_objects_by_materialIssue linked
Close #7257
Checklist