Skip to content

Conversation

mkundu1
Copy link
Contributor

@mkundu1 mkundu1 commented Apr 8, 2022

In vscode:

2022-04-09 00_35_24-● mixing_elbow_tui_api py - pyfluent - Visual Studio Code  Administrator
2022-04-09 00_36_26-● mixing_elbow_tui_api py - pyfluent - Visual Studio Code  Administrator

Similar auto-completion list also appears in spyder. But it is very slow, I was not able to capture a screenshot.

@mkundu1 mkundu1 linked an issue Apr 8, 2022 that may be closed by this pull request
@mkundu1 mkundu1 force-pushed the feat/tuigen branch 2 times, most recently from a404ad9 to fa2b8fd Compare April 8, 2022 20:03
tui.views
tui.parametric_study
tui.turbo_workflow
tui.main_menu.adjoint
Copy link
Collaborator

@dnwillia-work dnwillia-work Apr 8, 2022

Choose a reason for hiding this comment

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

I'm a little bit confused as to why you would call them main_menu when the user documentation is referring to them as commands:

https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v221/en/flu_tcl/flu_tcl.html

Would commands be better then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm following the terminology in scheme source code. The helpstrings within the source code are also calling file, define etc. as menus. These source code helpstrings are exposed in PyFluent. The documentation helpstrings are generated outside of Fluent source.

Copy link
Collaborator

@dnwillia-work dnwillia-work Apr 10, 2022

Choose a reason for hiding this comment

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

OK, I see. My concern then would be that this is not the customer visible terminology. If I click on the link you provided it's an internal Ansys link but the link I shared is the user documentation that all customers can see. I don't mind which direction this goes but both need to be consistent I think.

I understand the help strings come from Fluent currently, I'll pass you the content that Stephen provided. We should look at a way to get this published here as well.

Copy link
Contributor Author

@mkundu1 mkundu1 Apr 11, 2022

Choose a reason for hiding this comment

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

Thanks, will accommodate the user doc help-content in the current PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added the helpstrings from the XML file.

@mkundu1
Copy link
Contributor Author

mkundu1 commented Apr 11, 2022

The doc build is currently failing with the following error message:

make: *** [Makefile:19: html] Error 1
make: Leaving directory '/home/runner/work/pyfluent/pyfluent/doc'
Error: Process completed with exit code 2.

@smf2001 @dnwillia-work Any idea whether the doc side changes are incompatible with the current python code changes? The tui.py files now contain a top-level class main_menu (which would be renamed) holding the global functions (like print_license_usage, switch_to_meshing_mode) and the top-level menu classes (like file, define, solve).

TUIGenerator(meshing=True).generate()
TUIGenerator(meshing=False).generate()
LOG.warning(
"XML help is available but not picked for the following %i paths:",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most of the missing menus here are dynamically generated menus which cannot be captured in static queries during codegen (relevant bug #90).

k = node.find("h3").text
k = k.strip().strip("/")
path = k.split("/")
path = [c.rstrip("?").replace("-", "_") for c in path]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Due to item 1 of #38, original Fluent TUI paths aren't available across the API. The Fluent strings are converted before sending through the API. The above code will do similar conversion for the XML strings (which are exact Fluent strings), but few cases are missed (e.g. Fluent string 1D_coupling is converted to one_D_coupling during the API call, which is not converted in the above code). In a separate PR, I'll enhance the above code to match with the Fluent side conversion logic (we need to bring that logic in client side to fix #38).

@mkundu1 mkundu1 merged commit 2cc3902 into main Apr 14, 2022
@mkundu1 mkundu1 deleted the feat/tuigen branch April 14, 2022 06:00
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.

intellisense incomplete for Spyder

4 participants