Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbbfde07

Browse files
authored
Upkeep 2025 (#444)
2 parentsc9a1420 +3904856 commitbbfde07

File tree

189 files changed

+8091
-5231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+8091
-5231
lines changed

‎.Rbuildignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@
2424
^codecov\.yml$
2525
^man/macros/eval2[.]Rd$
2626
^LICENSE\.md$
27+
^[\.]?air\.toml$
28+
^\.vscode$

‎.github/workflows/R-CMD-check.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
push:
99
branches:[main, master]
1010
pull_request:
11-
branches:[main, master]
1211

1312
name:R-CMD-check.yaml
1413

‎.github/workflows/pkgdown.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:[main, master]
66
pull_request:
7-
branches:[main, master]
87
release:
98
types:[published]
109
workflow_dispatch:

‎.vscode/extensions.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"Posit.air-vscode"
4+
]
5+
}

‎.vscode/settings.json‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"[r]": {
3+
"editor.formatOnSave":true,
4+
"editor.defaultFormatter":"Posit.air-vscode"
5+
}
6+
}

‎DESCRIPTION‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ Title: Package Dependency Resolution and Downloads
33
Version: 0.8.0.9000
44
Authors@R: c(
55
person("Gábor", "Csárdi", , "csardi.gabor@gmail.com", role = c("aut", "cre")),
6-
person("Posit Software, PBC", role = c("cph", "fnd"))
6+
person("Posit Software, PBC", role = c("cph", "fnd"),
7+
comment = c(ROR = "03wc8by49"))
78
)
89
Description: Find recursive dependencies of 'R' packages from various
910
sources. Solve the dependencies to obtain a consistent set of packages
@@ -56,7 +57,7 @@ Suggests:
5657
testthat (>= 3.2.0),
5758
tibble,
5859
webfakes (>= 1.1.5.9000),
59-
withr (>= 2.1.1),
60+
withr (>= 2.1.1)
6061
Remotes:
6162
r-lib/pkgcache
6263
Config/Needs/builder:
@@ -71,5 +72,6 @@ Config/Needs/website:
7172
pkgdown (>= 2.0.2),
7273
tidyverse/tidytemplate
7374
Config/testthat/edition: 3
75+
Config/usethis/last-upkeep: 2025-05-05
7476
Encoding: UTF-8
75-
RoxygenNote: 7.3.2
77+
RoxygenNote: 7.3.2.9000

‎LICENSE‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
YEAR:2023
1+
YEAR:2025
22
COPYRIGHT HOLDER: pkgdepends authors

‎LICENSE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#MIT License
22

3-
Copyright (c)2023 pkgdepends authors
3+
Copyright (c)2025 pkgdepends authors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

‎R/aaa-rstudio-detect.R‎

Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
21
rstudio<- local({
3-
42
standalone_env<- environment()
53
parent.env(standalone_env)<- baseenv()
64

@@ -18,7 +16,8 @@ rstudio <- local({
1816
"RSTUDIO_CONSOLE_COLOR",
1917
"RSTUDIOAPI_IPC_REQUESTS_FILE",
2018
"XPC_SERVICE_NAME",
21-
"ASCIICAST")
19+
"ASCIICAST"
20+
)
2221

2322
d<-list(
2423
pid= Sys.getpid(),
@@ -55,8 +54,10 @@ rstudio <- local({
5554
if (clear_cache)data<<-NULL
5655
if (!is.null(data))return(get_caps(data))
5756

58-
if ((rspid<- Sys.getenv("RSTUDIO_SESSION_PID"))!=""&&
59-
any(c("ps","cli")%in% loadedNamespaces())) {
57+
if (
58+
(rspid<- Sys.getenv("RSTUDIO_SESSION_PID"))!=""&&
59+
any(c("ps","cli")%in% loadedNamespaces())
60+
) {
6061
detect_new(rspid,clear_cache)
6162
}else {
6263
detect_old(clear_cache)
@@ -89,31 +90,26 @@ rstudio <- local({
8990

9091
# direct subprocess
9192
new$type<-if (rspid==parentpid) {
92-
9393
if (pane=="job") {
9494
"rstudio_job"
95-
9695
}elseif (pane=="build") {
9796
"rstudio_build_pane"
98-
9997
}elseif (pane=="render") {
10098
"rstudio_render_pane"
101-
102-
}elseif (pane=="terminal"&&new$tty&&
103-
new$envs["ASCIICAST"]!="true") {
99+
}elseif (
100+
pane=="terminal"&&new$tty&&new$envs["ASCIICAST"]!="true"
101+
) {
104102
# not possible, because there is a shell in between, just in case
105103
"rstudio_terminal"
106-
107104
}else {
108105
# don't know what kind of direct subprocess
109106
"rstudio_subprocess"
110107
}
111-
112-
}elseif (pane=="terminal"&&new$tty&&
113-
new$envs[["ASCIICAST"]]!="true") {
108+
}elseif (
109+
pane=="terminal"&&new$tty&&new$envs[["ASCIICAST"]]!="true"
110+
) {
114111
# not a direct subproces, so check other criteria as well
115112
"rstudio_terminal"
116-
117113
}else {
118114
# don't know what kind of subprocess
119115
"rstudio_subprocess"
@@ -123,58 +119,55 @@ rstudio <- local({
123119
}
124120

125121
detect_old<-function(clear_cache=FALSE) {
126-
127122
# Cache unless told otherwise
128123
cache<-TRUE
129124
new<- get_data()
130125

131126
new$type<-if (new$envs[["RSTUDIO"]]!="1") {
132127
# 1. Not RStudio at all
133128
"not_rstudio"
134-
135129
}elseif (new$gui=="RStudio"&&new$api) {
136130
# 2. RStudio console, properly initialized
137131
"rstudio_console"
138-
139-
}elseif (!new$api&& basename(new$args[1])=="RStudio") {
132+
}elseif (!new$api&& basename(new$args[1])=="RStudio") {
140133
# 3. RStudio console, initializing
141134
cache<-FALSE
142135
"rstudio_console_starting"
143-
144136
}elseif (new$gui=="Rgui") {
145137
# Still not RStudio, but Rgui that was started from RStudio
146138
"not_rstudio"
147-
148139
}elseif (new$tty&&new$envs[["ASCIICAST"]]!="true") {
149140
# 4. R in the RStudio terminal
150141
# This could also be a subprocess of the console or build pane
151142
# with a pseudo-terminal. There isn't really a way to rule that
152143
# out, without inspecting some process data with ps::ps_*().
153144
# At least we rule out asciicast
154145
"rstudio_terminal"
155-
156-
}elseif (!new$tty&&
157-
new$envs[["RSTUDIO_TERM"]]==""&&
158-
new$envs[["R_BROWSER"]]=="false"&&
159-
new$envs[["R_PDFVIEWER"]]=="false"&&
160-
is_build_pane_command(new$args)) {
146+
}elseif (
147+
!new$tty&&
148+
new$envs[["RSTUDIO_TERM"]]==""&&
149+
new$envs[["R_BROWSER"]]=="false"&&
150+
new$envs[["R_PDFVIEWER"]]=="false"&&
151+
is_build_pane_command(new$args)
152+
) {
161153
# 5. R in the RStudio build pane
162154
# https://github.com/rstudio/rstudio/blob/master/src/cpp/session/
163155
# modules/build/SessionBuild.cpp#L231-L240
164156
"rstudio_build_pane"
165-
166-
}elseif (new$envs[["RSTUDIOAPI_IPC_REQUESTS_FILE"]]!=""&&
167-
grepl("rstudio",new$envs[["XPC_SERVICE_NAME"]])) {
157+
}elseif (
158+
new$envs[["RSTUDIOAPI_IPC_REQUESTS_FILE"]]!=""&&
159+
grepl("rstudio",new$envs[["XPC_SERVICE_NAME"]])
160+
) {
168161
# RStudio job, XPC_SERVICE_NAME=0 in the subprocess of a job
169162
# process. Hopefully this is reliable.
170163
"rstudio_job"
171-
172-
}elseif (new$envs[["RSTUDIOAPI_IPC_REQUESTS_FILE"]]!=""&&
173-
any(grepl("SourceWithProgress.R",new$args))) {
164+
}elseif (
165+
new$envs[["RSTUDIOAPI_IPC_REQUESTS_FILE"]]!=""&&
166+
any(grepl("SourceWithProgress.R",new$args))
167+
) {
174168
# Or we can check SourceWithProgress.R in the command line, see
175169
# https://github.com/r-lib/cli/issues/367
176170
"rstudio_job"
177-
178171
}else {
179172
# Otherwise it is a subprocess of the console, terminal or
180173
# build pane, and it is hard to say which, so we do not try.
@@ -297,4 +290,4 @@ rstudio <- local({
297290
)
298291
})
299292

300-
rstudio_detect<-function(...)rstudio$detect(...)
293+
rstudio_detect<-function(...)rstudio$detect(...)

‎R/assertions.R‎

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
is_character<-function(x) {
32
if (!is.character(x)) {
43
structure(
@@ -17,7 +16,6 @@ is_character <- function(x) {
1716
}else {
1817
TRUE
1918
}
20-
2119
}
2220

2321
is_string<-function(x) {
@@ -150,22 +148,28 @@ is_dependencies <- function(x) {
150148
valid<-function(x) {
151149
x%in%dep_types|x%in% extra_config_fields(x)
152150
}
153-
if (is_na_scalar(x)|| isTRUE(x)|| identical(x,FALSE)||
151+
if (
152+
is_na_scalar(x)||
153+
isTRUE(x)||
154+
identical(x,FALSE)||
154155
(is_character(x)&& all(valid(x)))||
155-
(is.list(x)&& all(names(x)== c("direct","indirect"))&&
156-
all(valid(unlist(x))))) {
156+
(is.list(x)&&
157+
all(names(x)== c("direct","indirect"))&&
158+
all(valid(unlist(x))))
159+
) {
157160
return(TRUE)
158161
}
159162

160163
structure(
161164
FALSE,
162165
msg= c(
163-
"{.arg {(.arg)}} must be one of the following: {.code NA},
166+
"{.arg {(.arg)}} must be one of the following: {.code NA},
164167
{.code TRUE}, {.code FALSE}, a character vector of dependency types,
165168
a named list with entries {.code direct} and {.code indirect},
166169
both character vectors of dependency types.",
167170
"i"="valid dependency types are: {.val {dep_types}}, and
168-
{.code config/needs/*} types"),
171+
{.code config/needs/*} types"
172+
),
169173
env= environment()
170174
)
171175
}
@@ -208,8 +212,13 @@ is_difftime <- function(x) {
208212
}
209213

210214
is_count<-function(x,min=0L) {
211-
if (is.numeric(x)&& length(x)==1&&!is.na(x)&&
212-
as.integer(x)==x&&x>=min) {
215+
if (
216+
is.numeric(x)&&
217+
length(x)==1&&
218+
!is.na(x)&&
219+
as.integer(x)==x&&
220+
x>=min
221+
) {
213222
return(TRUE)
214223
}
215224
if (!is.numeric(x)|| length(x)!=1|| (!is.na(x)&& as.integer(x)!=x)) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp