I'll attach an obfuscated weewx.conf from my system. Any new solution would have to be able to generate something that is functionally the same as this, at a very minimum.
A couple toplevel questions I guess:
- would we need to run wee_ctl potentially dozens and dozens of times to build up an aggregate .conf file (or equivalent) like my big one that I've attached ?
- could a wee_ctl command be able to run versus a TBD format data file of its own telling it what to do ?
- could a wee_ctl command be made idempotent so that a one-liner change to the (theoretical) data file would only do one thing differently
And lastly:
- in the new vision's future, would we have one weewx.conf or a bunch of them that are either additive or with some superseding rules. Again, thinking about how puppet and splunk do things, which can get really confusing in figuring out why it did what it did.
--
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 weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/rmiv8npk4gg.fsf%40s1.lexort.com.
On Tuesday, November 8, 2022 at 12:10:22 AM UTC-5 vince...@gmail.com wrote:
- could a wee_ctl command be able to run versus a TBD format data file of its own telling it what to do ?
not sure what you mean by this
in the case of a docker (or salt or ansible) installation, i would create the conf file *before* the installation, then just drop that config file into the 'create-station' part. i do that right now on systems i manage with salt where i run weewx. i use a bare-bones config file (with no comments, and only the sections that *must* have parameters specified (in older weewx, not specifying values would cause weewxd to die, even if you just wanted defaults). so effectively i 'create-station' myself.
what if you built weewx.conf at 'runtime' based on multiple mostly-optional config definitions....
--
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 weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/50d51375-8cf6-41cd-a8ff-d0038f586344n%40googlegroups.com.
Sorry, Vince, but I don't like your one file = one option approach. There would be dozens of files --- impossible to support.Also, we cannot use setup.py() in an imperative approach any longer. No modifications of weewx.conf, or any other file. All you can do with the new setuptools is move things into place. Everything is declarative. No running of code.
--
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 weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/d123f83e-5f26-4ea0-be12-cb62151bf9bdn%40googlegroups.com.
Our new "second step" tool would use importlib.resources to find package data, which is still supported (indeed, encouraged), and then copy it into place.Yup. One more step.
--
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 weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/fadf79ab-49aa-4ab8-95bb-dd4b8ca7a906n%40googlegroups.com.
Vince: pip can install to many places. Yes, it can install to the system's dist-packages, although I don't think that's a great idea. It requires sudo and can break existing applications. Better idea is to use "--user" and install to ~/.local, or install to a virtual environment, or use pipenv.The new tool would then install to either /home/weewx or ~/.weewx, or something similar.
--
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 weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/01d0f44f-8d69-4799-a55a-69f6822ad046n%40googlegroups.com.
cd ~# Create a virtual environment in weewx-venvpython3 -m venv weewx-venv# Activate itsource weewx-venv/bin/activate# Then install WeeWX into it using pippython3 -m pip install weewx
weectl station create
weewxd
Also tested calling weewxd from outside of the venv via a full path ala ~/weewx_venv/bin/weewxd which I suppose is where a future systemd startup file use if an absolute path was specified (???)
Re: your installer mechanisms options, I lean toward this way since it relies on just core python and not a third party wrapper tool that might theoretically go away someday or might not work on all the unusual/creative places folks run weewx on like NAS or under WSL and the like.
For the future, I guess I'd like to also see docs re: how to upgrade weewx and/or switch to a specified version of weewx. Sometimes folks need/want to freeze to a particular version.
pip install weewx==5.1.3
--
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 weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/9b6757d9-7baf-429a-ba97-84835066abebn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/CAPq0zEDpcvx%3D0_yiEcyuW3PRyHF-F%3DqL2ySXfRB%3DyfvZJ-9zBg%40mail.gmail.com.
--
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 weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/caa275f3-898f-4555-a7c3-391b2846b320n%40googlegroups.com.
--
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 weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/caa275f3-898f-4555-a7c3-391b2846b320n%40googlegroups.com.
It seems obvious that extensions should use the same pip strategy and
depend on weewx. Yes, need to cope until they are updated, but need to
push them to align.
It should be easy to choose a different place for what is "etcdir" and
"vardir" where the config and db and html output live. They should be
able to be separate. skin/conf should be able to be on a ro fs.
I think 'weewx-data' is an artifact of the previous install and would be
separate config and state were we starting fresh.
--
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 weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/5092796d-ac71-48af-867a-254c95b7e702n%40googlegroups.com.
% python3 -m weectl station create --help
usage: weectl station create [--config=CONFIG-PATH] \
[--driver=DRIVER] \
[--location=LOCATION] \
[--altitude=ALTITUDE,{foot|meter}] \
[--latitude=LATITUDE] [--longitude=LONGITUDE] \
[--register={y,n} [--station-url=STATION_URL]] \
[--units={us,metricwx,metric}] \
[--skin-root=SKIN_ROOT] \
[--sqlite-root=SQLITE_ROOT] \
[--html-root=HTML_ROOT] \
[--docs-root=DOCS_ROOT] \
[--examples-root=EXAMPLES_ROOT] \
[--no-prompt]
In what follows, WEEWX_ROOT is the directory that contains the
configuration file. For example, if "--config=/Users/tkeffer/weewx-
data/weewx.conf", then WEEWX_ROOT will be "/Users/tkeffer/weewx-data".
optional arguments:
-h, --help show this help message and exit
--config CONFIG-PATH Path to configuration file. It must not already exist.
Default is "/Users/tkeffer/weewx-data/weewx.conf".
--driver DRIVER Driver to use. Default is "weewx.drivers.simulator".
--location LOCATION A description of the station. This will be used for
report titles. Default is "WeeWX".
--altitude ALTITUDE,{foot|meter}
The station altitude in either feet or meters. For
example, "750,foot" or "320,meter". Default is "0,
foot".
--latitude LATITUDE The station latitude in decimal degrees. Default is
0.00.
--longitude LONGITUDE
The station longitude in decimal degrees. Default is
0.00.
--register {y,n} Register this station in the weewx registry? Default
is "n" (do not register).
--station-url STATION_URL
Unique URL to be used if registering the station.
Required if the station is to be registered.
--units {us,metricwx,metric}
Set display units to us, metricwx, or metric. Default
is "us".
--skin-root SKIN_ROOT
Where the skins will be located, relatve to
WEEWX_ROOT.
--sqlite-root SQLITE_ROOT
Set the location of the sqlite directory, relative to
WEEWX_ROOT.
--html-root HTML_ROOT
Where generated HTML and images will go, relative to
WEEWX_ROOT.
--docs-root DOCS_ROOT
Where to put the documentation. Default is
"$WEEWX_ROOT/docs".
--examples-root EXAMPLES_ROOT
Where to put the examples. Default is
"$WEEWX_ROOT/examples".
--no-prompt If set, do not prompt. Use default values.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/01b3b157-10d9-42cb-9a77-637837e216b8n%40googlegroups.com.