Re: [R-pkg-devel] How do you make it possible to run the example that requires a Conda environment?

2025-03-07 Thread Brian G. Peterson
\dontrun{} is allowed by CRAN.  If your package got rejected for using
\dontrun{} I would guess that maybe your example needs a package that
isn't in "Suggests" in your DESCRIPTION file.  Even in \dontrun{} you
should still tell the user that certain packages may be needed to
access specific optional functionality.

-- 
Brian G. Peterson
ph: +1.773.459.4973
im: bgpbraverock

On Fri, 2025-03-07 at 07:36 -0800, Josiah Parry wrote:
> Whereas, I just had a CRAN submission fail for using \dontrun{} just
> once!
> 🙈
> 
> On Fri, Mar 7, 2025 at 06:47 McCrowey, Clinton via R-package-devel <
> r-package-devel@r-project.org> wrote:
> 
> > I wrapped my examples in \dontrun{} and the CRAN maintainers never
> > complained to me.
> > 
> > 
> > 
> > Clinton Mccrowey |  Physical Scientist | U.S. Environmental
> > Protection
> > Agency - Region III | Air and Radiation Division | Office Number:
> > 14-202 |
> > Air Quality Analysis Branch | Philadelphia, PA | Mail Code: 3AD40 |
> > Email:
> > mccrowey.clin...@epa.gov | Phone: 215-814-2157 | Fax: 215-814-2124
> > 
> > -Original Message-
> > From: R-package-devel  On
> > Behalf
> > Of Ivan Krylov via R-package-devel
> > Sent: Wednesday, February 26, 2025 6:50 AM
> > Cc: r-package-devel@r-project.org
> > Subject: Re: [R-pkg-devel] How do you make it possible to run the
> > example
> > that requires a Conda environment?
> > 
> > Caution: This email originated from outside EPA, please exercise
> > additional caution when deciding whether to open attachments or
> > click on
> > provided links.
> > 
> > 
> > В Wed, 26 Feb 2025 08:57:10 +
> > KABILAN S  пишет:
> > 
> > > if I submit the package to CRAN, the example is not running and
> > > returning an error message. Even if I mention \donttest{} to
> > > avoid the
> > > automatic checking of example, the CRAN team members are not
> > > allowing.
> > 
> > Does it help to use if (reticulate::py_module_available(...)) { ...
> > }
> > instead of \donttest{...} in your examples?
> > 
> > 
> > https://cran.r-project.org/web/packages/reticulate/vignettes/package.html#checking-and-testing-on-cran
> > 
> > --
> > Best regards,
> > Ivan
> > 
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> > 
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> > 
> 
> [[alternative HTML version deleted]]
> 
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] How do you make it possible to run the example that requires a Conda environment?

2025-03-07 Thread Josiah Parry
Whereas, I just had a CRAN submission fail for using \dontrun{} just once!
🙈

On Fri, Mar 7, 2025 at 06:47 McCrowey, Clinton via R-package-devel <
r-package-devel@r-project.org> wrote:

> I wrapped my examples in \dontrun{} and the CRAN maintainers never
> complained to me.
>
>
>
> Clinton Mccrowey |  Physical Scientist | U.S. Environmental Protection
> Agency - Region III | Air and Radiation Division | Office Number: 14-202 |
> Air Quality Analysis Branch | Philadelphia, PA | Mail Code: 3AD40 | Email:
> mccrowey.clin...@epa.gov | Phone: 215-814-2157 | Fax: 215-814-2124
>
> -Original Message-
> From: R-package-devel  On Behalf
> Of Ivan Krylov via R-package-devel
> Sent: Wednesday, February 26, 2025 6:50 AM
> Cc: r-package-devel@r-project.org
> Subject: Re: [R-pkg-devel] How do you make it possible to run the example
> that requires a Conda environment?
>
> Caution: This email originated from outside EPA, please exercise
> additional caution when deciding whether to open attachments or click on
> provided links.
>
>
> В Wed, 26 Feb 2025 08:57:10 +
> KABILAN S  пишет:
>
> > if I submit the package to CRAN, the example is not running and
> > returning an error message. Even if I mention \donttest{} to avoid the
> > automatic checking of example, the CRAN team members are not allowing.
>
> Does it help to use if (reticulate::py_module_available(...)) { ... }
> instead of \donttest{...} in your examples?
>
>
> https://cran.r-project.org/web/packages/reticulate/vignettes/package.html#checking-and-testing-on-cran
>
> --
> Best regards,
> Ivan
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] How do you make it possible to run the example that requires a Conda environment?

2025-03-07 Thread McCrowey, Clinton via R-package-devel
I wrapped my examples in \dontrun{} and the CRAN maintainers never complained 
to me.



Clinton Mccrowey |  Physical Scientist | U.S. Environmental Protection Agency - 
Region III | Air and Radiation Division | Office Number: 14-202 | Air Quality 
Analysis Branch | Philadelphia, PA | Mail Code: 3AD40 | Email: 
mccrowey.clin...@epa.gov | Phone: 215-814-2157 | Fax: 215-814-2124

-Original Message-
From: R-package-devel  On Behalf Of Ivan 
Krylov via R-package-devel
Sent: Wednesday, February 26, 2025 6:50 AM
Cc: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] How do you make it possible to run the example that 
requires a Conda environment?

Caution: This email originated from outside EPA, please exercise additional 
caution when deciding whether to open attachments or click on provided links.


В Wed, 26 Feb 2025 08:57:10 +
KABILAN S  пишет:

> if I submit the package to CRAN, the example is not running and
> returning an error message. Even if I mention \donttest{} to avoid the
> automatic checking of example, the CRAN team members are not allowing.

Does it help to use if (reticulate::py_module_available(...)) { ... } instead 
of \donttest{...} in your examples?

https://cran.r-project.org/web/packages/reticulate/vignettes/package.html#checking-and-testing-on-cran

--
Best regards,
Ivan

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel