dandi / dandi-api-webshots-tools

0 stars 0 forks source link

Run screenshotting in subprocesses #1

Closed jwodder closed 3 years ago

jwodder commented 3 years ago

Closes https://github.com/dandi/dandi-api-webshots/issues/19.

jwodder commented 3 years ago

@yarikoptic edit-metadata fixed. What do you mean by "landing are changed"?

yarikoptic commented 3 years ago

@yarikoptic edit-metadata fixed. What do you mean by "landing are changed"?

There was a diff to landing.png for dandisets on staging, although I would've expected them to be the same

jwodder commented 3 years ago

@yarikoptic Do the images actually look different, or is it just a binary difference? Perhaps something on staging changed.

yarikoptic commented 3 years ago

@yarikoptic Do the images actually look different, or is it just a binary difference? Perhaps something on staging changed.

please make a run on a few dandisets on master branch and then this one, and compare images if anything changes.

FWIW here is the `imgdiff` I use ``` #!/bin/bash set -u out=`mktemp --dry-run`.png #trap "rm -rf $out" 0 mode=${IMGDIFF_MODE:-lum} echo "Invoked with $@ . out=$out" >> /tmp/log ls -ld "$@" >> /tmp/log #shift # recipes from https://stackoverflow.com/questions/5132749/diff-an-image-using-imagemagick case $mode in # to make it RG difference on top of common grayscale lum) convert '(' "$1" -flatten -grayscale Rec709Luminance ')' \ '(' "$2" -flatten -grayscale Rec709Luminance ')' \ '(' -clone 0-1 -compose darken -composite ')' \ -channel RGB -combine $out;; # darker $1 with blue diff on top bluediff) compare \ "$1" "$2" \ -highlight-color blue \ $out;; compose) compare -compose src "$1" "$2" "$out";; esac display $out #rm -f $out ```

and I have

$> git config --list | grep imgdiff
alias.imgdiff=difftool -x imgdiff --no-prompt
difftool.imgdiff.cmd=imgdiff
jwodder commented 3 years ago

@yarikoptic I ran the script on Dandisets 000003 through 000009 on staging, and the only differences were that, for Dandisets other than 000003, the "Edit Metadata" button in the landing snapshot was highlighted when snapshotted with the master code but not with the branch code; also, for 000006/view-data, the master code had one of the folders highlighted.

yarikoptic commented 3 years ago

tested too -- no differences now. Thank you! Let's proceed