Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #995 +/- ##
==========================================
+ Coverage 83.94% 84.02% +0.07%
==========================================
Files 52 52
Lines 5794 5814 +20
Branches 5794 5814 +20
==========================================
+ Hits 4864 4885 +21
+ Misses 695 694 -1
Partials 235 235 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tsmbland
left a comment
There was a problem hiding this comment.
I don't think this is quite right. We don't necessarily need flows for all milestone years, just the milestone years that the process could be commissioned in according to its start_year and end_year. E.g. if the process has an end year of 2030, we don't need flows for 2040 even if 2040 is a milestone year
Got it! So, the check needs to be done for all milestone years within the process start/end years window, right? |
|
Sorted! And added a couple of tests. |
|
@tsmbland , thinking on #930 and the example described there, I'm not entirely sure that the last modification I made, based on your comment, is correct. A process might be running in years where it cannot be commissioned, meaning that flows should have a value in those years (in the milestone ones). So, if I understand this right, the last year for which a flow must be provided is In summary, flows must exist for all milestone years between Am I missing something here? |
No that's not right. Flows correspond to the year that an asset was commissioned, i.e. if an asset is commissioned in 2030 it will use the process flows from 2030 all through its lifetime. If the end year for the process is 2030, then we don't need to provide flow data beyond then, even though assets may remain active until later. What you've done here looks good so I'm going to approve it! |
|
OK, thanks for approving. Merging, now. But in this case, I do not understand the issue #930 . Will continue the conversation there. |
Description
Removes the need to including flows for every year, modifying the validation checks to ensure they are defined in the milestone years, at least. They might be available in other years should an asset require it, but in milestone years it is a must.
I've checked @alexdewar 's modified example described in the issue, and it passes as planned. Equally, if there's an asset commissioned in a non-milestone year, there is a complain, flagging that.
I still need to add some tests proving this functionality, but first I wanted to check if things were going in the right direction.
Fixes #934
Type of change
Key checklist
$ cargo test$ cargo docFurther checks