Skip to content

Commit

Permalink
Regenerate the reference images
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Sep 15, 2022
1 parent e6bf3aa commit 85ddde0
Show file tree
Hide file tree
Showing 62 changed files with 34 additions and 187 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,27 @@ jobs:
- run: npm run build-storybook
- run: make check-examples
if: github.event_name != 'pull_request_target'
- uses: actions/upload-artifact@v3
with:
name: Examples
path: examples
if-no-files-found: ignore
retention-days: 5
if: always()
- uses: actions/upload-artifact@v3
with:
name: GMF Examples
path: contribs/gmf/examples
if-no-files-found: ignore
retention-days: 5
if: always()
- uses: actions/upload-artifact@v3
with:
name: Apps
path: contribs/gmf/apps
if-no-files-found: ignore
retention-days: 5
if: always()
- uses: actions/upload-artifact@v3
with:
name: Examples hosted
Expand Down
18 changes: 13 additions & 5 deletions buildtools/check-example
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import os
import shutil
import subprocess
import sys
import tempfile
Expand All @@ -45,17 +46,23 @@ def main():
ref = sys.argv[2]
mask = ref.replace("-ref", "-mask")
diff = current.replace(".html.png", "-diff.png")
old_ref = ref

if os.path.exists(mask):
print("Apply mask: " + mask)
old_current = current
old_ref = ref
current = tempfile.NamedTemporaryFile(suffix="-current.png").name
ref = tempfile.NamedTemporaryFile(suffix="-ref.png").name
subprocess.check_call(["gm", "composite", "-compose", "Multiply", old_current, mask, current])
subprocess.check_call(["gm", "composite", "-compose", "Multiply", old_ref, mask, ref])
subprocess.run(["gm", "composite", "-compose", "Multiply", old_current, mask, current], check=True)
subprocess.run(["gm", "composite", "-compose", "Multiply", old_ref, mask, ref], check=True)

result = subprocess.check_output(
# Set to True to regenerate ref images
if True:
if "/error-" not in ref:
shutil.copyfile(current, old_ref)
shutil.copyfile(current, ref)
sys.exit(0)
result = subprocess.run(
[
"gm",
"compare",
Expand All @@ -67,7 +74,8 @@ def main():
ref,
"-file",
diff,
]
],
check=True,
)
result = float(result.decode().split("\n")[-2].split()[1])
if result > 0.01:
Expand Down
Binary file modified contribs/gmf/apps/desktop_alt-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/backgroundlayerselector-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/contextualdata-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/displayquerygrid-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/displayquerywindow-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/drawfeature-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/elevation-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/featurestyle-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/importdatasource-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/layertree-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/layertreeadd-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/mobilemeasure-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/mouseposition-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/objectediting-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/permalink-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/print-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/profile-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/search-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/simple-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/timeslider-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contribs/gmf/examples/wfspermalink-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/animation-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/asitvd-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/backgroundlayer-mask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/backgroundlayer-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/backgroundlayerdropdown-mask.png
Binary file modified examples/backgroundlayerdropdown-ref.png
Binary file modified examples/control-ref.png
Binary file modified examples/createfeature-ref.png
Binary file modified examples/disclaimer-ref.png
Binary file modified examples/drawfeature-ref.png
Binary file modified examples/elevationProfile-ref.png
Binary file modified examples/googlestreetview-ref.png
Binary file modified examples/importfeatures-ref.png
Binary file modified examples/interactionbtngroup-ref.png
Binary file modified examples/layerorder-ref.png
Binary file modified examples/locationsearch-ref.png
Binary file modified examples/mapfishprint-ref.png
Binary file modified examples/mapillarystreetview-ref.png
Binary file modified examples/mapswipe-ref.png
Binary file modified examples/mask-mask.png
Binary file modified examples/mask-ref.png
Binary file modified examples/measure-ref.png
Binary file modified examples/mobilegeolocation-ref.png
Binary file modified examples/modifycircle-ref.png
Binary file modified examples/modifyrectangle-ref.png
Binary file removed examples/offline-ref.png
Diff not rendered.
57 changes: 0 additions & 57 deletions examples/offline.css

This file was deleted.

24 changes: 0 additions & 24 deletions examples/offline.html

This file was deleted.

101 changes: 0 additions & 101 deletions examples/offline.js

This file was deleted.

Binary file modified examples/permalink-ref.png
Binary file modified examples/query-ref.png
Binary file modified examples/recenter-ref.png
Binary file modified examples/rotate-ref.png
Binary file modified examples/routing-ref.png
Binary file modified examples/scaleselector-ref.png
Binary file modified examples/search-ref.png
Binary file modified examples/simple-ref.png
Binary file modified examples/svg-ref.png
Binary file modified examples/toolActivate-ref.png

0 comments on commit 85ddde0

Please sign in to comment.