OpenFAST / openfast_toolbox

Miscellaneous Python tools for OpenFAST
20 stars 19 forks source link

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

Open ombahiwal opened 5 days ago

ombahiwal commented 5 days ago

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

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

andrew-platt commented 5 days ago

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

ombahiwal commented 4 days ago

thanks for the reply, I pulled the code from main branch, also I meant something in the python openfast_toolbox, example: https://github.com/OpenFAST/openfast_toolbox/blob/ed7d9dd713a9ab33eb1f42227e66396514ff4a64/openfast_toolbox/case_generation/examples/Example_ExcelFile.py#L19

andrew-platt commented 4 days ago

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

andrew-platt commented 4 days ago

I transferred this issue from OF.

rthedin commented 4 days ago

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

ombahiwal commented 3 days ago

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.