Package 'modelstats'

Title: Run Analysis Tools
Description: A collection of tools to analyze model runs.
Authors: Anastasis Giannousakis [aut, cre], Oliver Richters [aut]
Maintainer: Anastasis Giannousakis <[email protected]>
License: LGPL-3
Version: 0.22.1
Built: 2024-12-02 14:22:22 UTC
Source: https://github.com/pik-piam/modelstats

Help Index


modelstats: Run Analysis Tools

Description

A collection of tools to analyze model runs.

Author(s)

Maintainer: Anastasis Giannousakis [email protected]

Authors:

  • Oliver Richters

See Also

Useful links:


colRunType

Description

What is the type of this run?

Usage

colRunType(mydir = ".")

Arguments

mydir

Path to the folder where the run is performed

Author(s)

Anastasis Giannousakis


foundInSlurm

Description

Is the run found in SLURM?

Usage

foundInSlurm(mydir = ".", user = NULL)

Arguments

mydir

Path to the folder(s) where the run(s) is(are) performed

user

the user whose runs will be sought for

Author(s)

Anastasis Giannousakis, Oliver Richters


getRunStatus

Description

Returns the current status of a run or a vector of runs

Usage

getRunStatus(mydir = dir(), sort = "nf", user = NULL)

Arguments

mydir

Path to the folder(s) where the run(s) is(are) performed

sort

how to sort (nf=newest first)

user

the user whose runs will be shown

Author(s)

Anastasis Giannousakis

Examples

## Not run: 

a <- getRunStatus(dir())

## End(Not run)

loopRuns

Description

Returns the output for getRunStatus nicely

Usage

loopRuns(mydir, user = NULL, colors = TRUE, sortbytime = TRUE)

Arguments

mydir

a dir or vector of dirs

user

the user whose runs will be shown

colors

boolean whether the output is colored dependent on runstatus

sortbytime

boolean whether the output is sorted by timestamp

Author(s)

Anastasis Giannousakis

Examples

## Not run: 

loopRuns(dir())

## End(Not run)

modeltests

Description

Runs a group of tests for a specific model. A "config/scenario_config.csv" file (relative) to the main folder has to exist in the model, describing the scenarios to be tested. Also, a gitlab repository is needed to push the generated README.md for documentation and automated reporting of test results.

Usage

modeltests(
  mydir = ".",
  gitdir = NULL,
  model = NULL,
  user = NULL,
  test = NULL,
  email = TRUE,
  compScen = TRUE,
  mattermostToken = NULL
)

Arguments

mydir

Path to the folder where the model is found

gitdir

path to the git clone that sends the report via email

model

Model name

user

the user that starts the job and commits the changes

test

Use this option to run a test of the workflow (no runs will be submitted) The test parameter needs to be of the form "YY-MM-DD"

email

whether an email notification will be send or not

compScen

whether compScen has to run or not

mattermostToken

token used for mattermost notifications

Author(s)

Anastasis Giannousakis, David Klein

See Also

package2readme


printOutput

Description

Returns the output for getRunStatus nicely

Usage

printOutput(string, len1stcol = 67, lenCols = NULL, colSep = "   ")

Arguments

string

String to print

len1stcol

length of first column

lenCols

vector with length information for all columns

colSep

string separating the columns

Author(s)

Anastasis Giannousakis


promptAndRun

Description

prompts runs, will be called by rs2

Usage

promptAndRun(mydir = ".", user = NULL, daysback = 3)

Arguments

mydir

a dir or vector of dirs

user

the user whose runs will be shown. For -t, the pattern used for matching

daysback

integer defining the number of days -c will look back in time to find runs

Author(s)

Anastasis Giannousakis, Oliver Richters

Examples

## Not run: 
  promptAndRun()

## End(Not run)