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

Fix turbine #92

Merged
merged 3 commits into from
Jan 21, 2020
Merged

Fix turbine #92

merged 3 commits into from
Jan 21, 2020

Conversation

vezeli
Copy link
Contributor

@vezeli vezeli commented Dec 17, 2019

Fixes #89 .

@uvchik uvchik requested review from birgits and a team December 19, 2019 11:43
@uvchik uvchik added this to the v0.2.1 milestone Dec 19, 2019
Copy link
Member

@uvchik uvchik left a comment

Choose a reason for hiding this comment

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

I think it is a good idea to filter wrong parameter combinations. Thank you.

Just two small comments.

if self.rotor_diameter:
if self.hub_height <= 0.5*self.rotor_diameter:
msg = "1/2*rotor_diameter cannot be higher than hub_height"
raise ValueError(msg)
Copy link
Member

@uvchik uvchik Jan 7, 2020

Choose a reason for hiding this comment

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

I am not a native speaker but as I know it in a mathematical sense one value is GREATER than another not HIGHER.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

'path': self.source
}
with pytest.raises(ValueError):
WindTurbine(**char)
Copy link
Member

Choose a reason for hiding this comment

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

I would use the match attribute to make sure the right ValueError is raised.

 with pytest.raises(ValueError, match=regex)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Implemented. However, I had a problem with match when there was an asterisk symbol in the string so I modified the error message slightly.

Copy link
Member

@uvchik uvchik left a comment

Choose a reason for hiding this comment

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

I think that can be merged. If there are no objections I will merge tomorrow.

@uvchik uvchik requested review from a team and removed request for birgits January 16, 2020 12:01
@uvchik uvchik merged commit e90ab16 into wind-python:dev Jan 21, 2020
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.

Creating unphysical instances of WindTurbine class
2 participants