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

Add method to world class to allow for more elegant config changes #20

Open
jrenaud90 opened this issue Jul 19, 2019 · 0 comments
Open
Labels
Beginner Issue is good for newcomers to TidalPy Cosmetic / QOL Features that make the code easier to use but do not change performance or functionality
Milestone

Comments

@jrenaud90
Copy link
Owner

Currently, to change a configuration on a planet you need to A). know a potentially complex series of configuration keys and B). make a separate call to the planet's reinit(). For example to change the rheology of the earth's lower mantle:
earth.config['layers']['Lower_Mantle']['rheology']['compliance_model'] = 'Andrade'
earth.reinit()

All of those keys are case sensitive and any mistake will cause a crash due to KeyError. This can be confusing for someone new to TidalPy.

It would be nice to have a method that:

  • Reduces the number of keys needed (by making some assumptions/guess about what the user really wants to change.
  • Cleans up the remaining keys so that if the user did/didn't capitalize something it doesn't cause a crash.
  • Allows the user to change multiple configs with one method call.
  • Automatically calls reinit once all the configs have been changed (user togglable).
@jrenaud90 jrenaud90 added Beginner Issue is good for newcomers to TidalPy Cosmetic / QOL Features that make the code easier to use but do not change performance or functionality labels Jul 19, 2019
@jrenaud90 jrenaud90 added this to the Version 1.0.0 milestone Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Beginner Issue is good for newcomers to TidalPy Cosmetic / QOL Features that make the code easier to use but do not change performance or functionality
Projects
None yet
Development

No branches or pull requests

1 participant