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.
this works. A few things to consider:
maybe the --grid CLI option is redundant for ivtile since I don't know why you wouldn't always specify fields -- if you don't specify anything, no data is passed, so that seems useless. Still, it seems legal, so it seemed wise to allow people to publish the grids with no fields.
Also, the skip-if-exists code doesn't deal with the real possibility that the image exists but the JSON doesn't. It seemed complicated to refactor that to test one or the other. Perhaps the grid renderer should be independent of the image rendering, but that would be a different kind of refactor. I opted for reasonably expedient and someone else can do the next pull request!