cytoscape / cyjShiny

An R/shiny widget for cytoscape.js
Other
92 stars 28 forks source link

first cyjShiny automated test #33

Closed paul-shannon closed 3 years ago

paul-shannon commented 3 years ago

@Dharna5599 and I discussed this today.

I propose her first task is to create a minimalist cyjShiny app, say a 3-node, 3-edge graph, default styling, then evaluate the available shiny test strategies, producing an automated test which runs on any host which has an actual of virtual (headless) web browser. The test criteria could be built around these methods:

  1. getNodes()
  2. getEdges()
  3. getGraph()
  4. getNodePositions()

In each case the returned value is easily checked against the original graph.

The test is to be executed from the shell, not interactively:

make   # builds igvShiny from source
make test # runs all tests, initially just the one sketched out above

The tests will also be run on new commits using whatever CI system we settle on. The addition of this first test, though modest in scope, will be a huge benefit to the project.

Dharna5599 commented 3 years ago

Hi @paul-shannon, I've figured out the task and have begun working on it l. I intend to start by creating a cyjShiny app in which I will use three nodes and edges, as well as the default style, and then I will add the Shiny test and learn how to use the virtual web browser.

paul-shannon commented 3 years ago

Great! Be sure to commit your files early and often - even if they do not yet work.

One benefit of this is that I can follow your progress, learn from your efforts, maybe now and again make suggestions.

Thank you!

On May 26, 2021, at 9:29 AM, Dharna Chandrakar @.***> wrote:

Hi @paul-shannon, I've figured out the task and have begun working on it l. I intend to start by creating a cyjShiny app in which I will use three nodes and edges, as well as the default style, and then I will add the Shiny test and learn how to use the virtual web browser.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Dharna5599 commented 3 years ago

Yes sure, I'll do my best to complete the task as quick as possible, and keep you updated on my progress of work everyday via slack or mail. And I'll contact you if I get stuck in the middle.

cannin commented 3 years ago

For CI, I suggest GitHub Actions (see #32). It would be good to try: https://rstudio.github.io/shinytest/articles/shinytest.html Even before browser-based tests, basic CRAN checks should pass.

paul-shannon commented 3 years ago

CRAN - perhaps Bioconductor instead? RCy3 has been in bioc for several years.

On May 26, 2021, at 2:38 PM, Augustin Luna @.***> wrote:

For CI, I suggest GitHub actions (see #32). It would be good to try: https://rstudio.github.io/shinytest/articles/shinytest.html Even before browser-based tests, basic CRAN checks should pass.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Dharna5599 commented 3 years ago

Hey @paul-shannon, I have pushed the PR for the first cyjShiny automated test. Kindly review it.

paul-shannon commented 3 years ago

thanks @Dharna5599 - a great start.

I now propose a -simpler- version of that test:

Related to this, and as a big improvement over my existing package structure, we want to soon move all the demos to an inst/demos directory, and have only command-line-callable tests in the unitTests directory

Also, related, read up about R CMD check. Our package needs to pass check without errors, daily. The unit tests will be run as part of R CMD check guaranteeing that everything is working, or that at least we know quickly when they are broken.

For the spirit of unit testing, see this bioc page, written by me long ago, since improved by Jim Hester: http://bioconductor.org/developers/how-to/unitTesting-guidelines/

Dharna5599 commented 3 years ago

Thank you @paul-shannon, I've figured out the purpose of the second task. Now I'll try it with the most basic cyjShiny app and see how it runs in the bash shell. Finally, I'll start learning about the R CMD check command and refer to the URL you supplied and make every effort to follow your instructions.

paul-shannon commented 3 years ago

this issue was part of finding our way into a robust testing strategy, now demonstrated in unitTests/test_selection.R with that strategy settled upon, I am closing this issue, starting new issues, one per cyjShiny R/js feature