-
Notifications
You must be signed in to change notification settings - Fork 5
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
Major change in behaviour of settings #114
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n-claes
added
legolas-backend
Under-the-hood changes to Legolas
refactor
Refactoring existing code
tests-unit
Modified or new unit tests
tests-regression
Modified or new regression tests
do NOT merge
Don't merge until label is removed
legolas-api
Changes to the Legolas user API
labels
Jan 2, 2023
n-claes
force-pushed
the
refactor/settings
branch
3 times, most recently
from
January 2, 2023 13:48
2ace63f
to
1de3c81
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #114 +/- ##
===========================================
+ Coverage 88.94% 89.39% +0.44%
===========================================
Files 129 143 +14
Lines 7516 8098 +582
===========================================
+ Hits 6685 7239 +554
- Misses 831 859 +28
Flags with carried forward coverage won't be shown. Click here to find out more. |
This was referenced Jan 4, 2023
Merged
n-claes
force-pushed
the
refactor/settings
branch
from
March 2, 2023 09:53
03d273d
to
0977beb
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
legolas-api
Changes to the Legolas user API
legolas-backend
Under-the-hood changes to Legolas
refactor
Refactoring existing code
tests-regression
Modified or new regression tests
tests-unit
Modified or new unit tests
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR description
This is the first pull request in a series of refactoring and behaviour change PR's dedicated to Legolas 2.0.
Here a new settings object (called
settings
) is created to handle the global program settings and state. Most of the global variables have been removed frommod_global_variables
except a few parameters and moved to this new object. Consequently, this also avoids changing global variables during runtime execution as in most routines the settings object is passes withintent(in)
only. Dedicated getters and setters for set-once, use-only parameters further solidify this.Note that this PR breaks the Legolas API in the user submodule. For example, enabling resistivity in the user submodule:
With the new changes, this becomes more logical and user-friendly:
with similar behaviour for other physics. See
settings/mod_settings
for the public API.The datfile remains unchanged and is still backwards compatible. Some deprecated parfile settings have been removed, the docs will be updated accordingly when Legolas 2.0 is ready.
New features
Legolas