Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suppress printing madrat standard config while running start.R #1371

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

orichters
Copy link
Contributor

Purpose of this PR

  1. Adding a test that I forgot in Fix check if path_gdx_bau is correctly set (NA for no NDC run, not NA for NDC) #1370

  2. The first scenario to be started with ./start.R always looks like that:

testOneRegi-Base
   Configuring cfg for testOneRegi-Base
   SLURM option 8 selected: qos=priority nodes=1 tasks-per-node=1 mem=8000
   Run can be started using 0 specified gdx file(s).

Initialize madrat config with default settings..
    regionmapping = regionmappingH12.csv
    extramappings = NULL
    packages = madrat
    globalenv = FALSE
    verbosity = 1
    mainfolder = /p/projects/rd3mod/inputdata
    sourcefolder = NA
    cachefolder = NA
    mappingfolder = NA
    outputfolder = NA
    pucfolder = NA
    tmpfolder = NA
    nolabels = NULL
    forcecache = FALSE
    ignorecache = NULL
    cachecompression = gzip
    hash = xxhash32
    diagnostics = FALSE
    debug = FALSE
    maxLengthLogMessage = 200
..done!

   Writing cfg to file testOneRegi-Base.RData
   If this wasn't --test mode, I would submit testOneRegi-Base.

I don't think that the madrat stuff contains any useful information, given it just reproduces these lines from madrat::initializeConfig().

This is avoided by just calling madrat::getConfig(verbose = FALSE) before starting any scenarios.

Type of change

  • Cleanup

Checklist:

  • My code follows the coding etiquette
  • I performed a self-review of my own code
  • I explained my changes within the PR, particularly in hard-to-understand areas
  • All automated model tests pass (FAIL 0 in the output of make test)
  • I don't think that needs to be mentioned in the changelog.

@orichters orichters changed the title suppress madrat standard config for start.R suppress printing madrat standard config while running start.R Aug 2, 2023
@@ -36,7 +36,7 @@ readCheckScenarioConfig <- function(filename, remindPath = ".", testmode = FALSE
}
nameisNA <- grepl("^NA$", rownames(scenConf))
if (any(nameisNA)) {
warning("Don't use 'NA' as scenario name, you fool. Stopping now.")
warning("Do not use 'NA' as scenario name, you fool. Stopping now.")
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgoing the contraction "don't", while still calling the user a fool, seems like an odd stylistic break. ;)

@orichters orichters merged commit 1b22b27 into remindmodel:develop Aug 8, 2023
1 check passed
@orichters orichters deleted the madratstuff branch December 6, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants