Commit Graph
36 Commits
Author SHA1 Message Date
Mike Auty ac12098317 Add type-annotations for reamining layer files. 2017-12-13 20:48:52 +00:00
Mike Auty 917829d87f Reduce the number of times a ResourceAccessor is created, and use all handlers. 2017-11-24 22:27:36 +00:00
Mike Auty b6d932f4a5 Refactor the ResourceAccessor because it isn't an interface.
It's not strictly limited to layers either, but I don't really want to
create a whole extra generic file to put this in, so layers will do.
2017-11-05 21:27:56 +00:00
Mike Auty a4b4a8eed3 Improve the error handling with automagics. 2017-11-04 18:45:08 +00:00
Mike Auty 4b7543f2f4 Unify the resource opening. 2017-11-02 21:46:39 +00:00
Mike Auty c6724a538a Initial support for compressed files. 2017-08-11 01:12:50 +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 3aec66333e Allow the vmware stacker to ask the FileLayer it's on top of what filename it had. 2016-12-29 15:10:21 +00:00
Mike Auty 60bf657895 Allow pickling of FileLayers by unsetting the file (it'll be reopened as soon as a read happens). 2016-12-25 00:02:42 +00: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 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 8089a03f81 Convert the private file attribute to a property to allow for cloning. 2016-08-14 01:09:36 +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 bb2dd859d5 Refactor the get_schema call to make more sense. 2016-07-29 02:56:20 +01:00
Mike Auty 5290baf73d Make InvalidAddress exceptions more useful. 2016-07-02 13:31:36 +01:00
Mike Auty d882f93fee Move the length check, and require a non-zero length to protect is_valid. 2016-05-22 19:23:15 +01:00
Mike Auty 9faa13820a Since we're a forensics program, make sure we only read unless we know the user REALLY wants to write. 2016-05-22 19:21:24 +01: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 139a6b610e Add in an appropriate requirement for BufferLayers. 2016-01-16 22:20:10 +00:00
Mike Auty 00660f2a2b Refactor requirements to their own file. 2016-01-16 21:04:41 +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 5697428770 Move accessing the configuration to an attribute of the configurable itself. 2016-01-13 00:41:17 +00:00
Mike Auty bef0689982 Add in constraints for dependency solving. 2016-01-04 01:17:23 +00:00
Mike Auty ee42751055 Fix up test_rig. 2015-12-30 23:21: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 595e2faeb4 Start including configuration into the data layers. 2015-12-29 22:22:31 +00:00
Mike Auty a27a68de4b Add support for finalizing DataLayers once we're done using them. 2015-02-09 22:25:36 +00:00
Mike Auty 119accb10c Add a length parameter to is_valid to check whether whole blocks are valid or not. 2015-01-05 18:40:33 +00:00
Mike Auty c1d054df10 Rename functions in validity to avoid future member name collisions. 2014-12-30 03:49:31 +00:00
Mike Auty a97bd19988 Reformat and optimize code, including trailing whitespace and end of file newline. 2014-06-10 15:40:50 +01:00
Mike Auty 89e7e6e7ff Tidy up several areas using PyCharm corrections. 2014-03-30 00:46:31 +00:00
Mike Auty 3709143c40 Clean-up a few files according to PyCharm's warning system. 2014-03-28 08:47:00 +00:00
Mike Auty 26caf31974 Revisit the decision to try out super, and decide to stick with specific inheritance to avoid **kwargs everywhere. 2013-05-08 19:17:21 +01:00
Mike Auty eb35ffb325 Fix a typo in the size constraints on physical layers. 2013-05-07 23:43:09 +01:00
Mike Auty 9c2e486356 Refactor code locations, tidy up object initializers and add in File Layer. 2013-05-06 17:45:15 +01:00