SNEWS2 / snewpy

A Python package for working with supernova neutrinos

Home Page:https://snewpy.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow more levels in the ModelRegistry YAML configuration tree

Sheshuk opened this issue · comments

What we have now

All models are listed in models section of the model_files.yml:

models:
Bollig_2016:
repository: *snewpy
Fornax_2019:
repository: *snewpy

That's ok for the ccsn case, but for adding the preSN models I would like to have them in a separate list.

What I suggest

Make a tree like

models: 
    ccsn:  
        Bollig_2016: 
            repository: *snewpy 
        Fornax_2019:  
            repository: *snewpy 
    presn:
        ...

and make the _model_downloader search not only by the model name, but also its module (ccsn or presn).

This will keep more order than just having all the models in one list.

This sounds fine if we feel it's useful to track the different emission models.

If we're going this route, would it be useful to rename the new repository snewpy-models-ccsn to snewpy-models and create ccsn and presn top-level folders in that repo?

Note that we already have a (currently private) repo called snewpy-models-presn. I have no strong opinions on whether we want to merge those model files into the new repo or keep the two repos separate; but if we're worried about the file size in the longer term as we add more and more models, keeping them separate would help a bit with that.