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

Improve case_generation in example code Class to Support Linux Compatibility #27

Open
ombahiwal opened this issue Nov 26, 2024 · 6 comments

Comments

@ombahiwal
Copy link

Improve case_generation Class to Support Linux Compatibility

Description

The case_generation helper class currently type-checks only for .exe files when postprocessing and executing module binaries. This creates compatibility issues on Linux systems, as it assumes the binaries are Windows executables.

This limitation forces Python/Linux users to modify the code to adapt it for their environment. To improve cross-platform compatibility, it would be helpful to revise the implementation to use the Python subprocess library, which can handle executable files in a platform-independent manner.

Proposed Solution

  • Refactor the case_generation class to remove hardcoded type checks for .exe files.
  • Utilize the Python subprocess library to execute binaries, ensuring compatibility across both Windows and Linux platforms.

This update would streamline usage for Linux users and reduce the need for manual code changes.

@andrew-platt
Copy link
Collaborator

Thanks for your suggestion. Is this for python code in the main branch, or in the dev branch?

@ombahiwal
Copy link
Author

ombahiwal commented Nov 27, 2024

thanks for the reply, I pulled the code from main branch, also I meant something in the python openfast_toolbox, example:

FAST_EXE = os.path.join(scriptDir, '../../../data/openfast.exe') # Location of a FAST exe (and dll)

@andrew-platt
Copy link
Collaborator

Thanks for replying. This issue should be posted on the toolbox rather than here.

@andrew-platt andrew-platt transferred this issue from OpenFAST/openfast Nov 27, 2024
@andrew-platt
Copy link
Collaborator

andrew-platt commented Nov 27, 2024

I transferred this issue from OF.

@rthedin
Copy link
Collaborator

rthedin commented Nov 27, 2024

Dear Omkar,
Thanks for posting here. The list of improvements on FAST.Farm (#17) is focused solely on files within the fastfarm directory. I believe your interest is on some items of the issue linked above?

@ombahiwal
Copy link
Author

Hi Mr Thedin,
Yes I am interested in solving some of the items from the issues.

this task for Fast.FARM for CI/CD? Task: “It would be great to make the examples runnable as unit tests. Right now the user needs to wait until the low-res boxes are done before moving forward with the setup (if TurbSim inflow)”
additionally I can do these from The Ongoing list of improvements:
Add a round function to offset parameters, like here and here (links are broken btw)
Give the ability for the user to specify the TurbSim and Mann binaries, in addition to the FAST.Farm one, here.
Pass all the template files in a dictionary instead of all of them individually like here.

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

No branches or pull requests

3 participants