calliope-project / calliope

A multi-scale energy systems modelling framework
https://www.callio.pe
Apache License 2.0
276 stars 89 forks source link

Attach model_creation and solve_complete timestamps to model data attrs #586

Closed sjpfenninger closed 2 months ago

sjpfenninger commented 2 months ago

Fixes #583

Summary of changes in this pull request:

Reviewer checklist:

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 95.92%. Comparing base (872978d) to head (ebbfa66). Report is 8 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #586 +/- ## ========================================== + Coverage 95.85% 95.92% +0.06% ========================================== Files 24 24 Lines 3619 3628 +9 Branches 788 723 -65 ========================================== + Hits 3469 3480 +11 + Misses 86 84 -2 Partials 64 64 ``` | [Files](https://app.codecov.io/gh/calliope-project/calliope/pull/586?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project) | Coverage Δ | | |---|---|---| | [src/calliope/model.py](https://app.codecov.io/gh/calliope-project/calliope/pull/586?src=pr&el=tree&filepath=src%2Fcalliope%2Fmodel.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL21vZGVsLnB5) | `93.72% <100.00%> (+0.07%)` | :arrow_up: | | [src/calliope/postprocess/postprocess.py](https://app.codecov.io/gh/calliope-project/calliope/pull/586?src=pr&el=tree&filepath=src%2Fcalliope%2Fpostprocess%2Fpostprocess.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL3Bvc3Rwcm9jZXNzL3Bvc3Rwcm9jZXNzLnB5) | `98.24% <100.00%> (+4.69%)` | :arrow_up: | | [src/calliope/util/logging.py](https://app.codecov.io/gh/calliope-project/calliope/pull/586?src=pr&el=tree&filepath=src%2Fcalliope%2Futil%2Flogging.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL3V0aWwvbG9nZ2luZy5weQ==) | `94.44% <100.00%> (+0.56%)` | :arrow_up: |
sjpfenninger commented 2 months ago

Since run is deprecated, we probably don't want to start logging it? Maybe we add the following timestamps to the results?

brynpickering commented 2 months ago

Sorry, yeah, mistype on my part. Those logging timestamps sound good.

sjpfenninger commented 2 months ago

Now have five timestamps (in order of occurrence):