Should I be able to install a non-core skin in the alpha?
I just attempted to install the belchertown skin and it failed.
Attaching btown-weewx5.txt for the result.


On Monday, January 30, 2023 at 10:29:26 AM UTC-5 G Hammer wrote:

> As a user with zero programming ability and limited ability to follow 
> code, I'd like to say that the two step process is fine with me.
> As this is all new, I missed the requirement for the second step. Once 
> pointed out by Tom, no problem.
> FWIW I used to only install with setup.py. Upgrades were 'simple' once you 
> downloaded the file, untared, changed directory, did the build and install 
> commands. Oh wait, not that simple at all.
>
> So far, the pip method has proven to be simpler for me to install and to 
> understand.
>  
>
> On Monday, January 30, 2023 at 9:02:56 AM UTC-5 matthew wall wrote:
>
>> 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/aa7e18d7-791a-4ce5-96ad-17f7aa6f59e4n%40googlegroups.com.
[wx@wx-tab ~]$ weectl extension install weewx-belchertown-master.zip
Request to install 'weewx-belchertown-master.zip'
Extracting from zip archive weewx-belchertown-master.zip
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/weecfg/__init__.py", line 705, 
in get_extension_installer
    __import__('install')
  File "/tmp/tmpc8sxh6f_/weewx-belchertown-master/install.py", line 5, in 
<module>
ModuleNotFoundError: No module named 'setup'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/weectl", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/weectl.py", line 45, in main
    namespace.func(namespace)
  File "/usr/local/lib/python3.9/site-packages/weectllib/parse_extension.py", 
line 107, in install_extension
    ext.install_extension(namespace.source)
  File "/usr/local/lib/python3.9/site-packages/weecfg/extension.py", line 123, 
in install_extension
    extension_name = self._install_from_file(extension_path, filetype)
  File "/usr/local/lib/python3.9/site-packages/weecfg/extension.py", line 149, 
in _install_from_file
    extension_name = self.install_from_dir(extension_dir)
  File "/usr/local/lib/python3.9/site-packages/weecfg/extension.py", line 160, 
in install_from_dir
    installer_path, installer = weecfg.get_extension_installer(extension_dir)
  File "/usr/local/lib/python3.9/site-packages/weecfg/__init__.py", line 707, 
in get_extension_installer
    raise ExtensionError("Cannot find 'install' module in %s" % 
extension_installer_dir)
weecfg.ExtensionError: Cannot find 'install' module in 
/tmp/tmpc8sxh6f_/weewx-belchertown-master/

Reply via email to