Re: [R-pkg-devel] test failure: oldrel

2024-01-16 Thread Simon Urbanek



> On Jan 17, 2024, at 3:46 AM, Josiah Parry  wrote:
> 
> Hey folks! I've received note that a package of mine is failing tests on
> oldrel.
> 
> Check results:
> https://www.r-project.org/nosvn/R.check/r-oldrel-windows-x86_64/arcgisutils-00check.html
> 
> I think I've narrowed it down to the way that I've written the test which
> uses `as.POSIXct(Sys.Date(), tz = "UTC")`.
> 

That's not where it fails - it fails in

today <- Sys.Date()
today_ms <- date_to_ms(today)
as.POSIXct(today_ms / 1000)

which is equivalent to

as.POSIXct(as.numeric(Sys.Date()) * 86400)

and that is only supported since R 4.3.0 - from NEWS:

  as.POSIXct() and as.POSIXlt(.) (without specifying origin) now work.

so you have to add R >= 4.3.0 or use .POSIXct() instead.

I didn't check your other tests so you may have more of the same ...

Cheers,
Simon


> If I understand the R release changelog correctly, this behavior did not
> exist prior to R 4.3.0.
> 
> as.POSIXlt() now does apply a tz (time zone) argument, as does
>> as.POSIXct(); partly suggested by Roland Fuß on the R-devel mailing list.
> 
> 
> https://cran.r-project.org/doc/manuals/r-release/NEWS.html
> 
> Does this check out? If so, would be more effective to modify the test to
> use a the character method of `as.POSIXct()`?
> 
>   [[alternative HTML version deleted]]
> 
> __
> 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


Re: [R-pkg-devel] test failure: oldrel

2024-01-16 Thread Josiah Parry
Thanks for the update!
Ill be submitting a change in the coming days and will report back :)

On Tue, Jan 16, 2024 at 12:12 Dirk Eddelbuettel  wrote:

>
> On 16 January 2024 at 10:28, Josiah Parry wrote:
> | Oddly making the change has made CI happy.
> |
> https://github.com/R-ArcGIS/arcgisutils/actions/runs/7543315551/job/20534063601
> |
> | It may be that the issue was OS related but I'm unsure since only oldrel
> for
> | windows and macos check results are published
> https://cran.r-project.org/web/
> | checks/check_results_arcgisutils.html
>
> Seb solved the puzzle (in direct email to me). It has to do with the fact
> that _the container_ defaults to UTC.  If I add '-e TZ=America/Chicago' to
> the invocation we do indeed see a difference between r-release and r-oldrel
> (and I also brought the version string display inside R):
>
> edd@rob:~$ for v in 4.3.2 4.2.2; do docker run --rm -ti -e
> TZ=America/Chicago r-base:${v} Rscript -e 'cat(format(getRversion()),
> format(as.POSIXct(Sys.Date(), tz = "UTC")), Sys.getenv("TZ"), "\n")'; done
> 4.3.2 2024-01-16 America/Chicago
> 4.2.2 2024-01-15 18:00:00 America/Chicago
> edd@rob:~$
>
> Thanks to Seb for the cluebat wave.
>
> Dirk
>
> |
> |
> | On Tue, Jan 16, 2024 at 9:59 AM Dirk Eddelbuettel 
> wrote:
> |
> |
> | Doesn't seem to be the case as it moderately easy to check
> (especially when
> | you happen to have local images of r-base around anyway):
> |
> | edd@rob:~$ for v in 4.3.2 4.2.2 4.1.3 4.0.5 3.6.3 3.5.3 3.4.4
> 3.3.3; do
> | echo -n "R ${v}: "; docker run --rm -ti r-base:${v} Rscript -e
> 'as.POSIXct
> | (Sys.Date(), tz = "UTC")'; done
> | R 4.3.2: [1] "2024-01-16 UTC"
> | R 4.2.2: [1] "2024-01-16 UTC"
> | R 4.1.3: [1] "2024-01-16 UTC"
> | R 4.0.5: [1] "2024-01-16 UTC"
> | R 3.6.3: [1] "2024-01-16 UTC"
> | R 3.5.3: [1] "2024-01-16 UTC"
> | R 3.4.4: [1] "2024-01-16 UTC"
> | R 3.3.3: [1] "2024-01-16 UTC"
> | edd@rob:~$
> |
> | Dirk
> |
> | --
> | dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
> |
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>

[[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] test failure: oldrel

2024-01-16 Thread Dirk Eddelbuettel


On 16 January 2024 at 10:28, Josiah Parry wrote:
| Oddly making the change has made CI happy. 
| 
https://github.com/R-ArcGIS/arcgisutils/actions/runs/7543315551/job/20534063601
| 
| It may be that the issue was OS related but I'm unsure since only oldrel for
| windows and macos check results are published https://cran.r-project.org/web/
| checks/check_results_arcgisutils.html

Seb solved the puzzle (in direct email to me). It has to do with the fact
that _the container_ defaults to UTC.  If I add '-e TZ=America/Chicago' to
the invocation we do indeed see a difference between r-release and r-oldrel
(and I also brought the version string display inside R):

edd@rob:~$ for v in 4.3.2 4.2.2; do docker run --rm -ti -e TZ=America/Chicago 
r-base:${v} Rscript -e 'cat(format(getRversion()), 
format(as.POSIXct(Sys.Date(), tz = "UTC")), Sys.getenv("TZ"), "\n")'; done
4.3.2 2024-01-16 America/Chicago 
4.2.2 2024-01-15 18:00:00 America/Chicago 
edd@rob:~$ 

Thanks to Seb for the cluebat wave.

Dirk

| 
| 
| On Tue, Jan 16, 2024 at 9:59 AM Dirk Eddelbuettel  wrote:
| 
| 
| Doesn't seem to be the case as it moderately easy to check (especially 
when
| you happen to have local images of r-base around anyway):
| 
| edd@rob:~$ for v in 4.3.2 4.2.2 4.1.3 4.0.5 3.6.3 3.5.3 3.4.4 3.3.3; do
| echo -n "R ${v}: "; docker run --rm -ti r-base:${v} Rscript -e 'as.POSIXct
| (Sys.Date(), tz = "UTC")'; done
| R 4.3.2: [1] "2024-01-16 UTC"
| R 4.2.2: [1] "2024-01-16 UTC"
| R 4.1.3: [1] "2024-01-16 UTC"
| R 4.0.5: [1] "2024-01-16 UTC"
| R 3.6.3: [1] "2024-01-16 UTC"
| R 3.5.3: [1] "2024-01-16 UTC"
| R 3.4.4: [1] "2024-01-16 UTC"
| R 3.3.3: [1] "2024-01-16 UTC"
| edd@rob:~$
| 
| Dirk
| 
| --
| dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
| 

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


Re: [R-pkg-devel] test failure: oldrel

2024-01-16 Thread Josiah Parry
Oddly making the change has made CI happy.
https://github.com/R-ArcGIS/arcgisutils/actions/runs/7543315551/job/20534063601

It may be that the issue was OS related but I'm unsure since only oldrel
for windows and macos check results are published
https://cran.r-project.org/web/checks/check_results_arcgisutils.html


On Tue, Jan 16, 2024 at 9:59 AM Dirk Eddelbuettel  wrote:

>
> Doesn't seem to be the case as it moderately easy to check (especially when
> you happen to have local images of r-base around anyway):
>
> edd@rob:~$ for v in 4.3.2 4.2.2 4.1.3 4.0.5 3.6.3 3.5.3 3.4.4 3.3.3; do
> echo -n "R ${v}: "; docker run --rm -ti r-base:${v} Rscript -e
> 'as.POSIXct(Sys.Date(), tz = "UTC")'; done
> R 4.3.2: [1] "2024-01-16 UTC"
> R 4.2.2: [1] "2024-01-16 UTC"
> R 4.1.3: [1] "2024-01-16 UTC"
> R 4.0.5: [1] "2024-01-16 UTC"
> R 3.6.3: [1] "2024-01-16 UTC"
> R 3.5.3: [1] "2024-01-16 UTC"
> R 3.4.4: [1] "2024-01-16 UTC"
> R 3.3.3: [1] "2024-01-16 UTC"
> edd@rob:~$
>
> Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>

[[alternative HTML version deleted]]

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


[R-pkg-devel] test failure: oldrel

2024-01-16 Thread Dirk Eddelbuettel


Doesn't seem to be the case as it moderately easy to check (especially when
you happen to have local images of r-base around anyway):

edd@rob:~$ for v in 4.3.2 4.2.2 4.1.3 4.0.5 3.6.3 3.5.3 3.4.4 3.3.3; do echo -n 
"R ${v}: "; docker run --rm -ti r-base:${v} Rscript -e 'as.POSIXct(Sys.Date(), 
tz = "UTC")'; done
R 4.3.2: [1] "2024-01-16 UTC"
R 4.2.2: [1] "2024-01-16 UTC"
R 4.1.3: [1] "2024-01-16 UTC"
R 4.0.5: [1] "2024-01-16 UTC"
R 3.6.3: [1] "2024-01-16 UTC"
R 3.5.3: [1] "2024-01-16 UTC"
R 3.4.4: [1] "2024-01-16 UTC"
R 3.3.3: [1] "2024-01-16 UTC"
edd@rob:~$ 

Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


[R-pkg-devel] test failure: oldrel

2024-01-16 Thread Josiah Parry
Hey folks! I've received note that a package of mine is failing tests on
oldrel.

Check results:
https://www.r-project.org/nosvn/R.check/r-oldrel-windows-x86_64/arcgisutils-00check.html

I think I've narrowed it down to the way that I've written the test which
uses `as.POSIXct(Sys.Date(), tz = "UTC")`.

If I understand the R release changelog correctly, this behavior did not
exist prior to R 4.3.0.

as.POSIXlt() now does apply a tz (time zone) argument, as does
> as.POSIXct(); partly suggested by Roland Fuß on the R-devel mailing list.


https://cran.r-project.org/doc/manuals/r-release/NEWS.html

Does this check out? If so, would be more effective to modify the test to
use a the character method of `as.POSIXct()`?

[[alternative HTML version deleted]]

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