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

Add unittests for input validations #88

Merged
merged 2 commits into from
Aug 15, 2019

Conversation

gerritdm
Copy link
Contributor

@gerritdm gerritdm commented Aug 6, 2019

Adds unittests to all current input validations. This required quite a bit of refactoring but the validations itself haven't changed.

Closes #86

@gerritdm gerritdm added the WIP label Aug 6, 2019
@gerritdm gerritdm requested a review from anamileva August 6, 2019 03:27
@anamileva
Copy link
Member

Looks great.

@gerritdm gerritdm force-pushed the 20190805_23_input_validation_unittests_gdm branch from b1b6585 to 22db762 Compare August 14, 2019 01:35
 - fuels
 - auxiliary
 - operations/init
 - project/init
 - must_run
 - dispatchable_no_commit
 - always_on (uses validations from auxiliary)
 - dispatchable_capacity_commit (uses validations from auxiliary)
@gerritdm gerritdm force-pushed the 20190805_23_input_validation_unittests_gdm branch from 1a3468d to cf1c98a Compare August 14, 2019 04:57
@gerritdm
Copy link
Contributor Author

Added the unittests to all validations. This required quite a bit of refactoring.
Should be ready for merging after review.

@gerritdm gerritdm added type: enhancement improvements to existing functionality and removed WIP labels Aug 14, 2019
Copy link
Member

@anamileva anamileva left a comment

Choose a reason for hiding this comment

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

This looks good. The operations/test_init.py test throws this warning: gridpath/project/operations/__init__.py:585: RuntimeWarning: divide by zero encountered in true_divide slopes = incr_fuel_burn / incr_loads. Could you look into fixing that and then we can merge?

@gerritdm
Copy link
Contributor Author

Fixed the error. Unittests are running OK for me now.

@gerritdm gerritdm merged commit 3276cfa into master Aug 15, 2019
@gerritdm gerritdm deleted the 20190805_23_input_validation_unittests_gdm branch August 15, 2019 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement improvements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create unittests for input validation
2 participants