Commit Graph
79 Commits
Author SHA1 Message Date
Mike Auty ea629591ef Plugins: Make open method clearer to use
This highlights that the FileHandler class can also be seen as a method
similar to open, and it removes unnecessary context managers, allowing
plugins to close files as they wish (they must, however, remember to
close the file for it to be committed).
2020-10-29 09:43:16 +00:00
Mike Auty b703210024 Windows: Refactor names of FileInterfaces 2020-10-29 09:43:16 +00:00
Mike Auty 032c6b0ac7 Windows: Make more use of plugin.open 2020-10-29 09:43:16 +00:00
Mike Auty 7cadbf32d4 Windows: Update dumping code from commit to close 2020-10-29 09:43:16 +00:00
Mike Auty e8fb8c929c Plugins: Introduce FileHandlerInterface 2020-10-29 09:43:16 +00:00
Mike Auty 7e63ed4815 Plugins: Allow None types in the configuration tree as values 2020-10-03 22:02:40 +01:00
Mike Auty 4a8ce9f104 Plugins: Relent on not allow default to be Optional 2020-09-02 11:27:53 +01:00
Mike Auty 96b68b9cdc Plugins: Don't ever insert an invalid value 2020-09-02 11:13:39 +01:00
Mike Auty 6caebee079 Plugins: Populate optional defaults in plugin initialization
Fixes issue #324.
2020-08-31 23:10:22 +01:00
Mike Auty 7afc4bfec7 Core: Fix verison typos 2020-08-26 22:04:50 +01:00
Mike Auty 8e420cbe62 Core: Multiple typing fixes across the tree 2020-08-16 22:22:24 +01:00
Mike Auty 3eb463475b Core: Refactor versioning and associated requirements 2020-07-29 20:18:03 +01:00
Mike Auty 573590878a SymbolTable: Rework symbol_shift so it's part of the config 2020-06-10 19:39:20 +01:00
Mike Auty c7ea30b059 Core: Add in framework version check for plugins 2020-06-02 00:08:01 +01:00
Mike Auty 9ac622afa0 Fix up import style to be consistent. 2019-10-01 23:46:02 +01:00
Mike Auty e0b9d72c84 Update the license URL and LICENSE.txt 2019-09-25 21:44:05 +01:00
Mike Auty e922cef316 Improve docstrings for all plugins, and reformat all docstrings. 2019-09-07 22:59:54 +01:00
Mike Auty c88044db5b Update more API documentation. 2019-09-04 00:34:55 +01:00
Mike Auty 9cde94bceb Change the license blurb on all files. 2019-08-27 23:11:00 +01:00
Mike Auty 71bb54379b Refactor the plugin versioning to be simpler to define. 2019-08-27 21:08:29 +01:00
Mike Auty a58f064ea8 Rework how the plugin_version is checked. 2019-08-27 21:08:29 +01:00
Mike Auty 11fc8654e3 Initial attempt at plugin versioning.
So this allows people to alter the APIs for their plugins and allows
plugins to verify the API is compatible with the one they expect.

It adds a version property to Plugin classes, and has a SemVer checking
method which can be called from other plugins to verify a plugin against
a particular version.
2019-08-27 21:08:29 +01:00
Mike Auty af07615c73 Fix minor documentation warnings. 2019-08-23 21:08:10 +01: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 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