Skip to content

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.

@Copilot Copilot AI review requested due to automatic review settings October 8, 2025 17:40
@prmukherj prmukherj requested a review from mayankansys as a code owner October 8, 2025 17:40
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a test case to verify that PyFluent launches with PyConsole enabled by default. The test ensures that the -py flag is included in the fluent launch string when using dry_run mode.

  • Add a new standalone test function to verify default PyConsole behavior
  • Include changelog entry documenting the new test

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/test_launcher.py Adds new test function to verify -py flag is present in default launch string
doc/changelog.d/4371.test.md Documents the addition of the new test case

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Copilot Copilot AI review requested due to automatic review settings October 10, 2025 03:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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