gilt-paints

A solution in Clojure to a combinatorial search-and-optimisation problem posed by Gilt.

Requirements

The usual way to run Clojure is to use Leiningen. Of course, Clojure is a JVM language, so you'll need to install a Java SDK.

Test-runs

Assuming you have Leiningen installed, change to the root directory of the repository and run:

lein deps

...to install Clojure itself and the libraries on which the code depends.

Then:

lein spec

...to run a set of four Speclj tests. These tests simply load test-files of sample data provided by Gilt; and pass them to the master-function in the code; then compare the outputs against the expected results.

Building a standalone program

To obtain an executable program, use Lein bin. As a pre-requisite, you'll need a profiles.clj file, in the location:

~/.lein/profiles.clj

...which should contain the plugin as follows:

{:user {:plugins [ [lein-bin "0.3.4"] ] }}

Given the above, run:

lein bin

Afterwards, to run the program with the first test-file as input, run:

target/giltpaints -f test-data/test-input-file-1.txt

License

Copyright © 2016 Kevin Noonan.

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.