guynir42 / AstroRetriever

A package used for downloading and processing images from various astronomical surveys
Other
4 stars 2 forks source link

Passing kwargs to subclass objects #81

Closed guynir42 closed 1 year ago

guynir42 commented 1 year ago

If subclassing an existing pipeline object, e.g., MyAnalysis inherits from Analysis, the kwargs given to the MyAnalysis object constructor are passed to the superclass where they will cause the Parameters object to initialize, and then they would be passed again to the subclassed Parameters object.

This could cause the object to load twice from file and from kwargs, and could also cause some trouble because of double initialization, because of mutating the kwargs, etc.

We should look and see if there's an elegant way to avoid this, and if not, check that the effects are not causing unwanted behavior.