Skip to content

Conversation

@felicio93
Copy link
Collaborator

Added warnings.

@SorooshMani-NOAA, for simplicity I think we should focus on the init warning.
Adding warnings on each function will be too time consuming (although I did for the utils and driver).


warnings.warn(
"shape_to_msh_t is deprecated and will be removed. "
"Consider using 'utils.get_mesh_polygons' or 'MeshData' from geometry.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what you mean to say by "MeshData" from geometry. We now have .geoseries() for geometry, we don't have meshdata. Also one additional not is that we will still have shape_to_msh_t in v2.0, but it's now in the jigsaw engine module.

" You must install them manually if needed.\n"
"2. A new default mesh engine will be adopted to replace Jigsaw.\n"
"3. 'jigsaw_msh_t' has been replaced by 'ocsmesh.internal.MeshData'.\n"
"4. Functions operating on msh_t objects are deprecated and will be updated to support meshdata.\n"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To support MeshData (camel case)

"2. A new default mesh engine will be adopted to replace Jigsaw.\n"
"3. 'jigsaw_msh_t' has been replaced by 'ocsmesh.internal.MeshData'.\n"
"4. Functions operating on msh_t objects are deprecated and will be updated to support meshdata.\n"
"Please check the release notes and update your workflows accordingly.\n"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you going to add more details about upcoming v2 in release notes? Or are you referring to v2 release notes when it's released?

"""
warnings.warn(
"JigsawDriver is deprecated and will be removed in a future release. "
"Please use 'ocsmesh.driver.MeshDriver' with engine_name='jigsaw'."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should change the wording a little bit since this version doesn't have MeshDriver yet

warnings.warn(
"JigsawDriver is deprecated and will be removed in a future release. "
"Please use 'ocsmesh.driver.MeshDriver' with engine_name='jigsaw'."
"We strongly suggest the adoption of gmsh and the driver engine",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rephrase to "we suggest considering Gmsh for your workflow as the that's going to be the default for OCSMesh in the upcoming versions." or something like that


warnings.warn(
"JigsawDriver.run() is deprecated. "
"Use MeshDriver.run() instead.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again I'm not sure if having a reference to something that will be added later is going to be helpful or not

@SorooshMani-NOAA
Copy link
Collaborator

I think we should add warnings to Geom and Hfun msh_t methods and properties as well

@SorooshMani-NOAA
Copy link
Collaborator

All utils functions (more or less) use msh_t, whether we call it mesh or msh_t or msh. Maybe we should put a blanket decorator above all functions that have either input or output msh_t to warn the users of the potential need to change workflow. Let's talk about it before changing it all over the place

@felicio93 felicio93 merged commit a9e2fa7 into main Dec 23, 2025
14 checks passed
@felicio93 felicio93 deleted the feature/deprecation-updates branch December 23, 2025 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants