Skip to content
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

refactor: Remove 'show_gui' from launch_fluent arguments. #2796

Merged
merged 14 commits into from
May 9, 2024

Conversation

prmukherj
Copy link
Collaborator

@prmukherj prmukherj commented May 9, 2024

Remove the ''show_gui'' argument and put a mechanism for migrating older scripts.

prmukherj and others added 2 commits May 9, 2024 20:12
Co-authored-by: Sean Pearson <93727996+seanpearsonuk@users.noreply.github.com>
Co-authored-by: Sean Pearson <93727996+seanpearsonuk@users.noreply.github.com>
src/ansys/fluent/core/utils/deprecate_args.py Outdated Show resolved Hide resolved
src/ansys/fluent/core/utils/deprecate_args.py Outdated Show resolved Hide resolved
src/ansys/fluent/core/utils/deprecate_args.py Outdated Show resolved Hide resolved
src/ansys/fluent/core/utils/deprecate_args.py Outdated Show resolved Hide resolved
@prmukherj prmukherj requested a review from PipKat May 9, 2024 14:48
prmukherj and others added 5 commits May 9, 2024 21:30
Co-authored-by: Raphael Luciano <raphael.luciano@ansys.com>
Co-authored-by: Raphael Luciano <raphael.luciano@ansys.com>
Co-authored-by: Raphael Luciano <raphael.luciano@ansys.com>
@prmukherj prmukherj merged commit cbab7df into main May 9, 2024
26 checks passed
@prmukherj prmukherj deleted the maint/remove_show_gui_from_launch_fluent branch May 9, 2024 18:11
argument."""
if old_arg in kwargs:
warnings.warn(
f"'{old_arg}' is deprecated. Use '{new_arg}' instead.",
Copy link
Member

Choose a reason for hiding this comment

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

At this point we will be automatically replacing the deprecated argument with the new one, right? So I think a more appropriate wording would be:

Suggested change
f"'{old_arg}' is deprecated. Use '{new_arg}' instead.",
f"'{old_arg}' is deprecated. Using '{new_arg}' instead.",

And can we move val definition before this warning, so that we can show it in the warning as well to better inform the user?

For example, putting these two suggestions together:

Suggested change
f"'{old_arg}' is deprecated. Use '{new_arg}' instead.",
f"'{old_arg}' is deprecated. Using '{new_arg} = {val}' instead.",

src/ansys/fluent/core/utils/deprecate_args.py Show resolved Hide resolved
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.

Deprecate show_gui argument of launch_fluent
5 participants