Jammy2211 / PyAutoGalaxy

PyAutoGalaxy: Open-Source Multiwavelength Galaxy Structure & Morphology
https://pyautogalaxy.readthedocs.io/
MIT License
28 stars 14 forks source link

Astropy Integration: Configuration system #69

Closed pllim closed 2 years ago

pllim commented 2 years ago

Looking at https://pyautogalaxy.readthedocs.io/en/latest/general/configs.html , looks like you utilize autoconf. Is there a reason why you opted not to use astropy.config?

https://github.com/astropy/astropy.github.com/pull/491#issuecomment-1215349065

Jammy2211 commented 2 years ago

Many config files have complex structures which are not supports in astropy.config, for example the .json config files for priors on model components:

image

pllim commented 2 years ago

But what about the .ini ones?

Jammy2211 commented 2 years ago

My concern would be this would then mean we are split using two separate config packages to manage config, which is a burden on development and creates two separate API's for the user.

Also, unless I'm missing something, astropy.config seems to only support one config file at a time (which is the main astropy configuration file of the project in general?).

pllim commented 2 years ago

Yes, I guess it is more maintenance burden to keep two different config systems. Thanks for the clarification!

only support one config file at a time

No, every package gets its own config file. However, for each package, only one config file will be active (though you can overwrite anything you want at run time but it won't "stick" unless you write it back out).