Commit Graph
80 Commits
Author SHA1 Message Date
Mike Auty 6766498e4a Fix up saving symbol_space contruction options. 2018-03-11 20:59:47 +00:00
Mike Auty 8b29b1f668 Rework the import ordering for requirements/configurations. 2018-02-12 00:51:05 +00:00
Mike Auty 994bd7c394 Fix up the finding of swap layers so swap actually works. 2018-02-11 21:41:39 +00:00
Mike Auty b7c68f4e98 Rework LayerListRequirement from a ListRequirement to a MultiRequirement. 2018-02-11 18:35:18 +00:00
Mike Auty 7cb0330d04 Fix and correctly type ListRequirements. 2018-02-10 22:41:39 +00:00
Mike Auty c203663f0b Refactor requirements to support a list of swap layers. 2018-01-28 14:48:50 +00:00
Mike Auty f40fae197d Convert to python3.5 syntax (no local type-annotations). 2017-12-13 20:48:52 +00:00
Mike Auty 50b60c0df6 Add in more interfaces (and fix additional errors now that type information is available). 2017-12-13 20:48:52 +00:00
Mike Auty 5536412a5e Add in initial work at interface type-annotations. 2017-12-13 20:48:52 +00:00
Mike Auty d7d13eb19c Add type annotations to most of the automagic files. 2017-12-13 20:48:52 +00:00
Mike Auty 769e1226c4 Make creating subconfigs simpler from configurables. 2017-11-13 00:59:01 +00:00
Mike Auty e90b4e2d02 Add and make use of free_table_name for symbol_spaces. 2017-09-03 22:54:42 +01:00
Mike Auty ab5f4fa3ab Refactor the List and Choice Requirements
These are required by the Automagic interface, and so to prevent
importing from outside the interfaces namespace, these two classes
were moved into interfaces.
2017-08-09 22:44:06 +01:00
Mike Auty 5e9b2306d4 Ensure symbol tables are created with unique names. 2017-07-31 16:34:02 +01:00
Mike Auty 03cdd91fbf Add in the capability to merge two config dicts (so that manually set settings aren't overwritten). 2017-07-20 00:49:36 +01:00
Mike Auty 5e15d522bd Remove automatic IDE-inserted attributions.
They weren't consistent and they show just remind me how slowly
I've been getting vol 3 written!  5:S

There's git commits to track all of that stuff if we need it.
2017-05-14 11:40:49 +01:00
Mike Auty d6728fc2b4 Add in attributes and appropriate validation of TranslationLayers based on those attributes. 2017-02-10 13:57:44 +00:00
Mike Auty 3a648d75b0 Don't double wrap unsatisifed requirements, each should return its full config path of the requirement checked. 2017-01-08 17:59:04 +00:00
Mike Auty 149e57afee Change the requirement validation system to return all unsatisfied requirements, to provide more feedback. 2017-01-08 17:26:09 +00:00
Mike Auty 7b252d8b73 Refactor InstanceRequriement into the interfaces file.
This also fixes a minor bug where a property was used in the
initializer, which can't be read before initialization.
2017-01-08 02:04:55 +00:00
Mike Auty 0f811fbe34 Refactor the code to make it easier to find classes, and update documentation. 2016-12-30 02:13:23 +00:00
Mike Auty de9034f378 Ensure that configuration.branch allows for the return of an empty dict. 2016-12-29 15:06:28 +00:00
Mike Auty 1abebe67db Further documentation improvements. 2016-12-29 03:14:40 +00:00
Mike Auty 88e9786967 Improve the requirements documentation. 2016-12-28 22:33:17 +00:00
Mike Auty 698d1c2b4a Improve the granularity of logging. 2016-12-15 01:38:24 +00:00
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