Commit Graph
120 Commits
Author SHA1 Message Date
Mike Auty b0b868d79c Typing: General typing fixes across the tree 2019-11-27 11:30:14 +00:00
Mike Auty 31ddbaaa2e Typing: Fix python3 format string/byte output issues 2019-11-27 11:30:14 +00:00
Mike Auty b99ace86fb Tidy up exceptions to be more accurate. 2019-11-13 19:58:14 +00:00
Mike Auty 9a17beb77f Ensure consistency of importing interfaces. 2019-10-02 01:18:46 +01:00
Mike Auty e0b9d72c84 Update the license URL and LICENSE.txt 2019-09-25 21:44:05 +01:00
Mike Auty 72567e1c50 Yapf-0.28.0 rerun across the whole codebase. 2019-09-21 21:08:23 +01:00
Mike Auty 5b5a7b3966 Fix up typing for PluginRequirement. 2019-09-16 00:59:04 +01:00
Mike Auty e922cef316 Improve docstrings for all plugins, and reformat all docstrings. 2019-09-07 22:59:54 +01:00
Mike Auty 9cde94bceb Change the license blurb on all files. 2019-08-27 23:11:00 +01:00
Mike Auty a58f064ea8 Rework how the plugin_version is checked. 2019-08-27 21:08:29 +01:00
Mike Auty 272224a1b0 Refactor all references to Context.memory to Context.layers. 2019-07-07 17:42:51 +01:00
Mike Auty f898dca296 Refactor SymbolRequirement to SymbolTableRequirement for clarity. 2019-02-06 21:26:32 +00:00
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 8838099845 Don't hard code the error levels for logging. 2019-01-03 00:40:36 +00:00
Mike Auty 040da46deb Fix up the descriptions for non-simple requirements. 2019-01-03 00:39:53 +00:00
Mike Auty ac57e62807 Output the requirement description when it can't be fulfilled. 2018-12-29 00:41:20 +00:00
Mike Auty fdc6efc4ad Add in the LICENSE and the README. 2018-12-19 23:55:03 +00:00
Mike Auty e65a00894a Minor style tweaks and mass changes across the codebase because of it. 2018-12-17 12:46:14 +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 9824538bd9 Numerous pycharm warnings resolved
This includes:

* Better ways of checking empty lists
* Not shadowing builtin functions like filter
* Preventing invalid slash warnings by marking strings as regexps
* Removing unnecessary brackets
* Lowercase variable names
* Adding/updating parameters in docstrings
* Removing unused code (lines not chunks)
* Change in not a member tests
* Changing some methods to static
* Shorting range membership checks
* Missing parameters
* Make some exception handlers more specific
* Don't define a lambda to a variable
* A few more instance checks to help type checkers
2018-12-16 13:21:06 +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 4eb30d5003 Rework the config_value method. 2018-09-23 22:55:10 +01:00
Mike Auty 81bef5ace8 Minor fixes to the requirement framework. 2018-09-23 18:13:58 +01:00
Mike Auty 828652f9cb Convert LayerList into more generic ComplexType List. 2018-09-23 13:11:59 +01:00
Mike Auty 190ffaf28b Refactor where certain types of requirement live (given they're more concrete than interface). 2018-09-20 16:14:57 +01:00
Mike Auty 8d5a6ffdd4 Refactor InstanceRequirement into SimpleTypeRequirement. 2018-09-20 14:56:16 +01:00
Mike Auty b1d46f843b Convert documentation to napoleon/Google format docstrings. 2018-08-05 15:52:12 +01:00
Mike Auty b9fbf272d1 Add support for filename requirements
At the moment these are no different than strings, but they allow us to
do things like add URI handlers to file names if no scheme is provided,
and eventually do file existence testing.  This also allows the web URI
to allow uploads as a means of passing a file in.

The configuration will only store the filename, because otherwise
someone could add a huge file which would need to be carried around in
the config forever after.  Handling file existence errors is up to the
UI after the volatility library returns a "file not found" type
exception.
2018-05-08 23:54:08 +01: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 e8212df604 Improve ListRequirement handling (default values, etc). 2018-02-11 02:16:53 +00:00
Mike Auty cd8f6876ff Add in LayerListRequirement type. 2018-02-10 22:42:59 +00:00
Mike Auty 7cb0330d04 Fix and correctly type ListRequirements. 2018-02-10 22:41:39 +00:00
Mike Auty 4e7fc078ee Tidy up the requirements namespace. 2018-02-10 13:45:17 +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 2cc456e847 Finish off the automagic directory 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 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 d32fc223e2 Fix up additional imports inconsistent with the coding style.
Note: also remove interfaces_configuration where ever possible
(this is not possible in the interfaces directory itself
because it would cause an import loop).
2017-08-09 22:32:44 +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 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 b7b0d9720d Make choices a public property. 2017-01-08 02:07:44 +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 5fe078e487 Adapt Automagic to have requirements, and convert the Stacker's single_location parameter to make use of it. 2016-12-29 15:21:39 +00:00
Mike Auty 7f0fb89da5 We don't need to check the element's type twice. 2016-12-29 15:20:44 +00:00