Add region_id to process_parameters table#498
Conversation
region_id to process_parameters table
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #498 +/- ##
===========================================
- Coverage 94.32% 82.85% -11.48%
===========================================
Files 36 36
Lines 4673 4689 +16
Branches 4673 4689 +16
===========================================
- Hits 4408 3885 -523
- Misses 133 706 +573
+ Partials 132 98 -34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This will have to change now that |
|
Ok ready now! |
alexdewar
left a comment
There was a problem hiding this comment.
Two small suggestions, but otherwise all good!
| // Check parameters cover all years and regions of the process | ||
| for (id, parameters) in map.iter() { | ||
| let process = processes.get(id).unwrap(); | ||
| let year_range = process.years.clone(); |
There was a problem hiding this comment.
| let year_range = process.years.clone(); | |
| let year_range = &process.years; |
There was a problem hiding this comment.
How are so good at spotting these sorts of things?! And why isn't this picked up by clippy?
| if !parameters.contains_key(&(region.clone(), *year)) { | ||
| missing_keys.push((region, *year)); | ||
| } |
There was a problem hiding this comment.
I think this should work:
| if !parameters.contains_key(&(region.clone(), *year)) { | |
| missing_keys.push((region, *year)); | |
| } | |
| let key = (region, *year); | |
| if !parameters.contains_key(&key) { | |
| missing_keys.push(key); | |
| } |
Description
Continues on from #475, adding a region dimension
Fixes #493
Type of change
Key checklist
$ cargo test$ cargo docFurther checks