From a68f1bdfbc9e5663c8a25f33bd7aef54d4f89168 Mon Sep 17 00:00:00 2001 From: Lee Spector Date: Wed, 15 Mar 2023 22:48:45 -0400 Subject: [PATCH] Update README.md Add instructions for using CLI tools. Remove instructions for working at REPL, which are superseded by the instructions for using `session.cljc`. --- README.md | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 8618317..8af38f0 100644 --- a/README.md +++ b/README.md @@ -12,15 +12,17 @@ evaluate the namespace declaration and the commented-out expressions therein. These demonstrate core components of Propeller including complete genetic programming runs. -[TODO: Add instructions for running Propeller from the command line -using the Clojure [CLI](https://clojure.org/guides/deps_and_cli) -command-line tools. This is supported (we included a `deps.edn` -configuration file), but not yet documented here.] +To run Propeller on a genetic programming that is defined within this +project from the command line, you will probably want to use either +the Clojure [CLI tools](https://clojure.org/guides/deps_and_cli) or +[leiningen](https://leiningen.org). -If you have installed [leiningen](https://leiningen.org), which is a tool -for running Clojure programs, then you can run Propeller on a genetic -programming problem that is defined within this project from the command -line with the command `lein run -m `, replacing `` +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 ruh with the command +`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: @@ -57,22 +59,6 @@ containing curly brackets that may confuse your shell: lein run -m propeller.problems.simple-regression :variation "{:umad 1.0}" ``` -To run a genetic programming problem from a REPL, start -your REPL for the project (e.g. with `lein repl` at the -command line when in the project directory, or through your -IDE) and then do something like the following (which in -this case runs the simple-regression problem with -`:population-size` 100): - -``` -(require 'propeller.problems.simple-regression) -(in-ns 'propeller.problems.simple-regression) -(-main :population-size 100 :variation {:umad 1.0}) -``` - -If you want to run the problem with the default parameters, -then you should call `-main` without arguments, as `(-main)`. - ## CLJS Usage