climate-resource / CMIP-GHG-Concentration-Generation

Generation of historical concentrations for CMIP (and other) experiments
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Process concs #2

Closed znichollscr closed 11 months ago

znichollscr commented 1 year ago

Add basic processing of concs. This runs from nothing to having data files written in input4MIPs format. The actual written data is more or less just a placeholder, but this helps us check workflows and data formats.

I've moved the question about data retrieval to #3

znichollscr commented 11 months ago

Alrighty @lewisjared and @mikapfl, ready for review. The only essential things are:

If things work, you should be able to do something like tree output-bundles and you'll see a bunch of files have been written in a folder called input4MIPs, those are the input4MIPs format files.

If you want to comment on anything else, you've very welcome, but no hurry at this stage

znichollscr commented 11 months ago

Why strip out all of the 1xx+ notebooks? Were they just placeholders?

Yep they're just unhelpful noise here. They're good for a copier template to demonstrate how things work, but here they just add runtime for zero benefit.

mikapfl commented 11 months ago

Something which the latest ruff complains about and I agree: You are using subprocess.run without the check argument. It is good practice to be explicit about the fact that you either don't care about errors in the called programs (the default) or want to raise Exceptions when things go wrong.

znichollscr commented 11 months ago

Super nice feedback thanks!

I guess it is all non-specific, but maybe not

My hope is that all of pydoit_nb is non-specific, but I guess I will only find out once I actually try and pull it out (a Q1 job as part of this work).

For the README, I think one or two additional sentences about the scope of the project would be great

Nice, will add.

Something which the latest ruff complains about and I agree: You are using subprocess.run without the check argument. It is good practice to be explicit about the fact that you either don't care about errors in the called programs (the default) or want to raise Exceptions when things go wrong.

Nice. I was confused about how to clarify, "just run, stop complaining ruff". Thanks for the pointer (I obviously didn't look very hard as a quick google would have probably shown me the answer, maybe I was googling wrong, I dunno), I will add.

znichollscr commented 11 months ago

All added, thanks again both. I'll merge then keep rolling in the new year.

codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (38160e7) 97.27% compared to head (966fb9d) 97.07%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2 +/- ## ========================================== - Coverage 97.27% 97.07% -0.21% ========================================== Files 27 27 Lines 514 547 +33 ========================================== + Hits 500 531 +31 - Misses 14 16 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.