Include CLI tools version of example command lines

This commit is contained in:
Lee Spector 2023-04-16 09:11:54 -04:00 committed by GitHub
parent fa9d0a3740
commit 6eccd21ece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,18 +18,21 @@ the calls to `require` and `gp/gp`.
To run Propeller from the command line, on a genetic programming problem 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 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 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 To start a run use `clj -M -m <namespace>` or
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
`lein run -m <namespace>`, replacing `<namespace>` `lein run -m <namespace>`, replacing `<namespace>`
with the actual namespace that you will find at the top of the problem file. 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: 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 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 be provided to override the default key/value pairs specified in the
problem file, for example: 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 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 like the following to send output both to the terminal
and to a text file (called `outfile` in this example): 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 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 value for the `:variation` argument, which is a clojure map
containing curly brackets that may confuse your shell: 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}" lein run -m propeller.problems.simple-regression :variation "{:umad 1.0}"
``` ```