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: make start_date and end_date applicable to boundaries #612

Merged
merged 1 commit into from
Apr 5, 2022

Conversation

BainanXia
Copy link
Collaborator

Pull Request doc

Purpose

Fix a bug when creating scenarios, start_date and end_date can be set at the boundaries of the time range, i.e. start_date can't be 2016-12-31 23:00:00 and end_date can't be 2016-01-01 00:00:00. This shouldn't be the case given our time range is inclusive, which will prevent users from running 1h scenarios for the first or the last hour of the year.

What the code is doing

A hot fix on the input checks.

Testing

An integration test of running a 1h USA scenario is successfully conducted.

Where to look

powersimdata/scenario/create.py

Usage Example/Visuals

Before it gives value error:
image
Now it runs successfully

Time estimate

2 min

@BainanXia BainanXia added the bug Something isn't working label Apr 5, 2022
@BainanXia BainanXia requested review from danielolsen and rouille April 5, 2022 18:42
@BainanXia BainanXia self-assigned this Apr 5, 2022
Copy link
Collaborator

@rouille rouille left a comment

Choose a reason for hiding this comment

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

good catch

@BainanXia BainanXia merged commit 668fda7 into develop Apr 5, 2022
@BainanXia BainanXia deleted the bainan/fix_end_time_constraint branch April 5, 2022 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants