Skip to content

180 Change all multirun testing files to use multirun.jar -DBSetup#187

Merged
justin-ven merged 7 commits intodevelopfrom
feature/180-change-all-multirun-testing-files-to-use-multirunjar--dbsetup
Jun 10, 2025
Merged

180 Change all multirun testing files to use multirun.jar -DBSetup#187
justin-ven merged 7 commits intodevelopfrom
feature/180-change-all-multirun-testing-files-to-use-multirunjar--dbsetup

Conversation

@andrewbaxter439
Copy link
Copy Markdown
Collaborator

What

  • changes all singlerun.jar -Setup calls in testing files to multirun.jar -DBSetup calls
  • creates two new config files:
    • test_create_database.yml
    • test_run.yml
  • calls respective config files in test setup/runs

Why

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Switches all testing invocations from singlerun.jar to multirun.jar -DBSetup (and corresponding run commands), adds two YAML config files, and updates the CI workflow to use those configs.

  • Integration tests now call multirun.jar with test_create_database.yml and test_run.yml
  • Two new config files (test_create_database.yml and test_run.yml) define DB setup and run parameters
  • GitHub Actions workflow updated to invoke multirun.jar with the new configs

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/test/java/simpaths/integrationtest/RunSimPathsIntegrationTest.java Updated test run invocations to use multirun.jar and YAML configs
src/main/java/simpaths/data/Parameters.java Added detection of missing CSV files to set training flag in tests
config/test_run.yml New config to override default multirun run arguments
config/test_create_database.yml New config to override default DB setup arguments
.github/workflows/SimPathsBuild.yml CI commands updated to use multirun.jar with the new YAML configs
Comments suppressed due to low confidence (2)

src/main/java/simpaths/data/Parameters.java:3323

  • [nitpick] Rename testList to a more descriptive name like csvFiles or populationCsvFiles to clarify its purpose.
Collection<File> testList = FileUtils.listFiles(new File(Parameters.getInputDirectoryInitialPopulations()), new String[]{"csv"}, false);

src/main/java/simpaths/data/Parameters.java:3323

  • Consider adding a unit test for databaseSetup when the input directory is empty to cover the new branch that sets the training flag.
Collection<File> testList = FileUtils.listFiles(new File(Parameters.getInputDirectoryInitialPopulations()), new String[]{"csv"}, false);

@andrewbaxter439 andrewbaxter439 added the enhancement New feature or request label May 30, 2025
File trainingSchedule = new File("input" + File.separator + "EUROMODoutput" + File.separator + "training" + File.separator + EUROMODpolicyScheduleFilename + ".xlsx");
File runSchedule = new File("input" + File.separator + EUROMODpolicyScheduleFilename + ".xlsx");
try {
FileUtils.copyFile(trainingSchedule, runSchedule);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Just noticed that this will always copy the policy schedule if training flag is true. So this scenario is possible:

  • User runs GUI with only training data
  • User modifies policy schedule in GUI to change years
  • User runs model
  • Model then loads calculateEUROMODpolicySchedule, tests whether training flag is true, and if so overwrites user's policy file

Ideally, the training policy schedule file should always be loaded automatically at the very start if only training data is available, and this step should only occur before the user specifies the file.

Or, this file never gets used and if the policy schedule file doesn't match it checks and errors out?

@justin-ven
Copy link
Copy Markdown
Contributor

Looks good to me

@justin-ven justin-ven merged commit 5040cfa into develop Jun 10, 2025
4 checks passed
@andrewbaxter439 andrewbaxter439 deleted the feature/180-change-all-multirun-testing-files-to-use-multirunjar--dbsetup branch June 10, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants