Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-1718

Run demo with a single command

    XMLWordPrintable

Details

    Description

      • Eliminate the need to do npm start and mvn spring-boot:run. Besides it's two steps instead of one, it's also a lot of information to remember for someone who doesn't work with the app every day and it's inconvenient having to look up the commands in the Readme.
      • Create run.sh that automatically builds the project with Maven if it's a fresh clone or if the built artifacts' version doesn't match currently checked out version. Then it will launch the single-jar demo app.
      • What about data sets? Ideally ./run.sh belgium where "belgium" can be replaced with arbitrary name. The data set name would then map to a combination of
        • OSM region
        • country code list
        • data set to load upon startup
      • How to store these combinations is to be figured out yet. Perhaps in Spring profiles, so for example:
      application-local-belgium200.properties
      app.region.country-codes=BE
      app.routing.osm-file=belgium-latest.osm.pbf
      app.demo.data-set=belgium-200-cities.yaml
      

      Strawman CLI

      Use case 0: getting started (most important)

      Get started as quickly as possible after a fresh clone without minimal setup, questions, decisions.

      Option A

      No args means use defaults.

      ./runLocally.sh
      VRP dir: /home/jlocker/.vrp
      Hint: To change VRP dir, region, ..., use --interactive
      

      Option B

      One argument to use defaults. No arg means --help.

      ./runLocally.sh --demo/--quickstart/--defaults or something
      
      ./runLocally
      Hint: To start with defaults, use --quickstart.
      Hint: To change vrp dir, region, ... use --interactive/--config
      

      Use case 1: configuration (prepare for a demo)

      Let's you

      • change VRP dir
      • change region
      • download more OSM files
      • change country code associated with a region?
      ./runLocally.sh --interactive (-i)/--config (-c)
      

      Use case 2: Showing a demo

      You have all the data prepared, you want to start with as little arguments as possible but not use the default out-of-the-box demo

      ./runLocally.sh boston
      

      Loads the boston.osm.pbf.

      Default VRP dir

      ~/.vrp is the default VRP dir. It will be used without asking. It will be printed on output on every run. Possible to change it in interactive mode. Current VRP dir is stored in PROJECT_ROOT/.VRP_DIR_LAST.

      Attachments

        Issue Links

          Activity

            People

              jlocker Jiří Locker
              jlocker Jiří Locker
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: