Commit Graph
56 Commits
Author SHA1 Message Date
Mike Auty c64ed6a8dd Remove validity checking in favour of static-type checking.
This removes the assertions that checked plugin devs didn't do anything
overly bad in favour of using mypy to ensure appropriate type-checking.

It also moves the ProgressCallback typing information to constants in
order to avoid circular imports (since constants doesn't import
anything).
2019-01-20 02:35:49 +00:00
Mike Auty fdc6efc4ad Add in the LICENSE and the README. 2018-12-19 23:55:03 +00:00
Mike Auty b61ac3bd47 Many more typing fixes. 2018-12-17 01:17:06 +00:00
Mike Auty 19572b6e1e Reformat all python files using yapf with custom volatility style. 2018-12-16 16:50:17 +00:00
Mike Auty 29d41470a4 Mass reformat of typing imports
Relented on the strict import of direct objects/classes for the typing
module only.  Typing module components can be directly imported because
it makes the code really painful to read and write otherwise.

This is still in-line with the python style guide adopted from Google at
http://google.github.io/styleguide/pyguide.html section 2.2.
2018-12-16 13:04:22 +00:00
Mike Auty b1d46f843b Convert documentation to napoleon/Google format docstrings. 2018-08-05 15:52:12 +01:00
Mike Auty 2dc3d2928d Fix more typing issues. 2018-06-04 23:28:26 +01:00
Mike Auty 7a52ac9deb Fix a large number of typing issues.
There are several instances where mypy didn't detect

if blah is not None:
    blah = thing

and so were rewritten as:

blah = blah or thing
2018-06-04 01:25:02 +01:00
Mike Auty 623180ddbd Make many typing fixes, based on mypy-0.590. 2018-04-22 20:45:59 +01:00
Mike Auty f25d059d49 Add in file producer/consumer API. 2018-04-14 19:51:49 +01:00
Mike Auty 396dc8f8e4 Add in the ability for plugins to report their progress if applicable. 2018-03-23 15:41:55 +00:00
Mike Auty 21b4506b7b Add in type-annotations for the remaining interfaces. 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 49009ec458 Parameterize the plugin calling, with run as the default. 2017-01-19 16:19:10 +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 3a2cc24e2a Add in plugin function capability (and make plugin validation centralized on plugin construction). 2017-01-04 22:58:54 +00:00
Mike Auty ba05632efd Improve plugin and renderer interface documentation. 2016-12-30 02:44:01 +00:00
Mike Auty c6d5eef2f9 Fix up a documentation warning. 2016-12-20 09:00:17 +00: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 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 7661d2ce52 Remove errant debugging statements. 2016-07-30 00:42:46 +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 7db739279f Refactor configuration interfaces. 2016-01-16 13:24:25 +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 5ccdba35a3 Disable the self validation of plugins for the time being. 2016-01-12 23:46:03 +00:00
Mike Auty cb3f42f0e9 Rework the CLI a little to actually call the plugin, but the config system needs improving/fixing/rewriting. 5:S 2016-01-11 00:18:16 +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 bef0689982 Add in constraints for dependency solving. 2016-01-04 01:17:23 +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 58582715db Rework configuration classes to move towards a schema system. 2015-11-30 21:21:15 +00:00
Mike Auty 8ddf5c5b45 Remove the plugin __call__ method for properly named run method.
Calls methods are handy, but ugly if you create and then call the object
immediately ( for example, thing()() ).
2015-10-11 18:12:19 +01:00
Mike Auty 897d8bd574 Initial imlementation of a mapping from volatility config trees to Argparse arguments. 2015-09-28 00:57:06 +01:00
Mike Auty ddef7e76b3 Add a todo to validate factory requirements as well as just plugin requirements. 2015-04-13 14:18:33 -05:00
Mike Auty f4d07c01b7 Getting the feeling changes are getting out of hand. More config and layering code. 2015-04-10 18:14:28 -05:00
Mike Auty 4157c1c493 Refine the config system, realize that ContextFactories are in fact LayerFactories? 2015-04-10 17:38:56 -05:00
Mike Auty 3d00956951 Refactor some names and consider reworking the config system *again*. 2015-04-08 18:13:06 -05:00
Mike Auty e013455f40 Fix up input validation and start the CLI code. 2015-04-07 17:27:57 -05:00
Mike Auty 38d20199b3 Bulk out the config/inputs code. 2015-04-07 13:36:13 -05:00
Mike Auty bf324d0c71 Force plugins to use the contexts they were given. Also allow the framework to determine requirements without instantiating the plugin. 2015-04-07 13:35:39 -05:00
Mike Auty ec1529dcb9 Add in requirement checking to plugins. 2015-04-06 18:53:33 -05:00
Mike Auty fcda9febe7 Convert configuration options over to requirements. 2015-04-06 18:34:13 -05:00
Mike Auty d12bcf0666 Minor formatting change. 2014-12-31 21:04:55 +00:00
Mike Auty 811858aba8 Fix metaclass usage in python 3, and fill in some missing requirements. 2014-12-31 04:25:11 +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 38b0791233 General code refactor. 2014-12-30 03:43:36 +00:00
Mike Auty 3395ade2fa Rethink the plugin intialization process. 2014-07-08 23:21:08 +01:00
Mike Auty bcc1df08bc Correct mis-ordered decorators. 2014-07-08 22:02:53 +01:00