Export ValidationConfig File as Topping #998
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since quite some time we are able to store the path to the validation configuration file as project variable, so we have it always in the validator:
This variable could be exported so far to the project topping but if the file is not stored on a accessible drive the project using this topping could not access to it.
Topping Export
That's why with this PR you have the option in the Topping Exporter to create a topping file from the variable with the name "validator_config" that is stored at the topping files.
Means we have now the validation-config.ini file in the toppings and link over the variable to the
ilidata:
key.Topping Import
But what happens on project create with this topping?
Nothing :-) It keeps the
ilidata:
key in the variable. This means in the Validator we see theilidata:
key as well. And this can be used then on validation (passing this key as--validConfig
to ili2db).Why the file is not downloaded
This because we are not able to download and store the file, since we do not know where to store it. Next to the project? Maybe, but on generating a project there will not be a project stored. So it needs to be an interaction with the user.
Future idea
If it is required to get the file again locally, then an implementation might be done in the validator, to download the file and store it next to the project and replace the variable with the relative path
(mockup)
Resolves #829
Requires opengisch/toppingmaker#14 and with this a new library