Coder Social home page Coder Social logo

Comments (9)

matthewwall avatar matthewwall commented on May 18, 2024

imho, concatenating would lead to even more confusion. every entry specified in weewx.conf overrides whatever is set in skin.conf. if we introduce concatenation, then we have to remember which parameters are overrides and which are concatenations.

(fwiw, i've been using this approach since i first wrote the exfoliation skin)

from weewx.

tkeffer avatar tkeffer commented on May 18, 2024

Then this suggests we should warn if a weewx.conf override is masking something in skin.conf.

BTW, I've been meaning to ask you, why do you override in weewx.conf? Why not just put the settings in the skin's configuration file? That makes it local.

from weewx.

matthewwall avatar matthewwall commented on May 18, 2024

the exfoliation skin needs to work whether or not the forecast extension is installed, so the skin.conf assumes there is no forecasting. i'm pretty sure that the report will fail if it specifies a search list extension that is not installed.

so when you install the forecast extension, you need to add the search list extension to exfoliation. if you modify skin.conf then you have to propagate your changes each time to take an update to the exfoliation extension. if you specify them in weewx.conf, then exfoliation updates are trivial to apply.

from weewx.

matthewwall avatar matthewwall commented on May 18, 2024

btw, the exfoliation skin no longer requires full paths to its include files. those were necessary before the chdir bug was fixed in the CheetahGenerator.

from weewx.

tkeffer avatar tkeffer commented on May 18, 2024

As I think about this, I think we can make the case that search list extensions are, well..., different from other parameters.

By its very nature, Cheetah uses the union of all the search lists you give it. So, if you specify an SLE in weewx.conf, then a different one in skin.conf, it would be reasonable to expect Cheetah to be able to use both of them.

from weewx.

matthewwall avatar matthewwall commented on May 18, 2024

if parameters in weewx.conf are merged with parameters in skin.conf, then how does one override skin.conf with something in weewx.conf? what order will the resulting items be in?

from weewx.

tkeffer avatar tkeffer commented on May 18, 2024

The extensions specified in option search_list_extensions in weewx.conf would appear in the final search list before the ones specified in skin.conf. So, if a tag is defined in both places, the one in weewx.conf would win, just like all the other options.

from weewx.

matthewwall avatar matthewwall commented on May 18, 2024

the problem with merge instead of override for search_list_extensions is that then there is no way to override.

as a practical matter, the combining of options from skin.conf and weewx.conf happens outside of each generator, in class StdReportEngine. so the cheetahgenerator would have to re-read the skin.conf then re-process parameters, with a special case for search_list_extensions. or the StdReportEngine merging would have to be refactored to enable the special case of search_list_extensions.

meanwhile, i added debug-level logging to cheetahgenerator that indicates exactly which objects are in the search list, as well as a list of the search list pseudo-dicts that are available for use in templates. that provides users with the ability to see the effects of their weewx.conf and skin.conf changes.

from weewx.

tkeffer avatar tkeffer commented on May 18, 2024

That seems like a reasonable first step. Let's close this issue --- we can revisit if necessary.

from weewx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.