Commit Graph
55 Commits
Author SHA1 Message Date
Mike Auty d43b294f36 Ensure we store all relevant config values rather than just those stores as variables. 2016-12-12 02:07:48 +00:00
Mike Auty 88f1166c6d Add in a helper function that will likely be useful in the future. 2016-12-04 01:01:13 +00:00
Mike Auty 667014a1fd Attempt to standardize error message display. 2016-10-30 17:51:45 +00:00
Mike Auty f771de3703 Tidy up error messages. 2016-10-30 17:07:48 +00:00
Mike Auty 9959697ba5 Move where the rescursion into TranslationLayers happens. 2016-08-24 01:29:11 +01:00
Mike Auty 4d7701be66 Fix the config printer to sort the values. 2016-08-24 01:13:38 +01:00
Mike Auty 6b47b992a7 Ensure splice requirement perpetuates down the HierarchicalDict. 2016-08-24 01:13:20 +01:00
Mike Auty 341ae950b8 Ensure configurations do not include any generated values (ie TranslationLayer/SymbolLayer names) 2016-08-24 01:12:43 +01:00
Mike Auty 3a07d6810b Add in a reminder for additional work required. 2016-08-22 02:27:13 +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 d3e63fbc1a Rename update_configuration to build_configuration and return a standalone config. 2016-08-22 02:18:23 +01:00
Mike Auty a1b9be74c7 Refactor several configuration/requirement structures to avoid import loops. 2016-08-22 02:15:54 +01:00
Mike Auty c5139ba568 Stop exposing the config_path for now, and fix the version that's passed in the construction phase. 2016-08-22 00:36:58 +01:00
Mike Auty dc16d93b77 Alter the config.path_join function to remove empty sections. 2016-08-21 21:47:45 +01:00
Mike Auty ca61cf10b9 Refactor the context back into the ConfigurableInterface.
This also adds support for manually constructed configurables to
populate the config tree in the current context.

I'm still toying around with this though, I need to figure out
what to do with optional values and think the whole thing through
to make sure it's worthwhile.
2016-08-14 21:28:43 +01:00
Mike Auty e02feed16e Python 3 has a sane super() implementation (no arguments), so convert to using that. 2016-08-14 00:55:02 +01:00
Mike Auty 43aba96e3f Minor pylint (alphabetical imports) and refactoring the construct class to work for symbols. 2016-07-30 01:58:29 +01:00
Mike Auty d3a226d7a8 Remove constraints as a thing, they'll need to come back, but in a different form. 2016-07-30 01:52:44 +01:00
Mike Auty 32b0b073ce Remove unnecessary components after all the refactoring. 2016-07-30 00:37:24 +01:00
Mike Auty f8c3019165 Refactor requirements to expose the name ordering for quicker lookups. 2016-07-29 03:28:02 +01:00
Mike Auty 14c0cc262c Significantly rework the configuration system.
So this is where I ripped out the guts of the dependency tree
and made it a little better defined in some ways, and delayed
populating it in others.  The validate function signature has
changed and I'm still up in the air whether to validate with
True/False or throw/catch exceptions.

So now, configurables have a list of requirements, these are
then bundled into a single requirement and can be passed to
automagic.  Automagic runs a set of things over the deptree
to help build/manage it.  These run in order of priority.

The tree is still built from the top down, but now automagic
can build branch from the bottom up and try and splice them
into the tree where appropriate.  Hopefully this will make it
easier to see follow.
2016-07-29 03:24:52 +01:00
Mike Auty bb2dd859d5 Refactor the get_schema call to make more sense. 2016-07-29 02:56:20 +01:00
Mike Auty bacc8c5539 Move to a HierarchicalVisitor pattern. 2016-02-22 01:02:29 +00:00
Mike Auty a9ff081da5 Fix a few bugs and re-add a visitor pattern for traversing the tree. 2016-02-20 23:01:41 +00:00
Mike Auty ba2083fc7c Refactor the RequirementTreeNode to put it in the interfaces file. 2016-02-20 21:35:05 +00:00
Mike Auty 03cb131260 Add a priority ordering for testing layers (high priority trumps lower priority). 2016-01-21 00:06:39 +01:00
Mike Auty 00660f2a2b Refactor requirements to their own file. 2016-01-16 21:04:41 +00:00
Mike Auty 7db739279f Refactor configuration interfaces. 2016-01-16 13:24:25 +00:00
Mike Auty 8e1602c02e Refactor constrained to constraint. 2016-01-15 01:53:08 +00:00
Mike Auty 3a8decd57c Add in the interfaces for constraints/providers. 2016-01-15 01:49:18 +00:00
Mike Auty 4d4c5e63b9 Set a default for the HierarchicalDicts separator to use a constant. 2016-01-13 00:57:00 +00:00
Mike Auty 191e38c3d4 Remove completed tasks. 2016-01-13 00:53:17 +00:00
Mike Auty 5b2200decc Update documentation slightly. 2016-01-13 00:51:44 +00:00
Mike Auty 1e48527096 Refactor Leaf/Node structures. 2016-01-13 00:50:51 +00:00
Mike Auty 603769cd3d Tidy up useful debugging output. 2016-01-13 00:49:12 +00:00
Mike Auty ffcacaec7d Refactor SchemaNodes into RequirementInterface. 2016-01-13 00:48:54 +00:00
Mike Auty 5697428770 Move accessing the configuration to an attribute of the configurable itself. 2016-01-13 00:41:17 +00:00
Mike Auty e2e754edeb Add in this level of values only, as a property. 2016-01-13 00:10:25 +00:00
Mike Auty fc3559e5c7 Fix up the HDict iterator. 2016-01-13 00:10:06 +00:00
Mike Auty 415a0948a0 Rename the SCHEMA_NAME_DIVIDER, and ensure all paths are flat strings. 2016-01-12 23:44:55 +00:00
Mike Auty f09939df06 Add in HierarchicalDicts as a configuration storage type. 2016-01-12 23:18:06 +00:00
Mike Auty df4a4d5e8d Remove abstract method from classmethods (since it won't error if the abstract method isn't implemented until instantiation. 2016-01-10 16:30:37 +00:00
Mike Auty 3bf336df41 Rework the dependency section and contemplate how to thread it all together a little more. 2016-01-10 16:29:47 +00:00
Mike Auty ff1e326a9c Rip out layer factories, and replace them with a single dependency resolver. 2015-12-30 21:58:41 +00:00
Mike Auty bcbfee9016 Refactor the validity function names to make it easier for autocomplete to find. 2015-12-29 22:24:32 +00:00
Mike Auty cf66d0b447 Start building a dependency resolver for translation layers. 2015-12-29 22:13:10 +00:00
Mike Auty f7cc2ef00e Add a third layer to the requirement system
Now:

1. ConfigSchemaNode Class (pre-plugin instantiation)
2. ConfigSchemaNode Instance (plugin instantiated)
3. ConfigurationItem Instance (tree linking schema nodes to configuration value locations)
2015-12-27 01:12:38 +00:00
Mike Auty cf2b7b7c01 Update more ideas, getting closer to a suitable setup. 2015-12-07 09:23:20 +00:00
Mike Auty 2028c26557 Uncomment Conjunction/Disjunction Requirements and add initial windows translation layers, etc 2015-12-03 00:17:55 +00:00
Mike Auty a4b44cf921 Move the configuration data to its own module. 2015-12-02 09:42:05 +00:00