FormingWorlds / PROTEUS

Coupled atmosphere-interior framework to simulate the temporal evolution of rocky planets.
https://fwl-proteus.readthedocs.io
Apache License 2.0
12 stars 1 forks source link

Display information on module versions, remove PROTEUS.env #246

Closed nichollsh closed 3 weeks ago

nichollsh commented 3 weeks ago

This PR adds functionality to print information about the current module arrangement and corresponding code versions. This goes towards solving the main problem of #240, but we should revisit it further to maybe add a command like proteus update to the CLI.

Also removes PROTEUS.env, which should make the code easier to use for new people. Instead of setting variables in the user's environment, the code locates the appropriate directories when it starts.

Updated documentation. PROTEUS version 24.10.30.

Example of the new information printed to the log:

[ INFO  ] :::::::::::::::::::::::::::::::::::::::::::::::::::::::
[ INFO  ]                    PROTEUS framework                   
[ INFO  ]                    by Forming Worlds                   
[ INFO  ] :::::::::::::::::::::::::::::::::::::::::::::::::::::::
[ INFO  ]  
[ INFO  ] Current time      2024-10-31 11:15:11 
[ INFO  ] Python version    3.13.0
[ INFO  ] System hostname   atmlxint6.atm.ox.ac.uk
[ INFO  ] System username   nichollsh
[ INFO  ] Platform type     Linux
[ INFO  ] FWL data path     /network/group/aopp/planetary/RTP035_NICHOLLS_PROTEUS/fwl_data/
[ INFO  ]  
[ INFO  ] PROTEUS version   24.10.30
[ INFO  ] PROTEUS location  /home/n/nichollsh/PROTEUS/
[ INFO  ] PROTEUS git hash  a1ff01aaf3e796294705663fc8b4e6b6f863bae9
[ INFO  ] Config file       /home/n/nichollsh/PROTEUS/input/hd63433d.toml
[ INFO  ] Output path       /home/n/nichollsh/PROTEUS/output/hd63433d/
[ INFO  ]  
[ INFO  ] Interior module   spider version 0.2.0
[ INFO  ]   - PETSc         version 1.3.19.0
[ INFO  ] Structure module  None
[ INFO  ] Atmos_clim module agni version 0.10.0
[ INFO  ]   - SOCRATES      version 2407.2 at /home/n/nichollsh/SOCRATES/
[ INFO  ]   - Julia         version 1.11.1
[ INFO  ] Outgas module     calliope version 24.09.10
[ INFO  ] Escape module     None
[ INFO  ] Star module       dummy
[ INFO  ] Orbit module      None
[ INFO  ] Delivery module   None
[ INFO  ]  
[ INFO  ] ---------------------------------------------------
[ INFO  ] Total mantle mass = 3.57e+24 kg
[ INFO  ] Initial inventory set by 'elements'
[ INFO  ] Included gases
[ INFO  ]     volatile  H2O      :   0.00 bar
[ INFO  ]     volatile  CO2      :   0.00 bar
[ INFO  ]     volatile  H2       :   0.00 bar
[ INFO  ]     volatile  CH4      :   0.00 bar
[ INFO  ]     volatile  CO       :   0.00 bar
[ INFO  ]     volatile  N2       :   0.00 bar
[ INFO  ]     volatile  S2       :   0.00 bar
[ INFO  ]     volatile  SO2      :   0.00 bar
[ INFO  ]     vapour    SiO      :   0.00 bar
[ INFO  ]     vapour    SiO2     :   0.00 bar
[ INFO  ]     vapour    MgO      :   0.00 bar
[ INFO  ]     vapour    FeO2     :   0.00 bar
[ INFO  ]  
[ INFO  ] Getting physical and reference data
[ INFO  ] Preparing stellar model
[ INFO  ]  
[ INFO  ] ===================================================
nichollsh commented 3 weeks ago

Thanks @timlichtenberg! I am hoping that these kinds of changes will make it easier to involve more people with the code.

I just found another small issue with the config validation that Stef added: it tries to log a warning before the log has been setup, so it doesn't actually warn the user of anything. This is an easy fix, so I'll merge this once the tests pass again.