Skip to content

Commit d70b049

Browse files
committed
Add commens
1 parent 9061064 commit d70b049

44 files changed

Lines changed: 57 additions & 103 deletions

Some content is hidden

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

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Description: Implements a task queue system for asynchronous parallel computing
1111
Dynamically distributes tasks to workers, handles uneven load balancing, and
1212
allows new workers to join at any time. Particularly useful for running large
1313
numbers of independent tasks on high-performance computing (HPC) clusters with
14-
'SLURM' job schedulers.
14+
'SLURM' <https://slurm.schedmd.com/> job schedulers.
1515
URL: https://taskqueue.bangyou.me/,
1616
https://github.com/byzheng/taskqueue
1717
BugReports: https://github.com/byzheng/taskqueue/issues

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export(resource_add)
2121
export(resource_get)
2222
export(resource_list)
2323
export(shiny_app)
24-
export(slurm_deploy)
2524
export(task_add)
2625
export(task_clean)
2726
export(task_get)

R/apply.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
#'
6363
#' @examples
6464
#' \dontrun{
65+
#' # Not run:
6566
#' # Simple example
6667
#' my_simulation <- function(i, param) {
6768
#' out_file <- sprintf("results/sim_%04d.Rds", i)

R/db.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#'
2929
#' @examples
3030
#' \dontrun{
31+
#' # Not run:
3132
#' # Create a new connection
3233
#' con <- db_connect()
3334
#'
@@ -75,6 +76,7 @@ db_connect <- function(con = NULL) {
7576
#'
7677
#' @examples
7778
#' \dontrun{
79+
#' # Not run:
7880
#' # Connect and disconnect
7981
#' con <- db_connect()
8082
#' # ... perform database operations ...
@@ -116,6 +118,7 @@ db_disconnect <- function(con) {
116118
#'
117119
#' @examples
118120
#' \dontrun{
121+
#' # Not run:
119122
#' # Initialize database (run once)
120123
#' db_init()
121124
#'
@@ -162,6 +165,7 @@ db_init <- function() {
162165
#'
163166
#' @examples
164167
#' \dontrun{
168+
#' # Not run:
165169
#' # Clean entire database (destructive!)
166170
#' db_clean()
167171
#'
@@ -268,6 +272,7 @@ table_exist <- function(table, con = NULL) {
268272
#'
269273
#' @examples
270274
#' \dontrun{
275+
#' # Not run:
271276
#' # Test connection
272277
#' if (is_db_connect()) {
273278
#' message("Database is accessible")

R/deploy.R

Lines changed: 0 additions & 46 deletions
This file was deleted.

R/options.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ TASKQUEUE_OPTIONS <- settings::options_manager(
4242
#' @seealso \code{\link{taskqueue_reset}}, \code{\link{db_connect}}
4343
#'
4444
#' @examples
45-
#' \dontrun{
4645
#' # View all current options
4746
#' taskqueue_options()
4847
#'
@@ -54,7 +53,6 @@ TASKQUEUE_OPTIONS <- settings::options_manager(
5453
#'
5554
#' # Reset to environment variable values
5655
#' taskqueue_reset()
57-
#' }
5856
#' @export
5957
taskqueue_options <- function(...){
6058
# protect against the use of reserved words.
@@ -83,13 +81,11 @@ taskqueue_options <- function(...){
8381
#' @seealso \code{\link{taskqueue_options}}
8482
#'
8583
#' @examples
86-
#' \dontrun{
8784
#' # Override options temporarily
8885
#' taskqueue_options(host = "test.server.com")
8986
#'
9087
#' # Reset to environment variable values
9188
#' taskqueue_reset()
92-
#' }
9389
#' @export
9490
taskqueue_reset <- function() {
9591
settings::reset(TASKQUEUE_OPTIONS)

R/project.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
#'
6767
#' @examples
6868
#' \dontrun{
69+
#' # Not run:
6970
#' # Create a project with default memory
7071
#' project_add("simulation_study")
7172
#'
@@ -148,6 +149,7 @@ project_add <- function(project, memory = 10) {
148149
#'
149150
#' @examples
150151
#' \dontrun{
152+
#' # Not run:
151153
#' # Start project to enable workers
152154
#' project_start("simulation_study")
153155
#'
@@ -188,6 +190,7 @@ project_start <- function(project, con = NULL) {
188190
#'
189191
#' @examples
190192
#' \dontrun{
193+
#' # Not run:
191194
#' # Stop project and cancel all jobs
192195
#' project_stop("simulation_study")
193196
#'
@@ -261,6 +264,7 @@ project_stop <- function(project) {
261264
#'
262265
#' @examples
263266
#' \dontrun{
267+
#' # Not run:
264268
#' # Reset project and clean logs
265269
#' project_reset("simulation_study")
266270
#'
@@ -320,6 +324,7 @@ project_reset <- function(project, log_clean = TRUE) {
320324
#'
321325
#' @examples
322326
#' \dontrun{
327+
#' # Not run:
323328
#' # Get project details
324329
#' info <- project_get("simulation_study")
325330
#' print(info$status) # Check if running
@@ -379,6 +384,7 @@ project_resource_get <- function(project, resource = NULL, con = NULL) {
379384
#'
380385
#' @examples
381386
#' \dontrun{
387+
#' # Not run:
382388
#' # List all projects
383389
#' projects <- project_list()
384390
#' print(projects)
@@ -426,6 +432,7 @@ project_list <- function(con = NULL) {
426432
#'
427433
#' @examples
428434
#' \dontrun{
435+
#' # Not run:
429436
#' # Delete a completed project
430437
#' project_delete("old_simulation")
431438
#'
@@ -485,6 +492,7 @@ project_delete <- function(project, con = NULL) {
485492
#'
486493
#' @examples
487494
#' \dontrun{
495+
#' # Not run:
488496
#' # Check project status
489497
#' project_status("simulation_study")
490498
#' }

R/project_resource.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
#'
7979
#' @examples
8080
#' \dontrun{
81+
#' # Not run:
8182
#' # Assign resource to project with basic settings
8283
#' project_resource_add(
8384
#' project = "simulation_study",
@@ -191,6 +192,7 @@ project_resource_add <- function(project,
191192
#'
192193
#' @examples
193194
#' \dontrun{
195+
#' # Not run:
194196
#' # Delete logs for specific project-resource
195197
#' project_resource_log_delete("simulation_study", "hpc")
196198
#' }
@@ -250,6 +252,7 @@ project_resource_log_delete <- function(project,
250252
#'
251253
#' @examples
252254
#' \dontrun{
255+
#' # Not run:
253256
#' # Add a job (typically done automatically by worker_slurm)
254257
#' project_resource_add_jobs("simulation_study", "hpc", "job_12345")
255258
#'

R/resource.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#'
4242
#' @examples
4343
#' \dontrun{
44+
#' # Not run:
4445
#' # List all resources
4546
#' resources <- resource_list()
4647
#' print(resources)
@@ -76,6 +77,7 @@ resource_list <- function() {
7677
#'
7778
#' @examples
7879
#' \dontrun{
80+
#' # Not run:
7981
#' # Get specific resource
8082
#' hpc_info <- resource_get("hpc")
8183
#' print(hpc_info$workers) # Maximum workers
@@ -134,6 +136,7 @@ resource_get <- function(resource, con = NULL) {
134136
#'
135137
#' @examples
136138
#' \dontrun{
139+
#' # Not run:
137140
#' # Add a SLURM cluster resource
138141
#' resource_add(
139142
#' name = "hpc",

R/shiny_app.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#'
2121
#' @examples
2222
#' \dontrun{
23+
#' # Not run:
2324
#' # Launch monitoring app
2425
#' shiny_app()
2526
#' }

0 commit comments

Comments
 (0)