
Does anyone know if the tests in the plot-test
package are run by the builds that produce the Racket snapshot releases? Or any other build? Most of these tests are “manual”, i.e. one has to run the code in the file, produce a plot and look at the plot, but some of the tests are automated.

- All the tests are run continuously by DrDr, you can see the results here: http://drdr.racket-lang.org/54945/racket/share/pkgs/plot-test/plot/tests/ and here for Racket CS: http://drdr.racket-lang.org/54945/cs/racket/share/pkgs/plot-test/plot/tests/

- The tests are built but not run by (some of) the snapshots; search for plot-test here: https://plt.eecs.northwestern.edu/snapshots/current/log/%7B1%7D%20Racket%20plus%20Tests%20\|%20%7B3%7D%20Linux%20\|%2064-bit%20x86_64%20natipkg;%20built%20on%20Debian%20Wheezy for example.

- You can arrange to get email about failures on DrDr by having your email address appear in the
responsible
field of info.rkt, as described here: https://docs.racket-lang.org/raco/test.html?q=test-respon#%28part._test-config%29

Thanks for the clarifications. Most of the tests however will create plots, but there is no verification for correctness, i.e. all the tests do is check that there are no exceptions raised while running the tests, but if the plot command suddenly starts producing empty plots, this would not be picked up.

also, there is a compile-omit-paths
key in the info.rkt file which means that none of the test files are built when the plot-tests package is installed.

Right (although no exceptions as a test does catch a lot of failures).

But we can do more :slightly_smiling_face:

with regards to setting myself as the responsible party for a test, what exactly is the “key”. I.e. how does drdr determine from a key such as “samth”, “robby” or “mflatt” what the email address is? Put it differently, what should I put in that field to get emails myself?

Right. Note that just adding files to plot-test (or anywhere else in the collection) will cause them to be automatically run by DrDr.

You should put your email address there. Names without domains go to @racket-lang.org addresses (which you can have if you want but doesn’t seem that useful).

ok, so an email address is a valid value, I’ll do that.

The about page on DrDr is also a useful guide, although I don’t remember if it discusses this exact issue.

with regards to tests, I was thinking of adding validation for the draw commands themselves, which would allow picking up changes in rendering. You can see the work in progress here: https://github.com/racket/plot/pull/61

the problem is that they are machine specific, so I’ll need to think about that

if these tests will run on multiple platforms

One option that’s used for redex is comparing with reference images. I think that is just run on specific platforms for which the images are created.

Another option would be to serialize in some other way (to SVG or PDF)

the way I have done it was to use a record-dc%
and compare the draw commands themselves

this way, with some skill, one can identify which part is actually different

That’s a nice approach

problem is that different machine have different fonts, so ticks and labels are drawn in slightly different positions

Yeah, fonts are tricky. That’s definitely an issue for the redex tests too.

In any case, I just wanted to understand how and where the package is built, to know where to look in case I break something. Also, given that 7.8 will be released soon, I won’t make any changes until after that release. Thanks for pointing me to drdr.

I believe that changes now won’t appear in the release (unless you merge them to the release branch in plot) so you don’t need to worry at the moment

Yes, I meant merging them to the plot master branch — I

I will keep experimenting on my own separate branch

Sorry, I guess I was unclear. John Clements’ message from July 1 lists the 7th as “branch day”. After that point, release candidates and the eventual 7.8 release are built from the release
branch of all the relevant repositories (including plot
), or from the commit that was HEAD
on that day if there’s no release
branch. So if you commit something to master
today, it won’t appear in 7.8 unless you also create a branch named release
and cherry-pick that commit onto the release
branch.

Also in that message he lists the 15th as when testing begins — at that point, before merging something to the release
branch you should discuss with John.

#quickscript-competition week two
Prizes: In addition to the glory and admiration of your peers… If you participate once, you get stickers, if you participate twice time, you get also a mug, if you participate three times, you get also a t-shirt (while stocks last) You can participate more than once per week.
Thank you to the participants in week 1: • https://github.com/Quickscript-Competiton/July2020entries/issues/4\|Breakout by Jens Axel Søgaard : The classic Breakout game in a single script! • https://github.com/Quickscript-Competiton/July2020entries/issues/3\|Format-selection by Alex Harsányi : Format comments to the Racket Style Guide standard. • https://github.com/Quickscript-Competiton/July2020entries/issues/2\|Robo-Head-Pat by https://github.com/Quickscript-Competiton/July2020entries/issues?q=is%3Aissue+is%3Aopen+author%3ALambduli\|Lambduli : It is like a good work sticker on your homework - but for code. • <https://github.com/Quickscript-Competiton/July2020entries/issues/1|Rot13 Decode/Encode> by Karrq : Fraq naq qrpbqr frperg zrffntrf yvxr Wnzrf Obaq! Don’t forget to check them out!
PSA: You don’t need to install Quickscript - it is bundled in DrRacket!
*Week 2…*starts with a bang with two awesome entries by Laurent Orseau: • <https://github.com/Quickscript-Competiton/July2020entries/issues/6|Letterfall: See you code fall like rocks!> • <https://github.com/Quickscript-Competiton/July2020entries/issues/5|Run this quickscript to install all scripts from the competition!> Looking for ideas? • make a Code-Prettify script that uses https://www.cs.utah.edu/plt/snapshots/current/doc/reference/pretty-print.html?q=pretty#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29\|pretty-print and reindent to prettify code. More at https://github.com/Quickscript-Competiton/July2020entries/blob/master/IDEAS.md
Enjoy! Stephen

Re: comparisons of plot output, could there be a testing record-dc%
that worked consistently across platforms for test purposes?

I think that’s hard because if you measure something and then use it to place something else the output still wouldn’t be consistent, I think, unless you ensured you had the same fonts and other platform behavior.

I was thinking faking out the font metrics. Essentially mock out all of the drawing bits. It may be more trouble than it’s worth though.

I think that would be cool but also hard.

Yeah estimating project complexity is one of my weak points…

It seems the picture is wrong?


why? The last line say a+d < h, as in the picture, no?

You are right. I saw the pict. Read the next sentence and compared and a+d=h didn’t hold. Didn’t read further …

Finally realized, why cropping a chess piece didn’t work. The font has the wrong descent.

is that your own thing or the chess
package?

My own thing. I am attempting to draw a chess board.

Thought it would be easy, but the unicode chess characters doesn’t have a mask.


The problem is drawing a hatched field below the piece.

The unicode characters are transparent. So just drawing the character on top of a hatched field doesn’t work.

I can get the text-outline as a series of curves. This works reasonably well to make a mask. But … getting the mask and the piece to line up afterwards is tricky.

at that point I think just using svg drawings of the pieces would be a better way to go than fonts

That’s a good backup plan (if I can find drawings with masks). I was hoping to make some general - so it also works with other board games.

there are actualy ways to deal with the font problem, I just didn’t have time to experiment with a solution yet

in the eval-test files is where i tried to use them. they were on the same folder as the language.

how do i make queries in xexp? i used html-parsing to parse a page, but i need to get certain elements by id like with css selectors, but the xpath thingie is for absolute paths, sxml-match recommended https://docs.racket-lang.org/sxml-intro/index.html\|here under tools doesn’t exist anymore, or rather it says is still in PlaneT

you’d use the id attribute of xpaths. something like (it’s been a while): //tag[@id="id"]

but does it search recursively in the children?

weird… it works… question what does the double slash do?

is it like a wildcard?

ok, im dumb, when it didnt seem to work the first couple of times i just thought it didnt work like that

@massung thank you, you made me realize how it actually works


a great site :slightly_smiling_face:

glad it’s working for you now

thank you, it’s very handy