gamma-cat
gamma-cat copied to clipboard
Clean up build of input index file
This PR is on top of https://github.com/gammapy/gamma-cat/pull/211. Hence, you should firstly review and merge https://github.com/gammapy/gamma-cat/pull/211 before looking at the diff of this PR!
The plan is to have to classes InputCollection
and OutputCollection
each handling - as the names suggests - every data in the input and output folders, respectively.
This PR starts to write the InputCollection
and it implements to first things:
- A list of all
info.yaml
files (stored in input folder) is created via the classInputInfoCollection
(see inline comment). - All of these info-files are validated (see inline comment).
- Secondly, the
input_index_file
is created after (!) the info-files are validated (see inline comment). Step 2) and 3) are handled via arun
function inInputCollection
(see inline comment).
In the future these three steps should be the very first thing make.py
does! This PR does not (!) change the procedure of make.py
, it only introduces a ugly way to run the upper steps when make.py collection --step input-index
is executed (see inline comment). There needs to be done a follow up PR which cleans up make.py
.
The second small commit is only a small fix in the _make_index_file_input
function so that it uses the to_list()
function of InputInfoCollection
. But the functionality is not changed.
I don't understand the error of travis ci. It is a http error?
make.py
all does work locally, hence, there shouldn't be an error.
Honestly, I don't know whether you can merge this now after merging #211 :-D I won't have time the next days but I will try to take a look to this again and then I give you feedback here.