Experimental/adding singlerun headless capabilty#179
Merged
justin-ven merged 9 commits intodevelopfrom Jun 10, 2025
Merged
Conversation
Collaborator
Author
EditIt works now! will do a full single run headlessly using |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces headless single-run capability for singlerun.jar, allowing full simulation runs without the GUI and adds corresponding CLI flags and CI validation.
- Adjust default population size for quicker test runs
- Add
doSetup/doRunflags with newRunCLI option and headless execution loop inSimPathsStart - Extend GitHub Actions workflow to invoke a full setup-and-run of the headless jar
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/main/java/simpaths/model/SimPathsModel.java | Updated default popSize from 170000 to 50000 |
| src/main/java/simpaths/experiment/SimPathsStart.java | Introduced doSetup/doRun, new CLI options, headless loop, and conditional observer registration |
| .github/workflows/SimPathsBuild.yml | Added run-simpaths-start job to validate headless setup & run |
Comments suppressed due to low confidence (3)
src/main/java/simpaths/experiment/SimPathsStart.java:51
- [nitpick] The flags
doSetupanddoRunare somewhat ambiguous; consider renaming tosetupOnly/runOnlyor similar to clearly express their intent.
private static boolean doSetup = true;
.github/workflows/SimPathsBuild.yml:61
- The workflow currently only verifies input files; consider adding checks for expected output artifacts (e.g., simulation results) to ensure the headless run completes successfully.
run: java -jar singlerun.jar -c UK -s 2019 -g false --rewrite-policy-schedule
src/main/java/simpaths/experiment/SimPathsStart.java:229
- Omitting the observer in headless mode may disable critical observation logic. Verify that removing the observer for non-GUI runs does not impact required data collection or reporting.
if (showGui) engine.addSimulationManager(observer);
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
|
Good to hear that you found a work-around |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
singlerun.jarto do a full runRunto cli to potentially allow run only (as opposed to setup only - tests for mutually exclusive argument conflicts)Why
SimPathsStartfull run, doing a headless replication of what the GUI does to make sure it worksWhy it doesn't actually work
SimPathsStart.main()currently cannot exit.engine.startSimulation()and never returns? Where should a return statement be added to find 'the end', but allow GUI runs to keep programme running?Questions
singlerun.jar -g false -Runtest, is this best done as a maven integration test or a github actions test @igelstorm?