Skip to content

help(meshing) needs modification after 'switch_to_solver' #3957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
prmukherj opened this issue Apr 25, 2025 · 0 comments · Fixed by #3962
Closed

help(meshing) needs modification after 'switch_to_solver' #3957

prmukherj opened this issue Apr 25, 2025 · 0 comments · Fixed by #3962
Assignees
Labels
documentation Documentation related (improving, adding, etc)

Comments

@prmukherj
Copy link
Collaborator

Description of the modifications

meshing creates an instance of the class Meshing. We need to dynamically update the doc to update the help. In my understanding the doc can be modified but it does not affect the help. Need a proper mechanism to address this.

The things tried till now:

  1. just updating the doc based on condition. -> Meshing.doc updates but not it's instance.
  2. Meta-class approach:

class DynamicDocMeta(type):
def getattribute(cls, name):
if name == 'doc':
return cls._generate_dynamic_doc()
return super().getattribute(name)

class Meshing(PureMeshing, metaclass=DynamicDocMeta):
.............
@classmethod
def _generate_dynamic_doc(self):
if self._fluent_connection == None:
return "Help: Condition........"
else:
return super(Meshing, self).doc

Useful links and references

No response

@prmukherj prmukherj added the documentation Documentation related (improving, adding, etc) label Apr 25, 2025
@mkundu1 mkundu1 linked a pull request Apr 25, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation related (improving, adding, etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants