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

Harmonize behavior for hierarchic and flat naming strategy #838

Open
t-ober opened this issue Jun 14, 2023 · 0 comments
Open

Harmonize behavior for hierarchic and flat naming strategy #838

t-ober opened this issue Jun 14, 2023 · 0 comments
Labels
code quality Code readability or structure is improved

Comments

@t-ober
Copy link
Contributor

t-ober commented Jun 14, 2023

Within the hierarchic naming strategy we create a folder with the grid name in the base directory so the actual base directory is different as when dealing with a flat grid.

Here is a code example. Notice that we therefore build the csv file sink in a different way in both cases. I think that should me harmonized by probably removing the gridname folder in the hierarchic version.

      val csvSink = if (simbenchConfig.io.output.csv.directoryHierarchy) {
        new CsvFileSink(
          baseTargetDirectory,
          new FileNamingStrategy(
            new EntityPersistenceNamingStrategy(),
            new DefaultDirectoryHierarchy(baseTargetDirectory, simbenchCode)
          ),
          false,
          simbenchConfig.io.output.csv.separator
        )
      } else {
        new CsvFileSink(
          baseTargetDirectory + simbenchCode,
          new FileNamingStrategy(),
          false,
          simbenchConfig.io.output.csv.separator
        )
      }
@sebastian-peter sebastian-peter added the code quality Code readability or structure is improved label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Code readability or structure is improved
Projects
None yet
Development

No branches or pull requests

2 participants