2 ;;; Time-stamp: <2010-01-14 08:08:39 tony>
3 ;;; Created: <2005-05-30 17:09:47 blindglobe>
5 ;;; Author: AJ Rossini <blindglobe@gmail.com>
6 ;;; Copyright: (c) 2005--2010, by AJ Rossini <blindglobe@gmail.com>
7 ;;; License: MIT, see the file LICENSE.mit in this directory for details.
8 ;;; Purpose: ASDF specification for Common Lisp Statistics
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 Common Lisp Statistics configuration/loading variables and related functions.")
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"
37 "Version currently loaded and being used. Need to make into a
38 parseable object for version testing. Currently using integers.")
40 (defparameter *cls-home-dir*
42 (truename (asdf:system-definition-pathname :cls)))
43 "Value considered \"home\" for the installation")
47 ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"w
48 ;; #p"/home/tony/sandbox/CommonLispStat.git/"
49 #p"/home/tony/sandbox/CLS.git/")
52 (macrolet ((ls-dir (root-str)
53 `(pathname (concatenate 'string
54 (namestring *cls-home-dir*) ,root-str)))
56 (ls-defdir (target-dir-var root-str)
57 `(defvar ,target-dir-var (ls-dir ,root-str))))
58 (ls-defdir *cls-asdf-dir* "ASDF/")
59 (ls-defdir *cls-data-dir* "Data/")
60 (ls-defdir *cls-external-dir* "external/")
61 ;; reminder of testing
62 ;;(macroexpand '(ls-defdir *cls-asdf-dir* "ASDF"))
63 ;;(macroexpand-1 '(ls-defdir *cls-asdf-dir* "ASDF"))
64 ;;(macroexpand-1 '(ls-dir "ASDF"))
67 ;;(pushnew *cls-asdf-dir* asdf:*central-registry*)
68 ;;(pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
70 (defpackage #:cls-system
71 (:use :common-lisp :asdf))
73 (in-package #:cls-system)
75 ;;; To avoid renaming everything from *.lsp to *.lisp...
76 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
77 ;;; NOT secure against serving multiple architectures/hardwares from
78 ;;; the same file system (i.e. PPC and x86 would not be
81 (defclass cls-lsp-source-file (cl-source-file) ())
82 (defparameter *fasl-directory*
83 (make-pathname :directory '(:relative
89 #-(or sbcl openmcl clisp cmucl) "fasl"
93 ;;; Handle Luke's *.lsp suffix
94 (defmethod source-file-type ((c cls-lsp-source-file) (s module)) "lsp")
95 (defmethod asdf::output-files :around ((operation compile-op)
96 (c cls-lsp-source-file))
97 (list (merge-pathnames *fasl-directory*
98 (compile-file-pathname (component-pathname c)))))
99 ;;; again, thanks to Cyrus for saving me time...
103 :version #.(with-open-file
104 (vers (merge-pathnames "version.lisp-expr" *load-truename*))
106 :author "A.J. Rossini <blindglobe@gmail.com>"
108 :description "Common Lisp Statistics (CLS): A System for Statistical
109 Computing with Common Lisp; based on Common LispStat (CLS alpha1) by
110 Luke Tierney <luke@stat.uiowa.edu> (apparently originally written
111 when Luke was at CMU, on leave at Bell Labs?). Last touched by him
112 in 1991, then by AJR starting in 2005."
116 :lisp-matrix ; on fnv, cl-blapack, ffa
122 :components ((:static-file "version" :pathname #p"version.lisp-expr")
123 (:static-file "LICENSE.mit")
124 (:static-file "README")
130 ((:file "packages")))
134 :pathname "src/objsys/"
136 :depends-on ("packaging")
138 ((:cls-lsp-source-file "lsobjects")))
141 :pathname "src/basics/"
143 :depends-on ("packaging" "proto-objects")
145 ((:cls-lsp-source-file "lstypes")
146 (:cls-lsp-source-file "lsfloat")
148 (:cls-lsp-source-file "compound")
149 (:cls-lsp-source-file "lsmacros"
150 :depends-on ("compound"))
152 (:cls-lsp-source-file "lsmath"
153 :depends-on ("compound"
159 :pathname "src/numerics/"
160 :depends-on ("packaging" "proto-objects" "cls-core")
162 ((:cls-lsp-source-file "cffiglue")
163 (:cls-lsp-source-file "dists"
164 :depends-on ("cffiglue"))
166 (:cls-lsp-source-file "matrices"
167 :depends-on ("cffiglue"))
168 (:cls-lsp-source-file "ladata"
169 :depends-on ("cffiglue"
172 :depends-on ("cffiglue"
179 ;; Dataframes and statistical structures.
182 :pathname "src/data/"
183 :depends-on ("packaging"
189 (:file "dataframe-array")
190 (:file "dataframe-matrixlike")
191 (:file "dataframe-listoflist")
193 (:file "data-xls-compat")
198 :pathname "src/basics/"
199 :depends-on ("packaging"
205 ((:cls-lsp-source-file "lsbasics")))
211 :pathname "src/describe/"
212 :depends-on ("packaging"
219 ((:cls-lsp-source-file "statistics")))
223 :pathname "src/visualize/"
224 :depends-on ("cls-core")
230 :pathname "src/numerics/"
231 :depends-on ("packaging"
238 ((:file "optimize")))
244 :pathname "src/stat-models/"
245 :depends-on ("packaging"
253 ((:file "regression")
254 ;; (:cls-lsp-source-file "nonlin"
255 ;; :depends-on ("regression"))
256 ;; (:cls-lsp-source-file "bayes"
257 ;; :depends-on ("regression"))
264 :depends-on ("packaging"
273 (:cls-lsp-source-file "absorbtion")
274 (:cls-lsp-source-file "diabetes")
275 (:cls-lsp-source-file "leukemia")
276 (:cls-lsp-source-file "randu")
277 (:cls-lsp-source-file "aircraft")
278 (:cls-lsp-source-file "metabolism")
279 (:cls-lsp-source-file "book")
280 (:cls-lsp-source-file "heating")
281 (:cls-lsp-source-file "oxygen")
282 (:cls-lsp-source-file "stackloss")
283 (:cls-lsp-source-file "car-prices")
284 (:cls-lsp-source-file "iris")
285 (:cls-lsp-source-file "puromycin")
286 (:cls-lsp-source-file "tutorial")))
290 :depends-on ("packaging" "proto-objects"
299 :pathname "src/unittests/"
300 :components ((:file "unittests")
301 (:file "unittests-lstypes" :depends-on ("unittests"))
302 (:file "unittests-specfn" :depends-on ("unittests"))
303 (:file "unittests-prob" :depends-on ("unittests"))
304 (:file "unittests-proto" :depends-on ("unittests"))
305 (:file "unittests-regression" :depends-on ("unittests"))
306 (:file "unittests-listoflist" :depends-on ("unittests"))
307 (:file "unittests-arrays" :depends-on ("unittests"))
308 (:file "unittests-dataframe" :depends-on ("unittests"))))))
311 (defmethod perform ((o test-op) (c (eql (find-system :cls))))
312 (describe (lift:run-tests :suite 'lisp-stat-unittests::lisp-stat-ut)))