Skip to content

Commit

Permalink
version 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Iris Simmons authored and cran-robot committed Jun 30, 2024
1 parent 4dca15b commit 7647349
Show file tree
Hide file tree
Showing 86 changed files with 4,181 additions and 3,627 deletions.
11 changes: 6 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: this.path
Version: 2.4.0
Date: 2024-02-16
Version: 2.5.0
Date: 2024-06-29
License: MIT + file LICENSE
Title: Get Executing Script's Path
Description: Determine the path of the executing script. Compatible
Expand All @@ -13,15 +13,16 @@ Description: Determine the path of the executing script. Compatible
'testthat::source_file()'.
Author: Iris Simmons
Maintainer: Iris Simmons <ikwsimmo@gmail.com>
Depends: R (>= 2.15)
Depends: R (>= 2.15.0)
Suggests: utils, jsonlite, microbenchmark, rprojroot
Enhances: compiler, box, knitr, plumber, shiny, targets, testthat
URL: https://github.com/ArcadeAntics/this.path
BugReports: https://github.com/ArcadeAntics/this.path/issues
ByteCompile: TRUE
Biarch: TRUE
BuildManual: TRUE
Type: Package
NeedsCompilation: yes
Packaged: 2024-02-16 05:46:55 UTC; andre
Packaged: 2024-06-29 22:43:15 UTC; iris
Repository: CRAN
Date/Publication: 2024-02-16 11:30:02 UTC
Date/Publication: 2024-06-29 23:20:01 UTC
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2023
YEAR: 2024
COPYRIGHT HOLDER: Iris Simmons
153 changes: 81 additions & 72 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
e88a65adc1ac90b44752c8f7d2746476 *DESCRIPTION
b42d1b04a89b96dfffade37f1b2cdaae *LICENSE
dd2cc545d95c9dd12a2b970b0946066c *NAMESPACE
a374097e7e96fd1b64e4723d7f131da0 *NEWS
50bf1746d58a6176cbda21cbed8b61f8 *DESCRIPTION
f43934f1691a38f79d37cbc29b393c6f *LICENSE
19639daa15b7f79bdbdf2f3800b462d2 *NAMESPACE
38d2e4cf6d4eabe3120207607bd9616e *NEWS
e80794b0305cafb769f8a24735c6a961 *R/0.R
dd365911670a721f4b0251e0c4f7a82f *R/backports.R
972abde953407f2b52dd35978d8c3b1b *R/backports.R
ee49a59544f311457821204800cd2de9 *R/cat.R
84b1c83bba17c8687899225893516f36 *R/checkpath.R
27eff8c8da06e44186fec353d2aeadc4 *R/defunct.R
fbf24cc555a49e63c431c2db757cb171 *R/defunct.R
0a17d76f285bb274e7fe427b936c893e *R/enhances.R
e82be3be481ef0cc8ee261c7a76e5bfe *R/error.R
4071ed065460def12e7e33e52c4afde1 *R/files.R
e08146925c86c02de1882c98590260ca *R/files.R
37ceb9252684a751d9a58a8546629fe7 *R/ismain.R
3aefdf4e87044d35e141f2632ebc5a36 *R/lineno.R
e5bbeb6c4da5bd2887e9cf97a0ff1349 *R/ns-hooks.R
a72fd02e48e4f83775e95b382f3f6495 *R/pathfuns.R
e4f0452a2c58ac98b16848d7a51e7547 *R/ns-hooks.R
0ad8bf2e547597f5d0e67881261eca4a *R/pathfuns.R
f2807a97cfc33958457236585601ef42 *R/print.R
d9f117942c548e7df53e99f469626157 *R/progargs.R
1ff3003072f05a3ab29a98a31511ff6b *R/promises.R
e20ac2bd20407ad95719a871890b6a59 *R/progargs.R
ac15992e9337576d0f6322f4d207023d *R/promises.R
62d6356f62ececace699e5e6aa6a6015 *R/relpath.R
3de908f6ccf84652413008c7481b21be *R/rprojroot.R
d89ac3e27e849113088450cf83b6ddf2 *R/setsyspath.R
Expand All @@ -25,99 +25,108 @@ d89ac3e27e849113088450cf83b6ddf2 *R/setsyspath.R
37a490a045b23d6e8fe325c04499d76a *R/sys.R
119903f721da7032adaaf97710758043 *R/sysputenv.R
d40c0af9e4215f6d6036114cc6a2cd6b *R/tests.R
de21dd5cf40175ba5720c54456c9b167 *R/thispath.R
46ac391611bc99d6d535f5ba47c3fd08 *R/thispath.R
e0a25d1cb69ec00cd2952a2176cfb2a6 *R/utils.R
f566c2721cc45d2db6a411959175bc70 *R/zzz.R
204a66b9fead6a723ab67e9dcd8f54db *README.md
1218ed50e43bf941eb53b463aec586a0 *build/stage23.rdb
d74d749793eeddf1e9aabbdc8cd3b11a *build/this.path.pdf
3c449ec34e4c455ef849011f2c7ff69d *R/zzz.R
f2ad86ce223065fef481fbb7395fa9fd *README.md
83737574fedff8aae24bb43ede0f3c19 *build/stage23.rdb
3c09622cdc016edfce2433eb034fcb06 *build/this.path.pdf
063298a1efb9e668fd828ccd8decf932 *configure
da813902e1b9131abc4ae77625e890dc *configure.win
9bf8851f58cd7a1a0c70cbf2c3b65ed3 *inst/NEWS.in.Rd
0f0a88d0acf46f49ebedc06d5b7ae9c1 *configure.win
cec4323cccb66ec1aa4f5b93ba11acd0 *inst/NEWS.in.Rd
e0e9408b214f224f42809aabcf2d8b40 *inst/doc/NEWS.0
c7285aa63829abfce2e484841822b206 *inst/doc/NEWS.1
157760627f2aefd45437fd4fbd4eb538 *inst/extdata/README
5fa6f6747e899da44cddbeac9d782e3c *inst/extdata/main.R
43ffb9263405f0cb91413570452c3c15 *inst/extdata/r-editor_msvcrt.txt
848eee02251f438389c0a1749885bdf6 *inst/extdata/r-editor_ucrt.txt
9402542e74c7897d4ccc9cdd9109074e *inst/extdata/untitled_msvcrt.txt
18371de5e1893e0f23ebf527da119c60 *inst/extdata/untitled_ucrt.txt
851b2a5744601ebe72eb245f7995a586 *inst/extdata/README
45ac642ef0676e2fa218a8776b4c656a *inst/extdata/main.R
89364accdb3535b59f0cdfbd15ecd432 *inst/extdata/r-editor_msvcrt_2_15.dat
49bc124e6c86248c52dd5004cff0ed54 *inst/extdata/r-editor_msvcrt_3_0.dat
03bd39eed25ceeb7756484368cc5b62f *inst/extdata/r-editor_msvcrt_3_4.dat
1c0132faac8cad3d0134002e48546ad9 *inst/extdata/r-editor_msvcrt_4_1.dat
d719705d34cc94b403d309a05ad93c77 *inst/extdata/r-editor_ucrt_4_2.dat
2831b5410b4fe457b6bbd51116c7919b *inst/extdata/r-editor_ucrt_4_4.dat
eafcff0a5db957713cd9a14b0fe6c75c *inst/extdata/untitled_msvcrt_2_15.dat
02310c54293a30b4eb6e152dd918423a *inst/extdata/untitled_msvcrt_3_0.dat
c5536738ca38347b215f667f8eb1394e *inst/extdata/untitled_msvcrt_3_4.dat
b94b481ce9981e3a75571d7b5589392b *inst/extdata/untitled_msvcrt_4_1.dat
5fc316804fcc9a95c6a2d32c7590b940 *inst/extdata/untitled_ucrt_4_2.dat
9f372fd638d33efe757e0a2506f490e4 *inst/extdata/untitled_ucrt_4_4.dat
79e80f57e15af0ccdbe66fcccbbc8487 *man/Enhances.Rd
c88307e36673da04611621962823bb8d *man/FILE.Rd
89aee98156bf7f2d279d4a1adbd42653 *man/LINENO.Rd
cfb4e9f8ceb8b73ca47201d5a44d8d12 *man/OS.type.Rd
d5c7dd441bfb52137fee04b3b273ccb8 *man/R.from.shell.Rd
579b6679f0f623765edec6e604988adb *man/OS.type.Rd
52e74ec4e0a8582634a55918485e395e *man/R.from.shell.Rd
7fd1ddb3136250136cb832cbae2db97e *man/Sys.putenv.Rd
1699e99ec666e5cdb70401ed71d69f05 *man/basename2.Rd
585534b676874bd12ca5aaa963a7653f *man/check.path.Rd
f88f2bc221783ae162d7d6ad31c38e2a *man/ext.Rd
8345717f5d531e14cb963803f65ea1fb *man/ext.Rd
4f696fb6f323f6686aab48bc97a456a5 *man/getinitwd.Rd
231fae425f18aa5c66366af37311f0eb *man/here.Rd
0837fa8b312d6c4b948be9478b72712b *man/is.main.Rd
76e7ee16c93af60c113711953e8dd8b3 *man/macros/macros.Rd
907943a1460a2880ade788a10dfec351 *man/path.functions.Rd
840fb73322084ba4f7541bda9bc0e6dc *man/path.functions.Rd
7e198c40e74fa12c87d932d9976b1d2c *man/path.join.Rd
b5ed9b3a537a136482e374551679d088 *man/path.split.Rd
f486d8157a128ef1e5ad91ac97ed3b67 *man/print.ThisPathDocumentContext.Rd
78e7af8b41a0cb51b6080c8bd9477995 *man/progArgs.Rd
64a786a7063989924737a0a12942718e *man/progArgs.Rd
1d431fefe9aea949e4da10548c092c87 *man/relpath.Rd
60b579d4e825fb08fdab5cd8dfeabffd *man/set.gui.path.Rd
1e641adc11eac9d0f8feef33df85ad0b *man/set.jupyter.path.Rd
08d15a61a07feb190614b64e60adaf81 *man/set.sys.path.Rd
306601ad88fd3ba6de72d2331bea0164 *man/set.sys.path.Rd
e804db69f2f63c01e44408f7c0d16bfe *man/shFILE.Rd
2f0046772a37c6cbbdf0cd5438fea9be *man/source.exprs.Rd
8aec89bed347be5f6b61fae1df2aedd9 *man/startup_files.Rd
a81a3b95e5d782a04370de44c69009dd *man/sys.Rd
029d1e786edab5351b69f4e0db30d57e *man/sys.path.Rd
93cf573a7cb74514f1f8b2bb0c684a63 *man/this.path-defunct.Rd
42cb67849c7ef9e628f38f984a40e51e *man/this.path-defunct.Rd
378cad3ec3d508bc639fd56e81c31673 *man/this.path-package.Rd
073d0033f83c66db5738ddcc7114c588 *man/this.path.Rd
1093756d7d6eebb51b30ba2ba0b5e102 *man/this.path.Rd
ca582d5b01a84478b5a1af45d68e66de *man/try.this.path.Rd
fb855d152f3b7ceb8f7fda94b4d2dccf *man/tryCatch2.Rd
7f10a84eda83952a66cfd6f7e9446a23 *src/0.c
07cf59efb59078b6446c7cb546eee9b0 *src/0.c
8d26545ae32cc4a41731298d1dc4313f *src/Makevars.win
5519a83fa2a392f86031368130ba047a *src/aquarootscript.c
e3a58b2d75b08c37ecade8bb7d64b5be *src/backports.c
bdc8442715cdafbbb73f973c27317e01 *src/backports.h
cf2ccc8b537895ca5028d2a639a173cd *src/basename2.c
668f3c2042dfdbe9e5e22f481c4bdfdf *src/devel.h
65e3a82b8e61f3564a0d1f121b53cc8a *src/error.c
711240d3535a053cf96007fa8e97edf6 *src/error.h
49e39969881416ac8586059d42cef8c9 *src/ext.c
477b83943181d9f80d1417992a413da9 *src/files.c
ba062b0bee5a18ee67b9bfa2b7f84a7b *src/files.h
a9d10538013fc88987f7a9ab346baf1b *src/get_file_from_closure.h
ba4884c2fae7b0e1811bc5be48ace668 *src/ns-hooks.c
79e4ce7aae8f761e5125b6c24c52a4b8 *src/ns-hooks.h
d6310070a16e603bc52cddff11585b86 *src/pathjoin.c
e036d71ebd349842793ed5f95d147fcd *src/pathsplit.c
1e789e0d54d93b34ff930c800284398b *src/print.c
b42bab7f935399727b4fe58512927c2e *src/print.h
3b63e903b86d44344f1375c09dbd4e35 *src/progargs.c
51dab4f9aea4398a960da5036836db10 *src/promises.c
e3b917fd8f33c80bdc34efb4a0b69419 *src/promises.h
cda2b846bbbeb9019d499e27530696b4 *src/rgui_path.c
23957dbf4926ed0b9432fdd5bb58be47 *src/rprojroot.c
883a9208a6d94cffca136114dabbb5aa *src/rversiondefines.h
dac28f966f67ce592acbc96dd4610314 *src/setsyspath.c
c0ddd57b5c6240eeae0e7f9dc66b86f1 *src/shfile.c
55ed6f89186177ab689734457fd1634c *src/startup.c
503a3c5d81dec7bd1aeaead427973bf1 *src/symbols.h
bf2f1f525329834ca4e430d76a0a780f *src/sys.c
410f6624c0d157a7e9d750c672335065 *src/sys.h
be448851236b9051a9857da56a338d1d *src/this.path.h
20c6b06e12e1384ef90e00de307779e2 *src/thispath.c
cfd2f9c869e0ddf2ecd6c6b6ec84d385 *src/thispathdefn.c
6bae1ae5b9ddda8194877a417d8a4d96 *src/thispathdefn.h
088b5f399fcaf4a3fecde6285c971a15 *src/translations.h
37b2e36c42ea6a75e70140943e316652 *src/utils.c
cec8ba7353a516b7c90c02e2bab5a5e0 *src/aquarootscript.c
5e64d1c610988f8d763286911d155e45 *src/backports.c
f5b072f70cdf16c898933508bea17101 *src/backports.h
477381755b91c89b9a78951c96f70aa2 *src/basename2.c
7d02cd0dfb36a28d74a370a20fcf9464 *src/devel.h
c36f2d91e2859c07d518d055964d1cd2 *src/error.c
7b26cb28528c5af4f7a6556dd32f2147 *src/error.h
f2ac5aa1057830476137066a2d164304 *src/ext.c
4ff9bfca58374a19a565c8918d9ef9dd *src/files.c
af4e46a6d724278f299bca4a064d6e9b *src/files.h
7ef5e24b2f020ddef2ea9deda3377032 *src/get_file_from_closure.h
4a5798ae0a98c59dd7b78dbff6f36c8b *src/ns-hooks.c
316328fb77ec88e68920ba53bd9ab9a5 *src/ns-hooks.h
91701c693451daef76266f904ec11c88 *src/pathjoin.c
2547737f739321917c8e516b72f403f8 *src/pathsplit.c
7db1b331d08993d242ae621f80de242f *src/print.c
13cc3e8fafb8bec78e68614d2298f558 *src/print.h
59c82f472305850c8d8bf6e2249b562f *src/progargs.c
ac8a9797e92f39fe9c1905efff5039f0 *src/promises.c
d2a072c85bfa86e2c782def63c85c4db *src/promises.h
70859ee83fcfb00b09984089719a6481 *src/rgui_path.c
c8e8493f2f94119dde12810e74212b3a *src/rprojroot.c
ff838ca611d8eded166ef10a4b8797aa *src/rversiondefines.h
0742d7396e1ac944df98f974d637c303 *src/setsyspath.c
6357bd3aa307e41223632cfa70e718aa *src/shfile.c
a22dfa55ea9e9a633a43dbc4f9a73d4a *src/startup.c
c2005ba3a23ba3ec4a3d50c1708e72c6 *src/symbols.h
d093f51f1763b2b8ec4dc5bb92a8fa26 *src/sys.c
3e2f002183a39831d1380fbd21118d11 *src/sys.h
28a60164e626d842a3455447cd1c3fa7 *src/this.path.h
3be37de34829c9b9384c588a84955809 *src/thispath.c
f487916a80e301be816c20764de9e8a7 *src/thispathdefn.c
34766359f2464e6919b012c6518103ac *src/thispathdefn.h
1857487900f6a9969084c7cb9a085cdb *src/translations.h
02738d8255b0f1a92c0d2460943d5fdb *src/utils.c
94ed0c3e56bdb6690201a1651cd9755e *tests/basename2-tests.R
63e48fe48233b11b2aaab07ddd04eadb *tests/ext-tests.R
9fc23147fed15eeaa5673a662a1f9672 *tests/ext-tests.R
5c19a356263c7efe5c7f13203e460324 *tests/faster-subsequent-times.R
81328e741d0918842a0f5c2dfc55a2be *tests/isclipboard-tests.R
ece7a03a954f0421709942c6a1d43f1d *tests/pathjoin-tests.R
400fca5f80bbb908e10b44dc7dd82d67 *tests/set-sys-path-tests.R
2b1d88fedb78ddd740344feed8aa1b90 *tests/this-path-tests.R
830a1ac28a2591809bc09420430d3325 *tests/this-path-tests.R
c24104dc36516991c6d8fb874ef834bd *tests/zzz.R
086dc71918e03fded4cbe7dae11017a3 *tools/configure.R
421890669904a11d849dd8027b8f401a *tools/info.dcf
8de160c14fdca8c0067db95fe1a4bd53 *tools/configure.R
5745b5f4a6e6ad8bc11bd456b1e689fd *tools/info.dcf
e7f43d037fdff2808a99c462e3eb8cc8 *tools/this_path_reg_ptrs.c
9 changes: 5 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ if (getRversion() < "3.3.0") {


if (getRversion() < "3.4.0") {
export(print.connection)
S3method(print, connection)
export(withAutoprint)
}

Expand Down Expand Up @@ -212,10 +214,9 @@ export(set.jupyter.path, set.gui.path , sys.path ,
## thispath-defunct.R ----


export(as.rel.path , as.relative.path , local.path ,
Sys.path , Sys.dir , reset.this.proj ,
set.this.path.jupyter, inside.source , set.this.path ,
unset.this.path , set.sys.path.jupyter , fileArgs )
export(reset.this.proj , set.this.path.jupyter, inside.source ,
set.this.path , unset.this.path , set.sys.path.jupyter ,
fileArgs )


## utils.R ----
Expand Down
16 changes: 16 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
this.path News

CHANGES IN this.path 2.5.0 (2024-06-29):

NEW FEATURES:

* progArgs() now accepts argument 'ifnotfound' specifying what to
do when no program arguments are found.

BUG FIXES:

* this.path(original = TRUE) used inside a "gzfile", "bzfile",
"xzfile", or "fifo" connection will no longer return a "file://"
URL.

* this.path() once again works in 'Rgui' running in a Japanese or
Turkish locale.

CHANGES IN this.path 2.4.0 (2024-02-16):

SIGNIFICANT USER-VISIBLE CHANGES:
Expand Down
21 changes: 21 additions & 0 deletions R/backports.R
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,27 @@ endsWith <- function (x, suffix)
if (getRversion() < "3.4.0") {


print.connection <- .removeSource(evalq(envir = .BaseNamespaceEnv,
function (x, ...)
{
usumm <- tryCatch(unlist(summary(x)), error = function(e) {
})
if (is.null(usumm)) {
cl <- oldClass(x)
cl <- cl[cl != "connection"]
cat("A connection, ", if (length(cl))
paste0("specifically, ", paste(sQuote(cl), collapse = ", "),
", "), "but invalid.\n", sep = "")
}
else {
cat("A connection with")
print(cbind(` ` = usumm), ...)
}
invisible(x)
}
))


.withAutoprint <- function (exprs, evaluated = FALSE, local = parent.frame(), print. = TRUE,
echo = TRUE, max.deparse.length = Inf, width.cutoff = max(20, getOption("width")),
deparseCtrl = c("keepInteger", "showAttributes", "keepNA"),
Expand Down
27 changes: 0 additions & 27 deletions R/defunct.R
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
## Defunct in 1.3.0 (2023-04-08)


as.rel.path <- function (path)
stop(.defunctError("rel2here", "this.path", old = "as.rel.path"))


as.relative.path <- function (path)
stop(.defunctError("rel2here", "this.path", old = "as.relative.path"))


## Defunct in 1.4.0 (2023-04-18)


local.path <- function (verbose = getOption("verbose"), original = FALSE, for.msg = FALSE,
contents = FALSE, default, else.)
stop(.defunctError("sys.path(..., local = TRUE)", "this.path", old = "local.path(...)"))


Sys.path <- function ()
stop(.defunctError("sys.path(verbose = FALSE)", "this.path", old = "Sys.path()"))


Sys.dir <- function ()
stop(.defunctError("sys.dir(verbose = FALSE)", "this.path", old = "Sys.dir()"))


## Defunct in 2.0.0 (2023-08-08)


Expand Down
9 changes: 7 additions & 2 deletions R/files.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,11 @@ path.unsplit <- function (...)
{
if (.OS_windows) {
s <- chartr("\\", "/", s)
if (startsWith(s, "//"))
i <- startsWith(s, "//")
if (all(i))
substr(s, 1L, 2L) <- "\\\\"
else if (any(i))
substr(s[i], 1L, 2L) <- "\\\\"
}
s
}
Expand All @@ -147,7 +150,9 @@ path.unsplit <- function (...)

.as_file_URL <- function (path)
{
if (.OS_windows) {
if (!length(path))
character(0)
else if (.OS_windows) {
## on Windows we have file:///C:/path/to/file or similar
path <- .fixslash(path)
i <- grepl("^.:", path, useBytes = TRUE)
Expand Down
Loading

0 comments on commit 7647349

Please sign in to comment.