Re: [R-pkg-devel] Using parallel:::sendMaster &c. despite warnings

2021-07-23 Thread git demont
AFAIK, you may use getFromNamespace to import non-exported function (e.g.
readChild <- getFromNamespace("readChild", "parallel") )
Although, I never use it myself for a package on CRAN

Concerning the unix only part, I don't know if it is acceptable or not,
If not, maybe it could be a good idea to have a package that can install on
all CRAN platform but to test OS and send a message to user whenever the
functionality is not available on its OS

Best,
Yohann Demont

On Fri, Jul 23, 2021 at 1:19 PM David Norris 
wrote:

> Because parallelized progress reporting in the futureverse.org incurs
> latencies too great for my application (
> https://github.com/HenrikBengtsson/progressr/issues/118), I have found it
> necessary to implement my own progress reporting using some of the
> non-exported functionality from `parallel`. (I do appreciate that Windows
> lacks the fork() system call, and will not support this. But am willing to
> make this an OS_type: unix-only package.)
>
> Of course, I get a WARNING for this:
>
> ── R CMD check results  precautionary
> 0.2.6 
> Duration: 6m 41.8s
>
> ❯ checking dependencies in R code ... WARNING
>   Unexported objects imported by ':::' calls:
> ‘parallel:::readChild’ ‘parallel:::selectChildren’
> ‘parallel:::sendMaster’
> See the note in ?`:::` about the use of this operator.
> Including base/recommended package(s):
> ‘parallel’
>
> Is this warning an absolute deal-killer on CRAN? Is there a 'correct' way
> to do `:::` that avoids the warning altogether?
>
> Kind regards,
> David Norris
>
> __
> 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


[R-pkg-devel] IFC package - Solaris error polygon edge not found (zero-width or zero-height?)

2021-09-16 Thread git demont
Hello community,

I plan to submit a new version of IFC package to CRAN.

I checked it locally, on win-builder and on rhub. Almost everything looks
OK except for:
- Debian Linux, R-devel, GCC ASAN/UBSAN
- Oracle Solaris 10, x86, 32 bit, R-release

On Debian Linux, R-devel, GCC ASAN/UBSAN, I get a PREPERROR, I suspect it
is a false pos since it says that xml2 package can not be installed.
My main concern is about Oracle Solaris 10, x86, 32 bit, R-release where
the function ExportToReport leads to the error reported in the title see:
https://artifacts.r-hub.io/IFC_0.1.2.tar.gz-0e84aed564a1488894eb7e34990443af/IFC.Rcheck/IFC-Ex.Rout

However I got no error on  Oracle Solaris 10, x86, 32 bit, R release,
Oracle Developer Studio 12.6

Some googling points to https://github.com/tidyverse/ggplot2/issues/2252.
The code of ExportToReport, is here
https://github.com/gitdemont/IFC/blob/master/R/ExportToReport.R,
The issue links this solaris error to ggplot but threads also mention grid
/ font...
So my guess is that it could be related with the fact that I apply font
modifications through gridExtra::ttheme_default and in pdf() by using
"serif" in ExportToReport

Do you think, this is only on rhub but will not happen on CRAN ?
I did several modifications since last CRAN update, but previous CRAN
version of IFC package already included those font family modifications in
ExportToReport (https://github.com/cran/IFC/blob/master/R/ExportToReport.R)
and did not produce solaris error in CRAN results (
https://cran.r-project.org/web/checks/check_results_IFC.html)

Nonetheless should it be safer to use other font family only for solaris ?
In such case what would you be your recommendations to check it (e.g.
Sys.info()["sysname"], I don't know the returned value on solaris) and to
apply another font family (but which one)

Maybe, it is something else. But, in such case, I have absolutely no idea
where it comes from what I can do.

Best,
Yohann

[[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] IFC package - Solaris error polygon edge not found (zero-width or zero-height?)

2021-09-16 Thread git demont
Replying to myself and with some additional investigations

I just tried once again on rhub - Oracle Solaris 10, x86, 32 bit, R-release
and got the same error with a conditional font family modification where
when
Sys.info()["sysname"] == "SunOS",
- pdf(), family argument is set to its default value "Helvetica"
- gridExtra::ttheme_default, base_family argument is se to its default
value ""
Otherwise, "serif" is used

In addition, the error in solaris shares "polygon edge not found" lately
reported by Iñaki Úcar
Though, I don't have the warning part, and mine is not happening during
vignette rebuilding

2021-Aug-10, [R-pkg-devel] "polygon edge not found" on macos-arm64
>Dear CRAN maintainers,
>
>I see there's a new WARN on the recently added macos-arm64 platform
>for quite a number of packages. Specifically, vignette rebuilding
>fails with "polygon edge not found" (example in [1]). In addition,
>there are a number of warnings like this:
>
>Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)) :
> no font could be found for family "Arial"
>
>Is this something package authors should worry about in submissions?
>
>[1] https://cran.r-project.org/web/checks/check_results_simmer.html

On Thu, Sep 16, 2021 at 12:15 PM git demont  wrote:

> Hello community,
>
> I plan to submit a new version of IFC package to CRAN.
>
> I checked it locally, on win-builder and on rhub. Almost everything looks
> OK except for:
> - Debian Linux, R-devel, GCC ASAN/UBSAN
> - Oracle Solaris 10, x86, 32 bit, R-release
>
> On Debian Linux, R-devel, GCC ASAN/UBSAN, I get a PREPERROR, I suspect it
> is a false pos since it says that xml2 package can not be installed.
> My main concern is about Oracle Solaris 10, x86, 32 bit, R-release where
> the function ExportToReport leads to the error reported in the title see:
> https://artifacts.r-hub.io/IFC_0.1.2.tar.gz-0e84aed564a1488894eb7e34990443af/IFC.Rcheck/IFC-Ex.Rout
>
> However I got no error on  Oracle Solaris 10, x86, 32 bit, R release,
> Oracle Developer Studio 12.6
>
> Some googling points to https://github.com/tidyverse/ggplot2/issues/2252.
> The code of ExportToReport, is here
> https://github.com/gitdemont/IFC/blob/master/R/ExportToReport.R,
> The issue links this solaris error to ggplot but threads also mention grid
> / font...
> So my guess is that it could be related with the fact that I apply font
> modifications through gridExtra::ttheme_default and in pdf() by using
> "serif" in ExportToReport
>
> Do you think, this is only on rhub but will not happen on CRAN ?
> I did several modifications since last CRAN update, but previous CRAN
> version of IFC package already included those font family modifications in
> ExportToReport (https://github.com/cran/IFC/blob/master/R/ExportToReport.R
> )
> and did not produce solaris error in CRAN results (
> https://cran.r-project.org/web/checks/check_results_IFC.html)
>
> Nonetheless should it be safer to use other font family only for solaris ?
> In such case what would you be your recommendations to check it (e.g.
> Sys.info()["sysname"], I don't know the returned value on solaris) and to
> apply another font family (but which one)
>
> Maybe, it is something else. But, in such case, I have absolutely no idea
> where it comes from what I can do.
>
> Best,
> Yohann
>
>
>
>

[[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] IFC package - Solaris error polygon edge not found (zero-width or zero-height?)

2021-09-24 Thread git demont
I had very hard time with this error. But I think I have solved it now.
I made several tests recently trying to identify where it came from.
This cryptic error was not random, I was able to reproduce it.

It only appeared on rhub  Oracle Solaris 10, x86, 32 bit, R-release and not
on rhub  Oracle Solaris 10, x86, 32 bit, R release, Oracle Developer Studio
12.6

It happened when I try to grid.draw a gtable object produced by
gridExtra::arrangeGrob
This gtable object is produced without any errors and consists of a lattice
plot (transformed with grob()) + a tableGrob() of a small matrix.

If I grid.draw the lattice plot (transformed with grob()) alone, I got no
error
If I grid.draw the tableGrob() alone, I got no error
However, when I tried to draw the combination of both, I was getting the
error:
grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y,  :
  polygon edge not found (zero-width or zero-height?)
Calls: [my function name] ...  -> heightDetails ->
heightDetails.text -> grid.Call

This error only occurred with one of the graphs I wanted to produce (number
5).
In my tests, I also included another graph (number 4) which did not lead to
any error.

Luckily, I found a blog by Dana Paige Seidel
https://www.danaseidel.com/2018-09-01-ATidySummer/ with a chapter called
"The bug of grid destiny" that pointed to scales "this particular error is
triggered when special characters are used in axis tick labels". This was
really helpful because the scale was indeed one of the differences between
graph4 and graph5.
graph5 has a log-like scale whereas graph4 has a linear scale. To further
test this I produced graph4 with a log-like scale and graph5 with a linear
scale and this time the error happened with graph4.

All this was a long quest, because each time I had to tweak my code,
reupload it to rhub and wait for the artifacts to look at all the print and
str, ... things I had to introduce to understand were the bug came from. By
the way, many thanks to rhub people for providing us their amazing platform
to test our packages !

Looking deeper at the scales... For log-like, several ticks are drawn but
only main ticks are labelled with values, whereas for linear all ticks that
are displayed are labelled.
In the log-like scale the labels of the non-main ticks were labelled with
"".

My guess was that in some circumstances those "" produced text grobs with
non.finite height that triggered the error. Replacing the "" by " " (with a
whitespace) solved the issue

Though, I still can't explain why this only happened on Solaris nor why the
error is not triggered when the plot is drawn alone without the tableGrob.

FWIW,
Yohann


On Thu, Sep 16, 2021 at 3:14 PM git demont  wrote:

> Replying to myself and with some additional investigations
>
> I just tried once again on rhub - Oracle Solaris 10, x86, 32 bit,
> R-release and got the same error with a conditional font family
> modification where when
> Sys.info()["sysname"] == "SunOS",
> - pdf(), family argument is set to its default value "Helvetica"
> - gridExtra::ttheme_default, base_family argument is se to its default
> value ""
> Otherwise, "serif" is used
>
> In addition, the error in solaris shares "polygon edge not found" lately
> reported by Iñaki Úcar
> Though, I don't have the warning part, and mine is not happening during
> vignette rebuilding
>
> 2021-Aug-10, [R-pkg-devel] "polygon edge not found" on macos-arm64
> >Dear CRAN maintainers,
> >
> >I see there's a new WARN on the recently added macos-arm64 platform
> >for quite a number of packages. Specifically, vignette rebuilding
> >fails with "polygon edge not found" (example in [1]). In addition,
> >there are a number of warnings like this:
> >
> >Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)) :
> > no font could be found for family "Arial"
> >
> >Is this something package authors should worry about in submissions?
> >
> >[1] https://cran.r-project.org/web/checks/check_results_simmer.html
>
> On Thu, Sep 16, 2021 at 12:15 PM git demont  wrote:
>
>> Hello community,
>>
>> I plan to submit a new version of IFC package to CRAN.
>>
>> I checked it locally, on win-builder and on rhub. Almost everything looks
>> OK except for:
>> - Debian Linux, R-devel, GCC ASAN/UBSAN
>> - Oracle Solaris 10, x86, 32 bit, R-release
>>
>> On Debian Linux, R-devel, GCC ASAN/UBSAN, I get a PREPERROR, I suspect it
>> is a false pos since it says that xml2 package can not be installed.
>> My main concern is about Oracle Solaris 10, x86, 32 bit, R-release where
>> the function ExportToReport leads to the error reported in the 

[R-pkg-devel] How to refer to COPYRIGHTS and AUTHORS extra files in DESCRIPTION

2020-06-29 Thread git demont
Hi all,

I am developing a package called 'IFC'.
https://github.com/gitdemont/IFC/


Last submission (v0.0.7) was almost the final one to get it CRAN
https://github.com/gitdemont/IFC/tree/v0.0.7
It was manually checked and it should be accepted if I removed a dontrun
(that I unfortunately forgot).

For the next submission ( I hope it will be the good one ), in addition to
fixing the dontrun, I would like to include a small modification that was
not asked. I would like to avoid another round of submission/review by
introducing an issue that was not here. In DESCRIPTION of 'IFC', I am
inviting users to refer to files for copyrights and authorship. "See file
inst/COPYRIGHTS and file inst/AUTHORS for a list of copyright holders and
authors"

However, I am not sure whether I should say 'inst/COPYRIGHTS' and
'inst/AUTHORS' because these files are in the 'inst/' directory of the
built tar.gz, or if I should only refer to 'COPYRIGHTS' and 'AUTHORS'
(without inst/) because once installed these files will be at the root of
IFC library directory.
The same question olds for "Copyright: file inst/COPYRIGHTS".

In CRAN policies, one can read:
"Where copyrights are held by an entity other than the package authors,
this should preferably be indicated via ‘cph’ roles in the ‘Authors@R’
field, or using a ‘Copyright’ field (if necessary referring to an
inst/COPYRIGHTS file)."
In 'RcppMsgPack' for instance we have:
- in the description: "See the files 'COPYRIGHTS' and 'AUTHORS' for a full
list of copyright holders and contributors to 'msgpack-c'."
- in the copyrights: "inst/COPYRIGHTS".

Best,
Yohann

[[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 to refer to COPYRIGHTS and AUTHORS extra files in DESCRIPTION

2020-07-07 Thread git demont
Hi all,

Sorry for asking again, but I got absolutely no advice on how to
correctly refer to extra copyrights and authors files in package
DESCRIPTION.
I know this can be considered as impolite and I don't want to do so.
So, I waited one week until sending the present message and I promise I
will not send another to ask for the same thing after this one.

Best,
Yohann




On Mon, Jun 29, 2020 at 4:04 PM git demont  wrote:

> Hi all,
>
> I am developing a package called 'IFC'.
> https://github.com/gitdemont/IFC/
> <https://github.com/gitdemont/IFC/tree/v0.0.7>
>
> Last submission (v0.0.7) was almost the final one to get it CRAN
> https://github.com/gitdemont/IFC/tree/v0.0.7
> It was manually checked and it should be accepted if I removed a dontrun
> (that I unfortunately forgot).
>
> For the next submission ( I hope it will be the good one ), in addition to
> fixing the dontrun, I would like to include a small modification that was
> not asked. I would like to avoid another round of submission/review by
> introducing an issue that was not here. In DESCRIPTION of 'IFC', I am
> inviting users to refer to files for copyrights and authorship. "See file
> inst/COPYRIGHTS and file inst/AUTHORS for a list of copyright holders and
> authors"
>
> However, I am not sure whether I should say 'inst/COPYRIGHTS' and
> 'inst/AUTHORS' because these files are in the 'inst/' directory of the
> built tar.gz, or if I should only refer to 'COPYRIGHTS' and 'AUTHORS'
> (without inst/) because once installed these files will be at the root of
> IFC library directory.
> The same question olds for "Copyright: file inst/COPYRIGHTS".
>
> In CRAN policies, one can read:
> "Where copyrights are held by an entity other than the package authors,
> this should preferably be indicated via ‘cph’ roles in the ‘Authors@R’
> field, or using a ‘Copyright’ field (if necessary referring to an
> inst/COPYRIGHTS file)."
> In 'RcppMsgPack' for instance we have:
> - in the description: "See the files 'COPYRIGHTS' and 'AUTHORS' for a full
> list of copyright holders and contributors to 'msgpack-c'."
> - in the copyrights: "inst/COPYRIGHTS".
>
> Best,
> Yohann
>

[[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 to refer to COPYRIGHTS and AUTHORS extra files in DESCRIPTION

2020-07-08 Thread git demont
Thank you Ahmadou, Robert and Gábor,

In package 'presser'  Gábor used no dedicated AUTHORS file but use
'comment' and 'role' tag of Authors@R to mention their contribution and
refer to further comments in file (e.g.  inst/credits/redoc.md, src/md5.h)

Robert, also described a strategy using Authors@R

Ahmadou, used something similar to what I have done in the 'IFC' package I
want to submit on CRAN, with extra AUTHORS and COPYRIGHTS files found in
inst/ directory of its 'cgal4h' package. Then, he used "Author: file
inst/AUTHORS" and "Copyright: file inst/COPYRIGHTS" in DESCRIPTION file to
refer to these files.

In 'RcppMsgPack' package, I was using as an example in my 1st message,
extra AUTHORS and COPYRIGHTS files found in 'inst/' directory were also
used.
DESCRIPTION file contains:
- Author: Travers Ching and Dirk Eddelbuettel; the authors and contributors
of MsgPack
- Copyright: file inst/COPYRIGHTS

So, as far as I understand from your replies, there seems to be no general
rule on how to do it.
But it seems that when Author: or Copyright: is used in DESCRIPTION and
refer to a file then 'inst/' directory should be prepend to the file name
(e.g.  Copyright: file inst/COPYRIGHTS)

In next submission I will use in DESCRIPTION:
Authors@R and have a 'inst/AUTHORS' file
Copyright: file inst/COPYRIGHTS  and have a 'inst/COPYRIGHTS' file
Description:  + See file 'COPYRIGHTS'
and file 'AUTHORS' for a list of copyright holders and authors

Thanks a lot for your help,
Yohann

On Tue, Jul 7, 2020 at 7:56 PM Ahmadou Dicko 
wrote:

> Hi Yohann,
>
> I had a similar situation with my first package.
> I used Author + Maintainer field instead Authors@R and I added the
> inst/AUTHORS to Author and my email to the Maintainer field.
> In the list of author names (and I have a lot of them in cgal4h), make
> sure that you also define the different roles (i.e ctb, cph, etc).
> You can access the metadata here and the Gitlab repository there
>
> https://CRAN.R-project.org/package=cgal4h
>
> Hope it helps.
>
> Ahmadou
>
>
>
> On Tue, Jul 7, 2020 at 5:30 PM git demont  wrote:
>
>> Hi all,
>>
>> Sorry for asking again, but I got absolutely no advice on how to
>> correctly refer to extra copyrights and authors files in package
>> DESCRIPTION.
>> I know this can be considered as impolite and I don't want to do so.
>> So, I waited one week until sending the present message and I promise I
>> will not send another to ask for the same thing after this one.
>>
>> Best,
>> Yohann
>>
>>
>>
>>
>> On Mon, Jun 29, 2020 at 4:04 PM git demont  wrote:
>>
>> > Hi all,
>> >
>> > I am developing a package called 'IFC'.
>> > https://github.com/gitdemont/IFC/
>> > <https://github.com/gitdemont/IFC/tree/v0.0.7>
>> >
>> > Last submission (v0.0.7) was almost the final one to get it CRAN
>> > https://github.com/gitdemont/IFC/tree/v0.0.7
>> > It was manually checked and it should be accepted if I removed a dontrun
>> > (that I unfortunately forgot).
>> >
>> > For the next submission ( I hope it will be the good one ), in addition
>> to
>> > fixing the dontrun, I would like to include a small modification that
>> was
>> > not asked. I would like to avoid another round of submission/review by
>> > introducing an issue that was not here. In DESCRIPTION of 'IFC', I am
>> > inviting users to refer to files for copyrights and authorship. "See
>> file
>> > inst/COPYRIGHTS and file inst/AUTHORS for a list of copyright holders
>> and
>> > authors"
>> >
>> > However, I am not sure whether I should say 'inst/COPYRIGHTS' and
>> > 'inst/AUTHORS' because these files are in the 'inst/' directory of the
>> > built tar.gz, or if I should only refer to 'COPYRIGHTS' and 'AUTHORS'
>> > (without inst/) because once installed these files will be at the root
>> of
>> > IFC library directory.
>> > The same question olds for "Copyright: file inst/COPYRIGHTS".
>> >
>> > In CRAN policies, one can read:
>> > "Where copyrights are held by an entity other than the package authors,
>> > this should preferably be indicated via ‘cph’ roles in the ‘Authors@R’
>> > field, or using a ‘Copyright’ field (if necessary referring to an
>> > inst/COPYRIGHTS file)."
>> > In 'RcppMsgPack' for instance we have:
>> > - in the description: "See the files