Skip to content

replace gdxrrw - #153

Merged
fbenke-pik merged 7 commits into
pik-piam:masterfrom
fbenke-pik:gdx
Sep 23, 2026
Merged

fbenke-pik merged 7 commits into
pik-piam:masterfrom
fbenke-pik:gdx

Conversation

@fbenke-pik

@fbenke-pik fbenke-pik commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor
  • replace reading in data from gdx to data frame using gdxrrw to piamutils::readGdxToDf using gamstransfer
  • remove all traces from gdxrrw in the code (also for the test cases)
  • fix some warnings and notes in other legacy code thrown by buildLibrary, namely in createMultiLinePlotsByVariable, scenToolMAgPIE, scenTool
  • delete scratchBar.R, as is doesn't seem to be used anymore (checked via reposearch)

@pascal-sauer pascal-sauer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

piamutils::readGdxToDf replaces the removed dataframeFromGdx?

Comment thread R/getPlotData.R Outdated
#' iteration order, e.g. pathToGdx[1] should hold data for the first iteration, pathToGdx[2] for the
#' second iteration etc. If the path to a folder is given the fulldata gdx files in it are used.
#' @param ... Additional arguments passed to gdxrrw::rgdx.
#' @param ... Additional arguments passed to gamstransfer::readGDX.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
#' @param ... Additional arguments passed to gamstransfer::readGDX.
#' @param ... Additional arguments passed to piamutils::readGdxToDf.

Comment thread R/getPlotData.R
#' etc. The last column will always be the actual value column called <symbolName>.
#' @author Pascal Führlich
#' @seealso \code{\link{mipIterations}}, \code{\link{dataframeFromGdx}}
#' @author Pascal Sauer

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks :D

Comment thread R/scenTool.R Outdated

ggname <- function(x) {
if (class(x) != "character") {
if ("character" != class(x)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why was this changed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To fix a note halfheartedly. I changed it again with a proper fix.

Comment thread tests/testthat/test-getPlotData.R Outdated
testFile <- file.path(tempDir, "fulldata.gdx")
gdxrrw::wgdx.lst(testFile, testData)
piamutils::writeDfToGDXparameter(testData, gdxFileName = testFile,
paramName = "testSymbolName", valueCol = "testSymbolName")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

indentation

@fbenke-pik
fbenke-pik merged commit 8c1dc1f into pik-piam:master Sep 23, 2026
1 check passed
@fbenke-pik
fbenke-pik deleted the gdx branch September 23, 2026 09:45
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.

2 participants