From 6eccd21ece1c71b65a1bbf47d309e1c3e3cd0a06 Mon Sep 17 00:00:00 2001 From: Lee Spector Date: Sun, 16 Apr 2023 09:11:54 -0400 Subject: [PATCH] Include CLI tools version of example command lines --- README.md | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4235aff..0e18818 100644 --- a/README.md +++ b/README.md @@ -18,18 +18,21 @@ the calls to `require` and `gp/gp`. To run Propeller from the command line, on a genetic programming problem that is defined within this project, you will probably want to use either the Clojure [CLI tools](https://clojure.org/guides/deps_and_cli) or -[leiningen](https://leiningen.org). +[leiningen](https://leiningen.org). In the examples below, the leiningen +and CLI commands are identical except that the former begin with +`lein run -m`, while the latter begin with `clj -M -m`. -The instructions below are written for leiningen. If you are using -the CLI tools instead, then replace `lein run -m` in each command -with `clj -M -m`. - -If you are using leiningen, then you can start a run with the command +To start a run use `clj -M -m ` or `lein run -m `, replacing `` with the actual namespace that you will find at the top of the problem file. For example, you can run the simple-regression genetic programming problem with: +``` +clj -M -m propeller.problems.simple-regression +``` +or + ``` lein run -m propeller.problems.simple-regression ``` @@ -38,6 +41,11 @@ Additional command-line arguments may be provided to override the default key/value pairs specified in the problem file, for example: +``` +clj -M -m propeller.problems.simple-regression :population-size 100 +``` + +or ``` lein run -m propeller.problems.simple-regression :population-size 100 @@ -47,6 +55,13 @@ On Unix operating systems, including MacOS, you can use something like the following to send output both to the terminal and to a text file (called `outfile` in this example): + +``` +clj -M -m propeller.problems.simple-regression | tee outfile +``` + +or + ``` lein run -m propeller.problems.simple-regression | tee outfile ``` @@ -58,6 +73,12 @@ quotes, like in this example that provides a non-default value for the `:variation` argument, which is a clojure map containing curly brackets that may confuse your shell: +``` +clj -M -m propeller.problems.simple-regression :variation "{:umad 1.0}" +``` + +or + ``` lein run -m propeller.problems.simple-regression :variation "{:umad 1.0}" ```