etsap-TIMES / xl2times

Open source tool to convert TIMES models specified in Excel
https://xl2times.readthedocs.io/
MIT License
12 stars 7 forks source link

Add logging with loguru #190

Closed SamRWest closed 7 months ago

SamRWest commented 7 months ago

Added logging via loguru - replaced all print("WARNING:... with logger.warning(, print( with logger.info( etc.

Added utils.get_logger() for entrypoints, to hide configuration details (and make it easier to replace with other logging lib later if needed). Defaults to logging to console and a file named with the entrypoint (e.g. run_benchmarks.log or xl2times.log)

Added poethepoet (poe for short) for adding make-like shortcuts into pyproject.toml, e.g. poe benchmark Ireland, poe lint

Antti-L commented 7 months ago

Comment: I see this is again including # drop duplicate Df columns. Is this not deviating from VEDA by dropping duplicate columns even if they may contain the last values to survive according to VEDA?

olejandro commented 7 months ago

@siddharth-krishna what do you think? I am good with the changes, so feel free to merge if you agree.

olejandro commented 7 months ago

Love all the colours! :) Makes it much easier to spot important stuff when looking through the log of the runs. We probably should re-categorise some of the messages in subsequent PRs though.