Repository navigation
Cut every response to a closed request period - #42
Merged
Merged
Conversation
An occupancy-only request returned the whole weather year whatever properties.start_time and end_time said; the dates only reached the response metadata. The series are now cut to that period, start inclusive and end exclusive, so a period of (end - start) / resolution steps returns exactly that many values, and a period outside the simulated year is rejected. A thermal run still returns the whole year.
start_time and end_time are both inclusive, so a full year is 1 January 00:00 to 31 December 23:00 and a season or a week returns exactly its hours. The cut now applies to thermal runs as well: the model still solves the whole year, and the series and summary report only the requested period. Each stamp counts as the hour it starts in, so an hh:30 weather index keeps all hours. The dummy fixtures and docs move to the closed full year; tests whose inline weather covers a few hours request those hours.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every
/api/processresponse now covers the periodproperties.start_timetoproperties.end_timeinstead of the whole weather year.Behaviour
start_timeandend_timeare both inclusive. A full year is 1 January 00:00 to 31 December 23:00; 2018-01-01T00:00:00Z to 2018-01-07T23:00:00Z returns 168 hourly values.start_timeandend_timeare the first and last returned stamps.start_time, so a season's heating equals those hours of an annual run.Changes
geojson_processor.py:GeoJsonProcessor._windowcuts the series on both the thermal and the occupancy-only path before the profile and summary are built.request_format.rstand the CHANGELOG move to the closed full year.tests/test_period_window.pycovers a one-week occupancy-only run, a one-week thermal run (series, total and peak), rejection outside the year, an hh:30 index over a full year, and zoneless stamps. Tests whose inline weather covers only a few hours now request those hours.Testing
pytest -q -m "not slow": 351 passed, 29 skipped.