Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 15 commits into from
Oct 31, 2024
Merged

Conversation

nichollsh
Copy link
Contributor

@nichollsh nichollsh commented Oct 31, 2024

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 nichollsh marked this pull request as ready for review October 31, 2024 11:45
Copy link
Collaborator

@timlichtenberg timlichtenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very useful changes! The printout looks very clean and is very informative.

@nichollsh
Copy link
Contributor Author

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.

@nichollsh nichollsh merged commit ebe25df into main Oct 31, 2024
5 checks passed
@nichollsh nichollsh deleted the hn/versions branch October 31, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants