On Sunday, January 29, 2023 at 9:38:02 PM UTC-5 [email protected] wrote: Sure. So a weewx update requires:
- updating weewx in python-land via pip - resynching the weewx-data tree to catch up to the pip-installed content - restarting the daemon (maybe/possibly/usually) FWIW, this one seems like an opportunity for a wrapper script, regardless of language selected. The catch-22 of course is what if a weewx upgrade changes the wrapper itself too in the first step, as well as dealing with what if step-N failed for whatever reason. please, no! But a "weectl software upgrade" command for a wrapper would be kind of nice if that's reasonable. upgrading the software should be completely separate from 'upgrading' a skin, database, non-core driver, or any other part of weewx that is not in the core. when you do an upgrade of the software, your other stuff should just work. if it does not, then the software is broken - it is not backward-compatible. changes in weewx core that break extensions or skins should be indicated by the appropriate semantic version change, and drivers/skins should be released and documented separately as appropriate. the 'weewx version' should come from weewx code, *not* the weewx conf file. (imho, the 'version' variable should not be in any weewx conf file, since it cannot be trusted) each skin may have a version number that is independent of anything in weewx code (we default to putting the weewx release version number in the skins that ship with weewx, since at this time we cannot be bothered to track per-skin versions for skins that ship with weewx) I also wonder if 'weewx station upgrade' isn't super clear terminology either, but I don't have a better suggestion there. What bad happens if they answer 'no' to the prompt, for example ? Also, can we pass it a --yes switch like apt-get so we can fully script an upgrade and/or upgrade-skins ? lets keep it simple and start with the fundamental tools. if you want layers of wrappers, use a java app like matlab or something from atlassian ;) to upgrade weewx: pip install weewx --upgrade (or 'apt install weewx' or 'yum install weewx', with options to pin at a specific version in each case) if you want to 'upgrade' your skins, config file, or database, then there must be separate commands to do that. but that is a corner case that should almost never have to happen, since the weewx software is supposed to be backward-compatible. in fact, doing an 'upgrade' to a config file is really just a "tidy up and remove older syntax, but does not change functionality in any way. non-core skins and drivers will require upgrades from time to time, but that is done using wee_extension. skins should not be 'upgraded' when i do an upgrade to weewx! nor do i want weewx mucking with my data when i upgrade the software. so that leaves us with: * use 'weectl' to explicitly 'tidy up' a conf file (should never be necessary, except maybe for major releases) * use 'wee_extension' to upgrade your non-core skins/drivers * use 'weectl station upgrade' to upgrade your core skins now this *could* use some massaging to make it more consistent - lets figure this out instead of adding layers of wrapper scripts. btw, 'weectl station upgrade' might better be 'weectl conf upgrade'. we started with 'station' because the intent was to encapsulate conf file and any other assets into a 'station'. but it might be better semantics to just call it a config. 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/6fe7fce0-574a-46e1-97af-cf44e97e7d08n%40googlegroups.com.
