Message-ID: <ca720041-c464-cb05-48c2-e80bcdf03e05@statistik.tu-dortmund.de>
Date: 2019-03-05T12:38:06Z
From: Uwe Ligges
Subject: [R-pkg-devel] CRAN submission examples don't run
In-Reply-To: <CANiCS6VcUKAA1TQiXTiVsiQmm8-TcYqTBEz9q+SNGPcn7Mq9zg@mail.gmail.com>
On 05.03.2019 12:59, Horia Yeb wrote:
> Hi and thank you Joris for the response,
>
> Seeing as my functions are interactive, wouldn't the CRAN check (on
> submission) return errors seins that it won't run any of the examples
> because they are interactive?
Well it did in a way as the check was not finished and only retunred
after a very lng time when the web broweser job got killed.
Best,
Uwe Ligges
> Sorry if the questions sound dumb!
>
> Regards,
> Timothy
>
> On Tue, 5 Mar 2019 at 12:56, Joris Meys <Joris.Meys at ugent.be
> <mailto:Joris.Meys at ugent.be>> wrote:
>
> Dear Timothy,
>
> Uwe meant to include that code in the _examples_, not in your actual
> functions. Whenever an example is expected to open a web page, use
> if(interactive()) to avoid it from being run by the test
> infrastructure.
>
> On a sidenote: It would make sense to add this as a first check to
> functions which can only work when called interactively. That's up
> to you. However, beware of errors created when the function is not
> run interactively, as this would also cause your examples to give
> errors.
>
> Cheers
> Joris
>
> On Tue, Mar 5, 2019 at 11:56 AM Horia Yeb <horia.yeb at gmail.com
> <mailto:horia.yeb at gmail.com>> wrote:
>
> Thank Uwe for the answer,
> But the purpose of the package is ?when the input data is dealt
> with? open
> a .html page. Does that mean in my R code I should write :
> [....]
> if(interactive())
> {
> ? ? .Call(C++ code)
> }
> In my c++ code the interactive part is a
> *system(html_path);*? ? is
> there an equivalent C++ condition to check if interactive?
>
> So either I protect the whole C++ function with the interactive
> check,
> either I protect the system() call?
>
> Thanks, Uwe for the interactive() function I'm new to R and
> don't know all
> the functions.
>
> Regards,
> Timothy
>
> On Tue, 5 Mar 2019 at 11:35, Uwe Ligges
> <ligges at statistik.tu-dortmund.de
> <mailto:ligges at statistik.tu-dortmund.de>>
> wrote:
>
> > Apparently your checks wait for the brower beeing closed.
> >
> > Do not expect interactions in the examples. Please only run non
> > interactive functionality in the examples and enclose
> ingteractice parts
> > within
> >
> > if(interactive()){
> >
> > ...}
> >
> > Best,
> > Uwe Ligges
> >
> >
> >
> > On 05.03.2019 11:10, Horia Yeb wrote:
> > > Hi all,
> > > I am still trying to submit my first package, I've
> corrected a few bibs
> > and
> > > bobs and submitted with running examples. On my computer
> running check
> > > --as-cran, the examples run perfectly, but on submission
> they don't seem
> > to
> > > run for some reason.
> > > Here is the return from submission, 3 NOTEs ( the first one
> is checking
> > > CRAN incoming feasibility ...) .
> > >
> > > ----
> > > [snipet]
> > >
> > > * checking compiled code ... OK
> > > * checking examples ...
> > > ** running examples for arch 'i386' ... [53m] NOTE
> > > Examples with CPU or elapsed time > 10s
> > >? ? ? ? ? ? ? ? ? user system elapsed
> > > DataViz-package 0.05? ?0.02 1844.87
> > > throwchart? ? ? 0.03? ?0.00 1319.79
> > > ** running examples for arch 'x64' ... [49m] NOTE
> > > Examples with CPU or elapsed time > 10s
> > >? ? ? ? ? ? ? ? ? user system elapsed
> > > DataViz-package 0.03? ?0.00 1319.66
> > > throwchart? ? ? 0.02? ?0.01 1619.35
> > > * checking PDF version of manual ... OK
> > > * DONE
> > > Status: 3 NOTEs
> > > ----
> > >
> > >
> > >
> > >
> > > So I think that the examples aren't running at all rather
> than taking 50m
> > > to run. The examples run an R function calling C++ function
> that
> > > systematically opens an .html file in a browser. I could
> see this as a
> > > problem maybe?
> > >
> > > When looking at the pdfs in the package.check in examples
> the pdf file
> > > "Package-Ex" is? ?empty/not working , could this be a
> reason for the
> > > malfunction? Or is it normal?
> > > Here is the report :
> > >
> >
> https://win-builder.r-project.org/incoming_pretest/DataViz_0.2_20190228_113204/Windows/00check.log
> > >
> > >
> > >
> > > Any help would be appreciated!
> > > Regards,
> > >
> > > Timothy
> > >
> > >? ? ? ?[[alternative HTML version deleted]]
> > >
> > > ______________________________________________
> > > R-package-devel at r-project.org
> <mailto:R-package-devel at r-project.org> mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> > >
> >
>
> ? ? ? ? [[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel at r-project.org
> <mailto:R-package-devel at r-project.org> mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
>
>
> --
> Joris Meys
> Statistical consultant
>
> Department of Data Analysis and Mathematical Modelling
> Ghent University
> Coupure Links 653, B-9000 Gent (Belgium)
> <https://maps.google.com/?q=Coupure+links+653,%C2%A0B-9000+Gent,%C2%A0Belgium&entry=gmail&source=g>
>
> tel: +32 (0)9 264 61 79
> -----------
> Biowiskundedagen 2017-2018
> http://www.biowiskundedagen.ugent.be/
>
> -------------------------------
> Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
>