Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HitOrMissMonteCarlo Test Added with Minor change in timeout setting #35

Closed
wants to merge 2 commits into from

Conversation

lazycipher
Copy link
Contributor

I've added HitOrMissMonteCarlo Test for Hard Test of Animated interactive ggplots
I had to change the setImplicitTimeout method as it wasn't working and seems to be defunct.

@lazycipher
Copy link
Contributor Author

@tdhock @faizan-khan-iit I've added a test for Hit or Miss Monte Carlo Integration and Pi value estimation.
Please let me know if any changes are required!

x1_nodes <- getNodeSet(info$html, "//g[@class='geom2_point_vizone']/g[@class='PANEL1']/circle/@cx")
y1_nodes <- getNodeSet(info$html, "//g[@class='geom2_point_vizone']/g[@class='PANEL1']/circle/@cy")

Sys.sleep(1.739)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this number ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took the reference from other successful tests. Sys.sleep() is used to pause the program for the specified time so that next reading can be taken. I used the same time as in other tests.

@tdhock
Copy link
Collaborator

tdhock commented Mar 23, 2020

great start but would be even better if you could edit the .travis.yml config to fix the build system error. I reported the issue here ropensci/RSelenium#230 but no response. maybe you could try upgrading the version of RSelenium used in DESCRIPTION?

@lazycipher
Copy link
Contributor Author

Okay, sure thing!
I'll upgrade the RSelenium version. There have been some breaking changes from the currently used version and the latest version. I'll take a look and make it work.


coordPanel2 <- getNodeSet(info$newHtml, "//g[@class='geom5_path_viztwo']/g[@class='PANEL1']/path/@d")

expect_false(identical(coordPanel1, coordPanel2))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this test assume that getNodeSet will always return the rendered points in the same order? I would prefer not to check it this way because even if the plot is not rendering any new points if getNodeSet returns them in a different order, this test might pass. Though if you are sure about the ordering, no changes needed. To me, the length of the retrieved nodes is a better indicator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess checking the length of retrieved nodes is a better indicator. I'll make changes and push as soon as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hii @tdhock, @faizan-khan-iit,
I observed that the points are being rendered in order.
I checked and found this about the order.
Screenshot from 2020-04-14 13-29-29
Screenshot from 2020-04-14 13-30-17

So, the identical check is good to go. But if you say I can move to length check which will also work!

@tdhock
Copy link
Collaborator

tdhock commented Mar 29, 2020 via email

@lazycipher
Copy link
Contributor Author

great start but would be even better if you could edit the .travis.yml config to fix the build system error. I reported the issue here ropensci/RSelenium#230 but no response. maybe you could try upgrading the version of RSelenium used in DESCRIPTION?

@tdhock, Looks like the error didn't occur this time which occurred last time. But different error occurred this time which is in renderer5 and compiler. Have a look please? https://travis-ci.org/github/tdhock/animint2/builds/674748257

The command "Rscript -e 'deps <- remotes::dev_package_deps(dependencies = NA);remotes::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'" failed and exited with 1 during .

@tdhock tdhock closed this Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants