Commit Graph
33 Commits
Author SHA1 Message Date
Mike Auty 24be045266 Minor fix ups with typing and exceptions. 2018-02-10 22:42:31 +00:00
Mike Auty e23bb65162 Add in better logging. 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 9d7d547667 Minor linting. 2017-11-04 18:45:18 +00:00
Mike Auty a4b4a8eed3 Improve the error handling with automagics. 2017-11-04 18:45:08 +00:00
Mike Auty 8166b0cc96 Add better logging around the stacker. 2017-11-04 17:13:01 +00:00
Mike Auty 4b7543f2f4 Unify the resource opening. 2017-11-02 21:46:39 +00:00
Mike Auty dbc73df8f2 Make sure we support windows filenames
Consider refactoring out the various URL openning code into
one that just returns the open file handle.  This would require changing
the config option of "filename" to "location" and rejigging a few other
bits elsewhere, but would centralize and make it more managable.
2017-11-02 11:56:03 +00:00
Mike Auty 06767bd44c Ensure we get a warning of some kind when a bad scheme is provided. 2017-10-05 00:13:45 +01:00
Mike Auty c6724a538a Initial support for compressed files. 2017-08-11 01:12:50 +01:00
Mike Auty b7c8c8a058 Improve the docstrings for automagic. 2017-07-29 12:53:35 +01:00
Mike Auty 8087f86bcf Remove debugging statements. 2017-07-20 00:51:03 +01:00
Mike Auty fbd70438a0 Slightly more error checking. 2017-07-20 00:49:56 +01:00
Mike Auty 03cdd91fbf Add in the capability to merge two config dicts (so that manually set settings aren't overwritten). 2017-07-20 00:49:36 +01:00
Mike Auty ff41d4e5b0 Improve config.json handling, making single_location optional but bypasses the stacker automagic. 2017-04-21 00:53:08 +01:00
Mike Auty 5d3ff13a6e Ensure LayerStacker's default doesn't get accepted blindly. 2017-01-08 18:08:13 +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 cafc09a6d3 Add dynmically generated command line parameters for the CLI.
Note this now requires the file to be specified with single-location,
it also requires a specific ordering of parameters.
2017-01-08 02:31:31 +00:00
Mike Auty 1af85d628f Remove the pointless class/instance variable. 2017-01-01 02:14:53 +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 aee4349e3c More documentation updates (and minor code cleanups). 2016-12-28 03:20:44 +00:00
Mike Auty bab71d4358 Refactor the progress_callback so it can be used in automagics.
Refactored the location of the progress_callback so that the UI can
specify it and ensure it is used by the automagics process as well as
the plugins themselves.

The progress_callback function has also had an optional description parameter
added, so that it can differentiated in case two scans happen
simultaneously.
2016-12-26 23:45:47 +00:00
Mike Auty 0f416b4765 Improve logging from the stacker. 2016-12-14 01:30:30 +00:00
Mike Auty eae84fd8e0 Ensure we only stack when needed
We shouldn't be stacking unless we're required, so now
we run after the construction phase, and run our own construction
phase is we've changed anything.
2016-12-12 02:06:54 +00:00
Mike Auty 5d15f810e1 Tidy up the config namespace around automagic a little. 2016-12-11 13:58:17 +00:00
Mike Auty fbe3682592 Allow stack functions to return None as a failure response. 2016-08-26 08:29:45 +01:00
Mike Auty 32bdeafa8a Improve the stacker to append the generated stack configuration into the original context. 2016-08-24 01:31:45 +01:00
Mike Auty 721d5ade3f Give the LowestLayer a proper name in the interim configs, and ensure it's in the stack. 2016-08-24 01:30:32 +01:00
Mike Auty 04b760ee3e Increase the priority so this is always run first, and we're going to use the requirement variable. 2016-08-24 01:29:53 +01: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 f48ee5ff33 Add in the actual stacking automagic. 2016-08-22 00:06:04 +01:00