Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #381 +/- ##
==========================================
+ Coverage 95.58% 95.60% +0.02%
==========================================
Files 31 31
Lines 4121 4235 +114
Branches 4121 4235 +114
==========================================
+ Hits 3939 4049 +110
- Misses 90 92 +2
- Partials 92 94 +2 ☔ View full report in Codecov by Sentry. |
tsmbland
left a comment
There was a problem hiding this comment.
Looks good, but I'll let @alexdewar give the final go-ahead.
The only comment I have is that the process must also have availability > 0, otherwise even with flow > 0 it cannot produce any output. So really, I think we need to check that there's at least one process with flow * availability > 0 in every timeslice/year/region with demand
src/input/process.rs
Outdated
| .into_iter() | ||
| .collect(); | ||
|
|
||
| let regions: HashMap<Rc<str>, RegionSelection> = vec![ |
There was a problem hiding this comment.
| let regions: HashMap<Rc<str>, RegionSelection> = vec![ | |
| let regions: HashMap<Rc<str>, RegionSelection> = [ |
|
Apologies for taking a while to get back to this. To be honest I don't really understand why process availabilities are ranges, but I have included a check that the range is above zero in any case. I hope that's correct. I had to factor out some of the arguments because Clippy wasn't happy, hence the |
|
@alexdewar Latest commit just includes changes we went through together. |
alexdewar
left a comment
There was a problem hiding this comment.
LGTM! Sorry the last part ended up being a faff....
Description
Adds validation for SVD commodities by checking that for every commodity of "SVD" type, there is at least one process that can produce the commodity. Also extended this to check for every region and year and time slice, where SVD is > 0, that there is a process defined that can meet demand.
Fixes #168
Type of change
Key checklist
$ cargo test$ cargo docFurther checks