Skip to content

Commit 1689b4b

Browse files
committed
configs of the vernose options
1 parent 0e286da commit 1689b4b

10 files changed

Lines changed: 40 additions & 25 deletions

File tree

@export/index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,14 @@ declare namespace WorkflowRender {
167167
/**
168168
* @param relpath default value Is ``null``.
169169
* @param ssid default value Is ``null``.
170+
* @param verbose default value Is ``false``.
170171
*/
171-
function workfile(app: any, relpath?: any, ssid?: any): object;
172+
function workfile(app: any, relpath?: any, ssid?: any, verbose?: any): object;
172173
/**
173174
* @param ssid default value Is ``null``.
175+
* @param verbose default value Is ``false``.
174176
*/
175-
function workspace(app: any, ssid?: any): object;
177+
function workspace(app: any, ssid?: any, verbose?: any): object;
176178
/**
177179
* @param ssid default value Is ``null``.
178180
*/

R/context/workspace.R

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,22 @@
1111
#' @details the verbose option could be config from the
1212
#' commandline option: ``--verbose``
1313
#'
14-
const workspace = function(app, ssid = NULL) {
15-
const verbose = as.logical(getOption("verbose"));
16-
const context = .get_context(ssid);
17-
const temp_root = context$temp_dir;
18-
const app_name = get_app_name(app);
19-
const workdir = normalizePath(`${temp_root}/workflow_tmp/${app_name}/`);
20-
const program = context$pipeline;
14+
const workspace = function(app, ssid = NULL, verbose = FALSE) {
15+
const verboseOpt = as.logical(getOption("verbose", default = verbose));
16+
const context = .get_context(ssid);
17+
const temp_root = context$temp_dir;
18+
const app_name = get_app_name(app);
19+
const workdir = normalizePath(`${temp_root}/workflow_tmp/${app_name}/`);
20+
const program = context$pipeline;
2121

22-
if (verbose) {
22+
if (verboseOpt) {
2323
print("view of the given app object for get its workspace dir:");
2424
print("get app_name:");
2525
str(app_name);
2626
print("get pipeline workflow components:");
2727
str(program);
28-
# str(app);
28+
print("combine the workdir path:");
29+
print(workdir);
2930
};
3031

3132
if (!(app_name in program)) {
@@ -53,19 +54,19 @@ const workspace = function(app, ssid = NULL) {
5354
#' ``mzset.txt``. so, such configuation could be equals to the function invoke
5455
#' of the workfile function: ``workfile("getMzSet", "/mzset.txt");``.
5556
#'
56-
const workfile = function(app, relpath = NULL, ssid = NULL) {
57+
const workfile = function(app, relpath = NULL, ssid = NULL, verbose = FALSE) {
5758
if (is.empty(relpath)) {
5859
if (is.character(app)) {
5960
relpath <- __workfile_uri_parser(app);
6061

6162
# gets the internal workfile reference
6263
# its physical file path
63-
file.path(WorkflowRender::workspace(relpath$app, ssid), relpath$file);
64+
file.path(WorkflowRender::workspace(relpath$app, ssid, verbose = verbose), relpath$file);
6465
} else {
6566
throw_err("the given expression value should be an internal workfile path reference!");
6667
}
6768
} else {
68-
file.path(WorkflowRender::workspace(app, ssid), relpath);
69+
file.path(WorkflowRender::workspace(app, ssid, verbose = verbose), relpath);
6970
}
7071
}
7172

man/index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

man/result_dir.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ a character vector of the analysis result output directory.
1515
.PP
1616
.SH FILES
1717
.PP
18-
SMRUCC/R#.declare_function.result_dir at workspace.R:line 87
18+
SMRUCC/R#.declare_function.result_dir at workspace.R:line 88
1919
.PP
2020
.SH COPYRIGHT
2121
Copyright © xieguigang, MIT Licensed 2025

man/workdir_root.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ actually this function will returns the ``output`` dir path which is set via the
1515
.PP
1616
.SH FILES
1717
.PP
18-
SMRUCC/R#.declare_function.workdir_root at workspace.R:line 78
18+
SMRUCC/R#.declare_function.workdir_root at workspace.R:line 79
1919
.PP
2020
.SH COPYRIGHT
2121
Copyright © xieguigang, MIT Licensed 2025

man/workfile.1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
.SH NAME
33
workfile \- workfile(app,
44
<i>relpath</i> = <span style='color: blue !important;'>NULL</span>,
5-
<i>ssid</i> = <span style='color: blue !important;'>NULL</span>)
5+
<i>ssid</i> = <span style='color: blue !important;'>NULL</span>,
6+
<i>verbose</i> = <span style='color: blue !important;'>FALSE</span>)
67
.SH SYNOPSIS
78
\fIworkfile(app,
89
<i>relpath</i> = <span style='color: blue !important;'>NULL</span>,
9-
<i>ssid</i> = <span style='color: blue !important;'>NULL</span>)\fR
10+
<i>ssid</i> = <span style='color: blue !important;'>NULL</span>,
11+
<i>verbose</i> = <span style='color: blue !important;'>FALSE</span>)\fR
1012
.SH OPTIONS
1113
.PP
1214
\fBapp\fB \fR\- .
@@ -17,6 +19,9 @@ workfile \- workfile(app,
1719
.PP
1820
\fBssid\fB \fR\- NULL. the session id for multiple user environment, default NULL means global user environment
1921
.PP
22+
.PP
23+
\fBverbose\fB \fR\- FALSE.
24+
.PP
2025
.SH VALUE
2126
.PP
2227
the data file path of the required reference file inside this workflow
@@ -27,7 +32,7 @@ the workfile path expression is in format string of: ``app://filepath``, example
2732
.PP
2833
.SH FILES
2934
.PP
30-
SMRUCC/R#.declare_function.workfile at workspace.R:line 56
35+
SMRUCC/R#.declare_function.workfile at workspace.R:line 57
3136
.PP
3237
.SH COPYRIGHT
3338
Copyright © xieguigang, MIT Licensed 2025

man/workspace.1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
.TH WORKSPACE 1 2025-Aug "" "get app workspace location"
22
.SH NAME
33
workspace \- workspace(app,
4-
<i>ssid</i> = <span style='color: blue !important;'>NULL</span>)
4+
<i>ssid</i> = <span style='color: blue !important;'>NULL</span>,
5+
<i>verbose</i> = <span style='color: blue !important;'>FALSE</span>)
56
.SH SYNOPSIS
67
\fIworkspace(app,
7-
<i>ssid</i> = <span style='color: blue !important;'>NULL</span>)\fR
8+
<i>ssid</i> = <span style='color: blue !important;'>NULL</span>,
9+
<i>verbose</i> = <span style='color: blue !important;'>FALSE</span>)\fR
810
.SH OPTIONS
911
.PP
1012
\fBapp\fB \fR\- .
1113
.PP
1214
.PP
1315
\fBssid\fB \fR\- NULL. the session id for multiple user environment, default NULL means global user environment
1416
.PP
17+
.PP
18+
\fBverbose\fB \fR\- FALSE.
19+
.PP
1520
.SH VALUE
1621
.PP
1722
a character vector of the workspace directory path of the specific analysis application.

man/workspace_temproot.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ workspace_temproot \- workspace_temproot(
1111
.PP
1212
.SH FILES
1313
.PP
14-
SMRUCC/R#.declare_function.workspace_temproot at workspace.R:line 91
14+
SMRUCC/R#.declare_function.workspace_temproot at workspace.R:line 92
1515
.PP
1616
.SH COPYRIGHT
1717
Copyright © xieguigang, MIT Licensed 2025

vignettes/R/docs/workfile.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ <h3>Usage</h3>
2929
<div style="width: 100%; padding-left: 3%; color: black;">
3030
<pre><code class='language-R' style="color: black; font-weight:normal;"><strong>workfile</strong>(<i>app</i>,
3131
<i>relpath</i> = <span style='color: blue !important;'>NULL</span>,
32-
<i>ssid</i> = <span style='color: blue !important;'>NULL</span>);</code></pre>
32+
<i>ssid</i> = <span style='color: blue !important;'>NULL</span>,
33+
<i>verbose</i> = <span style='color: blue !important;'>FALSE</span>);</code></pre>
3334
</div>
3435

3536
<h3>Arguments</h3>

vignettes/R/docs/workspace.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ <h3>Usage</h3>
2828

2929
<div style="width: 100%; padding-left: 3%; color: black;">
3030
<pre><code class='language-R' style="color: black; font-weight:normal;"><strong>workspace</strong>(<i>app</i>,
31-
<i>ssid</i> = <span style='color: blue !important;'>NULL</span>);</code></pre>
31+
<i>ssid</i> = <span style='color: blue !important;'>NULL</span>,
32+
<i>verbose</i> = <span style='color: blue !important;'>FALSE</span>);</code></pre>
3233
</div>
3334

3435
<h3>Arguments</h3>

0 commit comments

Comments
 (0)