Commit Graph
140 Commits
Author SHA1 Message Date
Mike Auty 0fd0fa0d55 Fix up the comment to match the acceptance of returning objects other than just offsets. 2016-08-17 20:05:23 +01:00
Mike Auty db21d4628c Rework importing of interfaces, a little more verbose in the code, but a little less complex to import and name. 2016-08-16 10:54:57 +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 9111f13a8a Get rid of obsolete fulfillment method (now handled by _construct_class in ConstructableRequirementInterface). 2016-08-14 11:44:18 +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 523e159047 Add in convenience functions for working with the configuration and context. 2016-08-14 00:32:22 +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 7661d2ce52 Remove errant debugging statements. 2016-07-30 00:42:46 +01:00
Mike Auty 8db3adae05 Update the scanner interface to return all kind of objects.
This one's slightly contencious, in that scanner now don't all return a
uniform value, and therefore nothing can simply run through scanners.

Worst case scenario we make a separate stricter interface that says it
only returns offsets which will then allow things that need it to
dynamically find them, but it's probably too useful to be able to return
arbitrary objects of a type (as long as the objects returned are always
of that type).
2016-07-30 00:38:53 +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 8c6354e013 Document the ScannerInterface to make its use clearer. 2016-07-05 17:09:36 +01:00
Mike Auty 90fa5574b4 Add in the initial scanning framework. 2016-07-02 15:49:00 +01:00
Mike Auty c626bebb59 Convert mapping to a generator rather than a list. It must still return in sorted order. 2016-07-02 15:48:09 +01:00
Mike Auty fc34850345 Implement mapping with ignore_errors to get a (sorted) list of valid chunks in a layer. 2016-07-02 15:39:36 +01:00
Mike Auty 46190e37a9 Fix padding error in base read function. 2016-07-02 15:30:40 +01:00
Mike Auty 8c6e7918ee Fix up one missing exception change. 2016-07-02 14:53:41 +01:00
Mike Auty 5290baf73d Make InvalidAddress exceptions more useful. 2016-07-02 13:31:36 +01:00
Mike Auty e0b7f0b5f0 Add in helper functions for symbolspaces/symboltables to locate specific symbols. 2016-05-22 15:57:48 +01:00
Mike Auty fea6e0820a Convert to using a BANG variable for the symbol name delimiter.
Whilst it's easy to do now (because we don't yet use it many places)
convert the ! delimiter into a variable.
2016-05-22 15:26:31 +01:00
Mike Auty 659bfc1670 Add in Symbol class to properly represent programming symbols. 2016-05-22 11:54:44 +01:00
Mike Auty 2d23c93def Completely refactor constants and structures to symbols and types. 2016-05-22 11:51:06 +01:00
Mike Auty 7a62e74996 Refactor the translation method out of the TranslationLayer, since it's not always applicable/useful. Contemplate a rename of the TranslationLayer now it doesn't actually translate. 5;) 2016-04-10 11:54:32 +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 9c9183feb2 API change: Alter cast to accept object parameters rather than inheriting (which usually will be wrong). 2016-02-14 01:40:25 +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 a3d685c93a Ensure layers aren't provided more parameters than they need (in case the parameters were meant for a different potential provider. 2016-01-16 22:20:42 +00:00
Mike Auty 78cd3c84c0 Add in a NativeSymbolTable validator. 2016-01-16 21:38:00 +00: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 b36d84ab0d Move metadata to providers variable, and genericize the rudimentary resolver. 2016-01-15 01:50:02 +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 33ab4c9109 Remove ConfigurationModifiers for now, the idea might return later, but for now it's out. 2016-01-13 00:24:00 +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 5ccdba35a3 Disable the self validation of plugins for the time being. 2016-01-12 23:46:03 +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