Hey Joe!
Thanks for this.
The loading step with python based config files is a surmountable problem -- there's even code to do it associated with the little used `tarbell list` command. There is some unpredictability because of imports, but that's going to be an issue for the GUI generally.
However, changing the configuration and writing it back is, if it is even possible, going to be really hairy if we don't adopt some version of this proposal.
I'm inclined to say that we should keep the old loader as a fallback for backward compatibility, and move to a model where there's a JSON or YAML configuration file per project and an optional python module that acts as a Flask blueprint. This also has the advantage that Tarbell could automatically register the Flask blueprint if it is present, eliminating some boilerplate code.
Potentially the GUI could incorporate the fallback loader for backward compatibility and use try/except to trap any errors and simply report them to the user. If the fallback loader is used, the GUI could disable configuration write-ability and offer an upgrade path for older projects.
Anybody else have thoughts about this? I think Joe's proposal will be a huge step forward for the project.
David
--
Learn more about Tarbell at http://tarbell.tribapps.com
---
You received this message because you are subscribed to the Google Groups "Tarbell project discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tarbell-proje...@googlegroups.com.
To post to this group, send email to tarbell...@googlegroups.com.
Visit this group at http://groups.google.com/group/tarbell-project.
To view this discussion on the web visit https://groups.google.com/d/msgid/tarbell-project/b972984c-998a-459b-80c6-8188d445a9a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Independent of how you load your config, there is a config object available which holds the loaded configuration values: The config attribute of the Flask object. This is the place where Flask itself puts certain configuration values and also where extensions can put their configuration values. But this is also where you can have your own configuration.
To view this discussion on the web visit https://groups.google.com/d/msgid/tarbell-project/CAFQdJjsqac9wWKc1RPaFDGsBzJT9RXcuSdw3_%3D%2Be2WQWK1xUnA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tarbell-project/CAMTySv6nGSYxDRCkoxsFJF1QCWz0cS-Zm78vbu8So8Q-v8Y27g%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tarbell-project/1432747082912.5576f7be%40Nodemailer.
To view this discussion on the web visit https://groups.google.com/d/msgid/tarbell-project/CAMbNd-L7VzFO2O50ZP9CzJWNsXH%3DW5h1cpSOGYAe%2ByjPzKaKgA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tarbell-project/CAMFjkAO6HMk05LmGEp3fbGgzvix%3Dw%2Bgo-twGhwHw8bbVcoTmbw%40mail.gmail.com.