2 ;;; Time-stamp: <2010-01-14 08:01:08 tony>
3 ;;; Created: <2005-05-30 17:09:47 blindglobe>
5 ;;; Author: AJ Rossini <blindglobe@gmail.com>
6 ;;; Copyright: (c) 2005--2008, by AJ Rossini <blindglobe@gmail.com>
7 ;;; License: BSD, see the top level directory file LICENSE for details.
8 ;;; Purpose: ASDF packaging for CommonLisp Stat
10 ;;; What is this talk of 'release'? Klingons do not make software
11 ;;; 'releases'. Our software 'escapes', leaving a bloody trail of
12 ;;; designers and quality assurance people in its wake.
14 ;; Load ASDF if it isn't loaded
15 #-asdf(load (pathname (concatenate 'string (namestring *cls-external-dir*) "asdf")))
19 ;;; enforce all floating reads as doubles
20 ;; (setf *read-default-float-format* 'double-float)
22 ;;; optimization settings
23 ;; (proclaim '(optimize (safety 2) (space 3) (speed 3)))
25 (defpackage :lisp-stat-config
26 (:documentation "holds configuration variables, support functions, and ASDF structure.")
27 (:nicknames :cls-config)
29 (:export *common-lisp-stat-version*
31 *lsos-files* *basic-files* *ls-files*
32 *cls-home-dir* *cls-data-dir* *cls-examples-dir*))
34 (in-package :lisp-stat-config)
36 (defvar *common-lisp-stat-version* "1.0 Alpha 1"
37 "Version currently loaded and being used. Need to make into a
38 parseable object for version testing.")
40 (defvar *default-path* "./")
42 (defparameter *cls-home-dir*
44 (truename (asdf:system-definition-pathname :cls)))
45 "Value considered \"home\" for our data")
49 ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"w
50 ;; #p"/home/tony/sandbox/CommonLispStat.git/"
51 #p"/home/tony/sandbox/CLS.git/")
54 (macrolet ((ls-dir (root-str)
55 `(pathname (concatenate 'string
56 (namestring *cls-home-dir*) ,root-str)))
58 (ls-defdir (target-dir-var root-str)
59 `(defvar ,target-dir-var (ls-dir ,root-str))))
60 (ls-defdir *cls-asdf-dir* "ASDF/")
61 (ls-defdir *cls-data-dir* "Data/")
62 (ls-defdir *cls-external-dir* "external/")
63 ;; reminder of testing
64 ;;(macroexpand '(ls-defdir *cls-asdf-dir* "ASDF"))
65 ;;(macroexpand-1 '(ls-defdir *cls-asdf-dir* "ASDF"))
66 ;;(macroexpand-1 '(ls-dir "ASDF"))
69 ;;(pushnew *cls-asdf-dir* asdf:*central-registry*)
70 ;;(pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
72 (defpackage #:cls-system
73 (:use :common-lisp :asdf))
75 (in-package #:cls-system)
77 ;;; To avoid renaming everything from *.lsp to *.lisp...
78 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
79 ;;; NOT secure against serving multiple architectures/hardwares from
80 ;;; the same file system (i.e. PPC and x86 would not be
83 (defclass cls-lsp-source-file (cl-source-file) ())
84 (defparameter *fasl-directory*
85 (make-pathname :directory '(:relative
91 #-(or sbcl openmcl clisp cmucl) "fasl"
95 ;;; Handle Luke's *.lsp suffix
96 (defmethod source-file-type ((c cls-lsp-source-file) (s module)) "lsp")
97 (defmethod asdf::output-files :around ((operation compile-op)
98 (c cls-lsp-source-file))
99 (list (merge-pathnames *fasl-directory*
100 (compile-file-pathname (component-pathname c)))))
101 ;;; again, thanks to Cyrus for saving me time...
105 :version #.(with-open-file
106 (vers (merge-pathnames "version.lisp-expr" *load-truename*))
108 :author "A.J. Rossini <blindglobe@gmail.com>"
110 :description "Common Lisp Statistics (CLS): A System for Statistical
111 Computing with Common Lisp; based on Common LispStat (CLS alpha1) by
112 Luke Tierney <luke@stat.uiowa.edu> (apparently originally written
113 when Luke was at CMU, on leave at Bell Labs?). Last touched by him
114 in 1991, then by AJR starting in 2005."
118 :lisp-matrix ; on fnv, cl-blapack, ffa
124 :components ((:static-file "version" :pathname #p"version.lisp-expr")
125 (:static-file "LICENSE.mit")
126 (:static-file "README")
132 ((:file "packages")))
136 :pathname "src/objsys/"
138 :depends-on ("packaging")
140 ((:cls-lsp-source-file "lsobjects")))
143 :pathname "src/basics/"
145 :depends-on ("packaging" "proto-objects")
147 ((:cls-lsp-source-file "lstypes")
148 (:cls-lsp-source-file "lsfloat")
150 (:cls-lsp-source-file "compound")
151 (:cls-lsp-source-file "lsmacros"
152 :depends-on ("compound"))
154 (:cls-lsp-source-file "lsmath"
155 :depends-on ("compound"
161 :pathname "src/numerics/"
162 :depends-on ("packaging" "proto-objects" "cls-core")
164 ((:cls-lsp-source-file "cffiglue")
165 (:cls-lsp-source-file "dists"
166 :depends-on ("cffiglue"))
168 (:cls-lsp-source-file "matrices"
169 :depends-on ("cffiglue"))
170 (:cls-lsp-source-file "ladata"
171 :depends-on ("cffiglue"
174 :depends-on ("cffiglue"
181 ;; Dataframes and statistical structures.
184 :pathname "src/data/"
185 :depends-on ("packaging"
191 (:file "dataframe-array")
192 (:file "dataframe-matrixlike")
193 (:file "dataframe-listoflist")
195 (:file "data-xls-compat")
200 :pathname "src/basics/"
201 :depends-on ("packaging"
207 ((:cls-lsp-source-file "lsbasics")))
213 :pathname "src/describe/"
214 :depends-on ("packaging"
221 ((:cls-lsp-source-file "statistics")))
225 :pathname "src/visualize/"
226 :depends-on ("cls-core")
232 :pathname "src/numerics/"
233 :depends-on ("packaging"
240 ((:file "optimize")))
246 :pathname "src/stat-models/"
247 :depends-on ("packaging"
255 ((:file "regression")
256 ;; (:cls-lsp-source-file "nonlin"
257 ;; :depends-on ("regression"))
258 ;; (:cls-lsp-source-file "bayes"
259 ;; :depends-on ("regression"))
266 :depends-on ("packaging"
275 (:cls-lsp-source-file "absorbtion")
276 (:cls-lsp-source-file "diabetes")
277 (:cls-lsp-source-file "leukemia")
278 (:cls-lsp-source-file "randu")
279 (:cls-lsp-source-file "aircraft")
280 (:cls-lsp-source-file "metabolism")
281 (:cls-lsp-source-file "book")
282 (:cls-lsp-source-file "heating")
283 (:cls-lsp-source-file "oxygen")
284 (:cls-lsp-source-file "stackloss")
285 (:cls-lsp-source-file "car-prices")
286 (:cls-lsp-source-file "iris")
287 (:cls-lsp-source-file "puromycin")
288 (:cls-lsp-source-file "tutorial")))
292 :depends-on ("packaging" "proto-objects"
301 :pathname "src/unittests/"
302 :components ((:file "unittests")
303 (:file "unittests-lstypes" :depends-on ("unittests"))
304 (:file "unittests-specfn" :depends-on ("unittests"))
305 (:file "unittests-prob" :depends-on ("unittests"))
306 (:file "unittests-proto" :depends-on ("unittests"))
307 (:file "unittests-regression" :depends-on ("unittests"))
308 (:file "unittests-listoflist" :depends-on ("unittests"))
309 (:file "unittests-arrays" :depends-on ("unittests"))
310 (:file "unittests-dataframe" :depends-on ("unittests"))))))
313 (defmethod perform ((o test-op) (c (eql (find-system :cls))))
314 (describe (lift:run-tests :suite 'lisp-stat-unittests::lisp-stat-ut)))