Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #471 +/- ##
=======================================
Coverage 95.10% 95.10%
=======================================
Files 35 35
Lines 4947 4947
Branches 4947 4947
=======================================
Hits 4705 4705
Misses 120 120
Partials 122 122 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
alexdewar
left a comment
There was a problem hiding this comment.
Lots of good cleanups here. There's one thing to do with a macro that I think needs fixing before merging but otherwise all good.
Some things were marked as pub either by mistake or because they originally needed to be pub but then didn't after refactoring. The reason I marked all the submodules of input as pub though was because there's no way to get warnings about missing doc comments in private modules 😞. That said, all those warnings have been fixed now so there's not really any reason to leave them public (I guess we'll just want to be vigilant about documenting at least the important functions etc. for new code), so maybe let's just run with this.
Actually, even the top-level modules could be made private although there are still a couple with missing doc comments that we probably want to fix up first:
❯ git grep -n 'allow(missing_docs)'
src/commodity.rs:1: #![allow(missing_docs)]
src/model.rs:2: #![allow(missing_docs)]
| use crate::log; | ||
| use crate::output::create_output_directory; | ||
| use crate::settings::Settings; | ||
| use crate::{input::load_model, log}; |
There was a problem hiding this comment.
VS Code seems determined to format use statements like this sometimes. No idea why
| macro_rules! define_region_id_getter { | ||
| ($t:ty) => { | ||
| impl crate::input::region::HasRegionID for $t { | ||
| impl super::super::region::HasRegionID for $t { |
There was a problem hiding this comment.
I think this should be left as is, otherwise it'll be looking for the region module relative to wherever the macro is imported rather than this file.
Just a little tidy up of the
inputmodule. Mostly making things private that don't need to be public, and tidying some import statements. Feel free to tell me if any of this is silly