DeltaRCM / pyDeltaRCM

Delta model with a reduced-complexity approach
https://deltarcm.org/pyDeltaRCM/
MIT License
18 stars 11 forks source link

add some helpful info to the top of the log. #192

Closed amoodie closed 3 years ago

amoodie commented 3 years ago

Add some info to the log file

Here is an example of a new log:

2021-04-19 20:53:50,405 - INFO - Output log file initialized
2021-04-19 20:53:50,405 - INFO - pyDeltaRCM version 1.3.0
2021-04-19 20:53:50,405 - INFO - Python version 3.8.5 (default, Sep  4 2020, 07:30:14) 
[GCC 7.3.0]
2021-04-19 20:53:50,435 - INFO - Platform: Linux-5.8.0-48-generic-x86_64-with-glibc2.10
2021-04-19 20:53:50,435 - INFO - Setting up model configuration
2021-04-19 20:53:50,435 - INFO - Model type is: DeltaModel
2021-04-19 20:53:50,436 - INFO - Configuration variable `out_dir`: deltaRCM_Output
...

closes #189

codecov[bot] commented 3 years ago

Codecov Report

Merging #192 (67f16b9) into develop (20e7a25) will increase coverage by 0.07%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #192      +/-   ##
===========================================
+ Coverage    78.20%   78.28%   +0.07%     
===========================================
  Files           12       12              
  Lines         2473     2482       +9     
===========================================
+ Hits          1934     1943       +9     
  Misses         539      539              
Impacted Files Coverage Δ
pyDeltaRCM/init_tools.py 97.99% <100.00%> (+0.04%) :arrow_up:
pyDeltaRCM/model.py 89.81% <100.00%> (+0.03%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 20e7a25...67f16b9. Read the comment docs.

elbeejay commented 3 years ago

Any way to not need to load platform to get the info? Need to check if available in sys.

I found the following in sys:

>>> sys.platform
    'linux'

>>> sys.version
    '3.8.2 | packaged by conda-forge | (default, Apr 24 2020, 08:20:52) \n[GCC 7.3.0]'

>>> sys.version_info
    sys.version_info(major=3, minor=8, micro=2, releaselevel='final', serial=0)
amoodie commented 3 years ago

Decided to go with the extra import, since platform provides a nice, information-dense string. E.g., Platform: Linux-5.8.0-48-generic-x86_64-with-glibc2.10.