openmainframeproject / software-discovery-tool

Software Discovery Tool
Apache License 2.0
32 stars 41 forks source link

automate config? #47

Closed rachejazz closed 3 years ago

rachejazz commented 3 years ago

A funny thought, I thought about @pleia2 having to look around how to add the distro come up on the UI and eventually had to do it manually. Can there be a way to update the config.py to scan the data directory and add the json file by itself under SUPPORTED_DISTRO?

pleia2 commented 3 years ago

I think that's a great idea! The only catch is how to name it, since one of the fields in config.py is the "display name" that shows up in the UI.

pleia2 commented 3 years ago

Oh, I guess also that some of them are nested in PDS, so if you're searching for SLES it searches a whole bunch of JSON files.

rachejazz commented 3 years ago

No worries about names. Since we have a bin directory, all I dream now is to automate the whole sdt :P but that can't be done ofc

rachejazz commented 3 years ago

@pleia2 I had an idea for this. Can we remove the SUPPORTED_DISTROS variable from config.py and keep it in a separate supported_distro.py. Then all we need to do to import the variable is to:

from config.supported_distro import SUPPORTED_DISTROS

In that case, automating can be done easily since python can easily append new distros to this file and config.py can read the newly updated json file everytime we reload :)