openfast
openfast copied to clipboard
Add WEIS file readers and writers
Feature
This pull request copies the WEIS readers and writers for OpenFAST into the OpenFAST repo itself and makes them available via an openfast
python package. The idea is for these readers and writers to be updated directly inline with OpenFAST development so they stay up to date and can be found and used by more people more easily.
To avoid any breaking changes, I've copied over the python modules without any refactoring. Although I would have liked to add some unit tests, it's not in the scope of my work currently and I've been assured they work by users of OpenFAST. I've copied over the integration test from WEIS without running it or modifying it (apart from to update the paths to the test files).
Impacted areas of the software
- A new python package
openfast
is added under the top-level directoryopenfast_python
- A
pyproject.toml
is added to the repository root. This can live here or in theopenfast_python
directory. The advantage of having it at the root is you can use it as a metadata file for the whole repository, including having the version number written explicitly (which I think is only available by checking the git tag currently) so e.g. it can be used by automated processes; listing contributors; adding links to documentation etc.
OpenFAST maintainers to-dos
PyPI
- [ ] If one doesn't exist, create an NREL or OpenFAST PyPI account so the
openfast
python package can be installed withpip
- [ ] Set up a trusted publisher to securely upload the python package to PyPI
pyproject.toml
- [ ] Decide if you'd like the
pyproject.toml file
at the repository root or inside theopenfast_python
directory - [ ] Check if the contributors I've added to
pyproject.toml
are correct (I checked the commits for theaeroelasticse
directory in WEIS to get the list I've included, but if you keep it in the repo root, you might want to add some more people) - [ ] Update the version in
pyproject.toml
if this PR is going into a version other than3.5.4
Other
- [ ] Check I've included all the necessary files from the directory in WEIS and nothing that doesn't need to come across
- [ ] Check if you're happy with the README I've added to the python package
- [ ] Do we need to attribute WEIS or the WEIS repository in a formal way or include their license in the python package?
- [ ] There are a few references to WEIS in the following files. I'm not sure whether I should change them or not:
- [ ]
FAST_writer.py
- [ ]
IEC_CoeherentGusts.py
- [ ]
LinearFAST.py
- [ ]
create_output_vars.py
- [ ]
@andrew-platt @mayankchetan @deslaughter it would be really useful for me right now to have the readers/writers available as an openfast
python package - do you have any objections to me making a PyPI project and publishing a beta version of the readers? I'd transfer ownership over to you guys when this is all wrapped up
Thank you for the PR!
I've moved around a few things in the PR here: https://github.com/octue/openfast/pull/4
Major changes:
- Reformatted the library to only include readers and writes to OpenFAST io; deleted all drivers or case-generation related code.
- Removed ROSCO and pCrunch as dependancies
- Removed ‘test-data’ and point back to one of the OpenFAST ‘r-test’.
- Renamed library to openfast-io
Response to @cortadocodes's questions:
-
pyproject.toml
file in the root directory looks good to me. - Current author list looks good to me.
- Changes in https://github.com/octue/openfast/pull/4
- README looks good for now.
- Yes, reaching out to WEIS authors, will update here as soon as I get a response
- We need to add a License, might have to follow OpenFAST's
Apache-2.0 license
. @andrew-platt - No, We'll update WEIS to use the
openfast_io
library at a later time. Hopefully match up for 4.0
@mayankchetan I've done the following:
- Added
rosco
as an optional dependency - Moved
pyproject.toml
into theopenfast_python
directory so the python package installs properly - Updated the readme and added a section to the installation docs
- Temporarily renamed the python package to
octue-openfast
so I can use it in my project until NREL's PyPI package is up and running - Updated the PR description above
Thank you @cortadocodes, look good to me!
@andrew-platt @mayankchetan @deslaughter it would be really useful for me right now to have the readers/writers available as an
openfast
python package - do you have any objections to me making a PyPI project and publishing a beta version of the readers? I'd transfer ownership over to you guys when this is all wrapped up
@cortadocodes, This sounds like a reasonable plan. Thansk!
Since there were lots of files added, then removed in the process of this PR, I suggest we do a squash merge to reduce the total storage required on the OpenFAST repository.
PR to Octue repo: https://github.com/octue/openfast/pull/6
-
WEIS
references in code replaced withOpenFAST_IO
- Apache-2.0 License added
pyproject.toml
Hi guys, do you know when 3.5.4
might be released? I'm about to wrap up the project I'm using the new openfast_io
python package in and it would be great to use the official version!