Commit Graph
8 Commits
Author SHA1 Message Date
Mike Auty eae84fd8e0 Ensure we only stack when needed
We shouldn't be stacking unless we're required, so now
we run after the construction phase, and run our own construction
phase is we've changed anything.
2016-12-12 02:06:54 +00:00
Mike Auty 5d15f810e1 Tidy up the config namespace around automagic a little. 2016-12-11 13:58:17 +00:00
Mike Auty fbe3682592 Allow stack functions to return None as a failure response. 2016-08-26 08:29:45 +01:00
Mike Auty 32bdeafa8a Improve the stacker to append the generated stack configuration into the original context. 2016-08-24 01:31:45 +01:00
Mike Auty 721d5ade3f Give the LowestLayer a proper name in the interim configs, and ensure it's in the stack. 2016-08-24 01:30:32 +01:00
Mike Auty 04b760ee3e Increase the priority so this is always run first, and we're going to use the requirement variable. 2016-08-24 01:29:53 +01:00
Mike Auty 3dc161f9b4 Rework Translation Layers to tie more closely to configurations
This change is quite signficant, and requires that TranslationLayers
get all additional parameters that they need through their requirements.

These are now automatically enumerated and populated on object
construction based on the requirements, so should not require lots of
repetitive filling out of fields.

It does come with the downside that TranslationLayers can only be
contructed with a context (and appropiate config), but TLs in particular
always require a context (to contain the base layer) and blank configs
can be constructed relatively easily (convenience functions can be added
if necessary).

This allows configuration trees to be built up, and their configs
spliced into an existing config (as if it were being loaded from a
file).

Not all ConstructableRequirements use this method, since SymbolTables
(for example) do not have access to the context or config_path in order
to get to any parameters stored in the context's config.  They therefore
are still passed their requirement values as __init__ parameters
instead.
2016-08-22 02:20:10 +01:00
Mike Auty f48ee5ff33 Add in the actual stacking automagic. 2016-08-22 00:06:04 +01:00