Skip to content

test: Add test to check PyFluent launched PyConsole by default. #4371

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

prmukherj
Copy link
Collaborator

Add test to check PyFluent launched PyConsole by default.

@prmukherj prmukherj linked an issue Aug 12, 2025 that may be closed by this pull request
@github-actions github-actions bot added the enhancement Improve any current implemented feature label Aug 12, 2025
@hpohekar hpohekar self-requested a review August 12, 2025 04:48
@hpohekar
Copy link
Collaborator

@prmukherj

This is incorrect behaviour. We need to resolve this. The issue description already states that we must add unit test with fix.

We just need to update the following condition and I can confirm that it resolves this issue.

from ansys.fluent.core import config

if (
            (fluent_version and fluent_version >= FluentVersion.v251) or config.fluent_root
            and self.argvals["py"] is None
        ):
            self.argvals["py"] = True

https://github.com/ansys/pyfluent/blob/main/src/ansys/fluent/core/launcher/standalone_launcher.py#L207

cc: @seanpearsonuk @mkundu1

@prmukherj
Copy link
Collaborator Author

@prmukherj

This is incorrect behaviour. We need to resolve this. The issue description already states that we must add unit test with fix.

We just need to update the following condition and I can confirm that it resolves this issue.

from ansys.fluent.core import config

if (
            (fluent_version and fluent_version >= FluentVersion.v251) or config.fluent_root
            and self.argvals["py"] is None
        ):
            self.argvals["py"] = True

https://github.com/ansys/pyfluent/blob/main/src/ansys/fluent/core/launcher/standalone_launcher.py#L207

cc: @seanpearsonuk @mkundu1

I don't think it makes sense. I think the earlier behaviour was more correct. What if user sets fluent_root to 22R2?

@prmukherj
Copy link
Collaborator Author

@prmukherj
This is incorrect behaviour. We need to resolve this. The issue description already states that we must add unit test with fix.
We just need to update the following condition and I can confirm that it resolves this issue.

from ansys.fluent.core import config

if (
            (fluent_version and fluent_version >= FluentVersion.v251) or config.fluent_root
            and self.argvals["py"] is None
        ):
            self.argvals["py"] = True

https://github.com/ansys/pyfluent/blob/main/src/ansys/fluent/core/launcher/standalone_launcher.py#L207
cc: @seanpearsonuk @mkundu1

I don't think it makes sense. I think the earlier behaviour was more correct. What if user sets fluent_root to 22R2?

Moreover, if we want to make this change, '_get_standalone_launch_fluent_version' is the correct place to do so I believe.

@mkundu1
Copy link
Contributor

mkundu1 commented Aug 12, 2025

@prmukherj If we directly use StandaloneLauncher class + dry_run, will we able to run it in github?

@prmukherj
Copy link
Collaborator Author

@prmukherj If we directly use StandaloneLauncher class + dry_run, will we able to run it in github?

yes, should be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve any current implemented feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

launch_fluent starts Scheme console instead of the Python console
5 participants