load cl-variates so that we get the right loading done.
[CommonLispStat.git] / cls.asd
blob46366ba889bf51013e9f8f812fb524e19026788f
1 ;;  -*- mode: lisp -*-
2 ;;; Time-stamp: <2010-11-30 17:58:30 tony>
3 ;;; Created:    <2005-05-30 17:09:47 blindglobe>
4 ;;; File:       cls.asd
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 Statistical System
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 -- BUT we need to ensure that we sync
15 ;; properly with the new ASDF!  Maybe we should make the git repo a
16 ;; submodule, and tag a particular version to use, pulling that
17 ;; version?  However, most "modern" CLs use the "new" (>=v2) ASDF.
19 #-asdf(load (pathname (concatenate 'string (namestring *cls-external-dir*) "asdf")))
21 (in-package :cl-user)
23 ;;(pushnew *cls-asdf-dir* asdf:*central-registry*)
24 ;;(pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
26 (cl:defpackage #:cls-system
27     (:use :common-lisp :asdf))
29 (in-package #:cls-system)
31 ;;; To avoid renaming everything from *.lsp to *.lisp...  borrowed
32 ;;; from Cyrus Harmon's work, for example for the ch-util.  NOT secure
33 ;;; against serving multiple architectures/hardwares from the same
34 ;;; file system (i.e. PPC and x86 would not be differentiated).
35 ;;; However, this might be more of a solution for quicklisp?
37 (defclass cls-lsp-source-file (cl-source-file) ())
38 (defparameter *fasl-directory*
39    (make-pathname :directory '(:relative
40                                #+sbcl "fasl-sbcl"
41                                #+openmcl "fasl-ccl"
42                                #+openmcl "fasl-ccl"
43                                #+cmu "fasl-cmucl"
44                                #+clisp "fasl-clisp"
45                                #-(or sbcl openmcl clisp cmucl) "fasl"
46                                )))
48 ;;; Handle Luke's *.lsp suffix
49 (defmethod source-file-type ((c cls-lsp-source-file) (s module)) "lsp")
50 (defmethod asdf::output-files :around ((operation compile-op)
51                                        (c cls-lsp-source-file))
52   (list (merge-pathnames *fasl-directory*
53                          (compile-file-pathname (component-pathname c)))))
54 ;;; again, thanks to Cyrus for saving me time...
57 (defsystem "cls"
58   :name "Common Lisp Statistical System"
59   :version #.(with-open-file
60                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
61                (read vers))
62   :author "A.J. Rossini <blindglobe@gmail.com>"
63   :license "MIT"
64   :description "Common Lisp Statistics (CLS): A System for Statistical
65   Computing with Common Lisp; based on Common LispStat (CLS alpha1) by
66   Luke Tierney <luke@stat.uiowa.edu> (apparently originally written
67   when Luke was at CMU, on leave at Bell Labs?).  Last touched by him
68   in 1991, then by AJR starting in 2005."
69   :serial t
70   :depends-on (:cldoc
71                :cffi
72                :xarray
73                :lisp-matrix ; on fnv, cl-blapack, ffa
74                :listoflist
75                :lift
76                :rsm-string
77                ;;; need to select pRNG stream system
78                ;; :cl-random ;; or cl-variates, or...?
79                :cl-variates
80                ;;; if graphics exist, then...
81                ;; :cl-cairo2  :cl-2d
82                )
83   :components ((:static-file "version" :pathname #p"version.lisp-expr")
84                (:static-file "LICENSE.mit")
85                (:static-file "README")
87                (:module
88                 "packaging"
89                 :pathname #p"src/"
90                 :serial t
91                 :components
92                 ((:file "packages")
93                  (:file "config")))
95                (:module
96                 "proto-objects"
97                 :pathname "src/objsys/"
98                 :serial t
99                 :depends-on ("packaging")
100                 :components
101                 ((:cls-lsp-source-file "lsobjects")))
103                (:module "cls-core"
104                         :pathname "src/basics/"
105                         :serial t
106                         :depends-on ("packaging" "proto-objects")
107                         :components
108                         ((:cls-lsp-source-file "lstypes")
109                          (:cls-lsp-source-file "lsfloat")
110                          
111                          (:cls-lsp-source-file "compound")
112                          (:cls-lsp-source-file "lsmacros" 
113                                                     :depends-on ("compound"))
114                          
115                          (:cls-lsp-source-file "lsmath"
116                                                     :depends-on ("compound"
117                                                                  "lsmacros"
118                                                                  "lsfloat"))))
120                (:module
121                 "numerics-internal"
122                 :pathname "src/numerics/"
123                 :depends-on ("packaging" "proto-objects" "cls-core")
124                 :components
125                 ((:cls-lsp-source-file "cffiglue")
126                  (:cls-lsp-source-file "dists"
127                                             :depends-on ("cffiglue"))
129                  (:cls-lsp-source-file "matrices"
130                                             :depends-on ("cffiglue"))
131                  (:cls-lsp-source-file "ladata"
132                                             :depends-on ("cffiglue"
133                                                          "matrices"))
134                  (:file "linalg"
135                         :depends-on ("cffiglue"
136                                      "matrices"
137                                      "ladata"))
139                  ))
142                ;; Dataframes and statistical structures.
143                (:module
144                 "stat-data"
145                 :pathname "src/data/"
146                 :depends-on ("packaging"
147                              "proto-objects"
148                              "cls-core"
149                              "numerics-internal")
150                 :components
151                 ((:file "dataframe")
152                  (:file "dataframe-array")
153                  (:file "dataframe-matrixlike")
154                  (:file "dataframe-listoflist")
155                  (:file "data")
156                  (:file "data-xls-compat")
157                  (:file "import")))
159                (:module
160                 "cls-basics"
161                 :pathname "src/basics/"
162                 :depends-on ("packaging"
163                              "proto-objects"
164                              "cls-core"
165                              "numerics-internal"
166                              "stat-data")
167                 :components
168                 ((:cls-lsp-source-file "lsbasics")))
171                
172                (:module
173                 "descriptives"
174                 :pathname "src/describe/"
175                 :depends-on ("packaging"
176                              "proto-objects"
177                              "cls-core"
178                              "numerics-internal"
179                              "stat-data"
180                              "cls-basics")
181                 :components
182                 ((:cls-lsp-source-file "statistics")))
184                (:module
185                 "visualize"
186                 :pathname "src/visualize/"
187                 :depends-on ("cls-core")
188                 :components
189                 ((:file "plot")))
191                (:module
192                 "optimization"
193                 :pathname "src/numerics/"
194                 :depends-on ("packaging"
195                              "proto-objects"
196                              "cls-core"
197                              "numerics-internal"
198                              "stat-data"
199                              "cls-basics")
200                 :components
201                 ((:file "optimize")))
202                  
203                
204                ;; Applications
205                (:module
206                 "stat-models"
207                 :pathname "src/stat-models/"
208                 :depends-on ("packaging"
209                              "proto-objects"
210                              "cls-core"
211                              "numerics-internal"
212                              "cls-basics"
213                              "descriptives"
214                              "optimization")
215                 :components
216                 ((:file "regression")
217                  ;; (:cls-lsp-source-file "nonlin"
218                  ;;       :depends-on ("regression"))
219                  ;; (:cls-lsp-source-file "bayes"
220                  ;;       :depends-on ("regression"))
221                  ))
223                ;; Applications
224                (:module
225                 "example-data"
226                 :pathname "Data/"
227                 :depends-on ("packaging"
228                              "proto-objects"
229                              "cls-core"
230                              "numerics-internal"
231                              "cls-basics"
232                              "descriptives"
233                              "optimization")
234                 :components
235                 ((:file "examples")
236                  (:cls-lsp-source-file "absorbtion")
237                  (:cls-lsp-source-file "diabetes")
238                  (:cls-lsp-source-file "leukemia")
239                  (:cls-lsp-source-file "randu")
240                  (:cls-lsp-source-file "aircraft")
241                  (:cls-lsp-source-file "metabolism")
242                  (:cls-lsp-source-file "book")
243                  (:cls-lsp-source-file "heating")
244                  (:cls-lsp-source-file "oxygen")
245                  (:cls-lsp-source-file "stackloss") 
246                  (:cls-lsp-source-file "car-prices")
247                  (:cls-lsp-source-file "iris")
248                  (:cls-lsp-source-file "puromycin")
249                  (:cls-lsp-source-file "tutorial")))
251                (:module
252                  "lisp-stat-unittest"
253                 :depends-on  ("packaging" "proto-objects"
254                               "cls-core"
255                               "numerics-internal" 
256                               "stat-data"
257                               "cls-basics"
258                               "descriptives"
259                               "optimization"
260                               "stat-models"
261                               "example-data")
262                  :pathname "src/unittests/"
263                  :components ((:file "unittests")
264                               (:file "unittests-lstypes" :depends-on ("unittests"))
265                               (:file "unittests-specfn" :depends-on ("unittests"))
266                               (:file "unittests-prob" :depends-on ("unittests"))
267                               (:file "unittests-proto" :depends-on ("unittests"))
268                               (:file "unittests-regression" :depends-on ("unittests"))
269                               (:file "unittests-listoflist" :depends-on ("unittests"))
270                               (:file "unittests-arrays" :depends-on ("unittests"))
271                               (:file "unittests-dataframe" :depends-on ("unittests"))))))
274  (defmethod perform ((o test-op) (c (eql (find-system :cls))))
275     (describe (lift:run-tests :suite 'lisp-stat-unittests::lisp-stat-ut)))