ian,

you mentioned that your extension (lets call it weewx-wx34) depends on at 
least two other extensions (weewx-crt and weewx-forecast).

when one extension depends on others, you should make the dependent 
extension work as much as possible even if the independent extension(s) is 
not installed.  do not assume that a user has or ever will install all of 
the dependencies.  and definitely do not make one extension forcibly 
install another extension.  for example, if you made it so that installing 
weewx-wx34 also installs weewx-crt, you could very well break an 
installation that is already using weewx-crt.

in this example, the dependency on weewx-crt is required - weewx-wx34 will 
not be very useful without weewx-crt.  the dependency on weewx-forecast is 
optional - weewx-wx34 could be very useful, but it will not have forecast 
information.

so if a user installs weewx-wx34 but not weewx-crt, the installation of 
weewx-wx34 should complete successfully, but when the user opens the web 
page for weewx-wx34 s/he should see a message something like "No data are 
available.  Is the weewx-crt extension installed and configured?".

similarly, if weewx-forecast is not installed, consider making weewx-wx34 
work completely - only the forecast parts would not display.

if you do this right, then the dependent extension will 'degrade 
gracefully' - it will work as much as possible without the dependencies, 
but it will offer information about those dependencies discretely and in a 
way that leads the user to discover how to install those dependencies.

m

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/3698952a-96d2-4d9a-a516-28dc9dbfc7aa%40googlegroups.com.

Reply via email to