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

Refactor openfast/openfast_python/openfast_io/turbsim_file.py #2577

Merged
merged 4 commits into from
Dec 23, 2024

Conversation

Gjacquenot
Copy link
Contributor

Feature or improvement description

Refactor openfast/openfast_python/openfast_io/turbsim_file.py:

  • add an entrypoint to the script
  • simplify condition

Related issue, if one exists

None

Impacted areas of the software

None

Additional supporting information

None

Test results, if applicable

Tested manually on a bts file found in the submodule

@andrew-platt andrew-platt changed the base branch from main to dev December 21, 2024 17:23
@andrew-platt andrew-platt added this to the v4.0.0 milestone Dec 21, 2024
@mayankchetan
Copy link
Contributor

Thank you for the PR @Gjacquenot, Could you share your specific use case for passing the turbsim BTS file as an argument to the routine?

Typically, users would want to load in the TurbSimFile class so that all the content of the BTS file can be read in; and then the content either visualized or modified.

@Gjacquenot
Copy link
Contributor Author

I have tested it with the wind bts file from r-test repository

Then the command is the following, it sums up the content of the two Python pandas dictionaries

cd openfast_python 
python3 -m openfast_io.turbsim_file wind.bts         

@andrew-platt
Copy link
Collaborator

@Gjacquenot, thanks for your reply. I think we are missing some context here. Could you explain why you want to do this as opposed to loading the TurbSimFile class and exploring the metadata that way?

@Gjacquenot
Copy link
Contributor Author

Gjacquenot commented Dec 22, 2024 via email

Copy link
Contributor

@mayankchetan mayankchetan left a comment

Choose a reason for hiding this comment

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

Looks good for now. Will update the summary in main() to use __repr__ in #2361

@andrew-platt andrew-platt merged commit 766ab4b into OpenFAST:dev Dec 23, 2024
41 checks passed
@andrew-platt andrew-platt mentioned this pull request Dec 24, 2024
38 tasks
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.

3 participants