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

Avoid "hidden state" of objects #14

Open
1 of 3 tasks
wtbarnes opened this issue Feb 14, 2018 · 0 comments
Open
1 of 3 tasks

Avoid "hidden state" of objects #14

wtbarnes opened this issue Feb 14, 2018 · 0 comments

Comments

@wtbarnes
Copy link
Owner

wtbarnes commented Feb 14, 2018

There are several places where methods set attributes or objects or worse, objects set attributes of other objects. This is not good practice and makes workflows confusing. I'll try to keep a list of these cases here and hopefully resolve them one by one.

  • Field.configure_loop_simulations sets the simulation type used to simulate loops.
  • Field.load_loop_simulations sets the parameters_savefile attribute for every loop in Field.loops
  • Observer.build_detector_files sets the observer_coordinate attribute on an instrument if it is None (should change such that when instantiating an instrument, the observer coordinate is required)
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

No branches or pull requests

1 participant