docstring edit, and make a dummy store slot for dataframe-likes.
[CommonLispStat.git] / cls.asd
blob80a5e72645cc9489e58346ead956f9f4b39fc411
1 ;;  -*- mode: lisp -*-
2 ;;; Time-stamp: <2009-12-13 17:51:37 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--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 (in-package :cl-user)
16 (defpackage :lisp-stat-config
17   (:use :common-lisp)
18   (:export *default-path*
19            *lsos-files* *basic-files* *ls-files*
20            *cls-home-dir* *cls-data-dir* *cls-examples-dir*))
22 (in-package :lisp-stat-config)
24 (defparameter *cls-home-dir*
25   (directory-namestring
26    (truename (asdf:system-definition-pathname :cls)))
27   "Value considered \"home\" for our data")
29 (macrolet ((ls-dir (root-str)
30              `(pathname (concatenate 'string
31                                      (namestring *cls-home-dir*) ,root-str)))
33            (ls-defdir (target-dir-var  root-str)
34              `(defvar ,target-dir-var (ls-dir ,root-str))))
36   ;; reminder of testing
37   ;;(macroexpand '(ls-defdir *cls-asdf-dir* "ASDF"))
38   ;;(macroexpand-1 '(ls-defdir *cls-asdf-dir* "ASDF"))
39   ;;(macroexpand-1 '(ls-dir "ASDF"))
41   (ls-defdir *cls-asdf-dir* "ASDF/")
42   (ls-defdir *cls-data-dir* "Data/")
43   (ls-defdir *cls-external-dir* "external/"))
45 ;;(pushnew *cls-asdf-dir* asdf:*central-registry*)
47 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
49 (in-package :cl-user)
51 (defpackage #:cls-system
52     (:use :common-lisp :asdf))
54 (in-package #:cls-system)
56 ;;; To avoid renaming everything from *.lsp to *.lisp...
57 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
58 ;;; NOT secure against serving multiple architectures/hardwares from
59 ;;; the same file system (i.e. PPC and x86 would not be
60 ;;; differentiated). 
62 (defclass cls-lsp-source-file (cl-source-file) ())
63 (defparameter *fasl-directory*
64    (make-pathname :directory '(:relative
65                                #+sbcl "fasl-sbcl"
66                                #+openmcl "fasl-ccl"
67                                #+openmcl "fasl-ccl"
68                                #+cmu "fasl-cmucl"
69                                #+clisp "fasl-clisp"
70                                #-(or sbcl openmcl clisp cmucl) "fasl"
71                                )))
74 ;;; Handle Luke's *.lsp suffix
75 (defmethod source-file-type ((c cls-lsp-source-file) (s module)) "lsp")
76 (defmethod asdf::output-files :around ((operation compile-op)
77                                        (c cls-lsp-source-file))
78   (list (merge-pathnames *fasl-directory*
79                          (compile-file-pathname (component-pathname c)))))
80 ;;; again, thanks to Cyrus for saving me time...
83 (defsystem "cls"
84   :version #.(with-open-file
85                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
86                (read vers))
87   :author "A.J. Rossini <blindglobe@gmail.com>"
88   :license "BSD"
89   :description "Common Lisp Statistics (CLS): A System for Statistical
90   Computing with Common Lisp; based on Common LispStat (CLS alpha1) by
91   Luke Tierney <luke@stat.uiowa.edu> (apparently originally written
92   when Luke was at CMU, on leave at Bell Labs?).  Last touched by him
93   in 1991, then by AJR starting in 2005."
94   :serial t
95   :depends-on (:cffi
96                :xarray
97                :lisp-matrix ; on fnv, cl-blapack, ffa
98                :listoflist
99                :lift
100                :rsm-string
101                ;;    :cl-cairo2  :cl-2d
102                )
103   :components ((:static-file "version" :pathname #p"version.lisp-expr")
104                (:static-file "LICENSE")
105                (:static-file "README")
107                (:module
108                 "packaging"
109                 :pathname #p"src/"
110                 :components
111                 ((:file "packages")))
113                (:module
114                 "proto-objects"
115                 :pathname "src/objsys/"
116                 :serial t
117                 :depends-on ("packaging")
118                 :components
119                 ((:cls-lsp-source-file "lsobjects")))
121                (:module "cls-core"
122                         :pathname "src/basics/"
123                         :serial t
124                         :depends-on ("packaging" "proto-objects")
125                         :components
126                         (;(:cls-lsp-source-file "defsys") ; XLS compat?
127                          (:cls-lsp-source-file "lstypes")
128                          (:cls-lsp-source-file "lsfloat")
129                          
130                          (:cls-lsp-source-file "compound")
131                          (:cls-lsp-source-file "lsmacros" 
132                                                     :depends-on ("compound"))
133                          
134                          (:cls-lsp-source-file "lsmath"
135                                                     :depends-on ("compound"
136                                                                  "lsmacros"
137                                                                  "lsfloat"))))
139                (:module
140                 "numerics-internal"
141                 :pathname "src/numerics/"
142                 :depends-on ("packaging" "proto-objects" "cls-core")
143                 :components
144                 ((:cls-lsp-source-file "cffiglue")
145                  (:cls-lsp-source-file "dists"
146                                             :depends-on ("cffiglue"))
148                  (:cls-lsp-source-file "matrices"
149                                             :depends-on ("cffiglue"))
150                  (:cls-lsp-source-file "ladata"
151                                             :depends-on ("cffiglue"
152                                                          "matrices"))
153                  (:file "linalg"
154                         :depends-on ("cffiglue"
155                                      "matrices"
156                                      "ladata"))
158                  ))
161                ;; Dataframes and statistical structures.
162                (:module
163                 "stat-data"
164                 :pathname "src/data/"
165                 :depends-on ("packaging"
166                              "proto-objects"
167                              "cls-core"
168                              "numerics-internal")
169                 :components
170                 ((:file "dataframe")
171                  (:file "dataframe-array")
172                  (:file "dataframe-matrixlike")
173                  (:file "dataframe-listoflist")
174                  (:file "data")
175                  (:file "data-xls-compat")
176                  (:file "import")
177                  ;;(:file "listoflist")
178                  ))
180                (:module
181                 "cls-basics"
182                 :pathname "src/basics/"
183                 :depends-on ("packaging"
184                              "proto-objects"
185                              "cls-core"
186                              "numerics-internal"
187                              "stat-data")
188                 :components
189                 ((:cls-lsp-source-file "lsbasics")))
192                
193                (:module
194                 "descriptives"
195                 :pathname "src/describe/"
196                 :depends-on ("packaging"
197                              "proto-objects"
198                              "cls-core"
199                              "numerics-internal"
200                              "stat-data"
201                              "cls-basics")
202                 :components
203                 ((:cls-lsp-source-file "statistics")))
205                (:module
206                 "visualize"
207                 :pathname "src/visualize/"
208                 :depends-on ("cls-core")
209                 :components
210                 ((:file "plot")))
212                (:module
213                 "optimization"
214                 :pathname "src/numerics/"
215                 :depends-on ("packaging"
216                              "proto-objects"
217                              "cls-core"
218                              "numerics-internal"
219                              "stat-data"
220                              "cls-basics")
221                 :components
222                 ((:file "optimize")))
223                  
224                
225                ;; Applications
226                (:module
227                 "stat-models"
228                 :pathname "src/stat-models/"
229                 :depends-on ("packaging"
230                              "proto-objects"
231                              "cls-core"
232                              "numerics-internal"
233                              "cls-basics"
234                              "descriptives"
235                              "optimization")
236                 :components
237                 ((:file "regression")
238                  ;; (:cls-lsp-source-file "nonlin"
239                  ;;       :depends-on ("regression"))
240                  ;; (:cls-lsp-source-file "bayes"
241                  ;;       :depends-on ("regression"))
242                  ))
244                ;; Applications
245                (:module
246                 "example-data"
247                 :pathname "Data/"
248                 :depends-on ("packaging"
249                              "proto-objects"
250                              "cls-core"
251                              "numerics-internal"
252                              "cls-basics"
253                              "descriptives"
254                              "optimization")
255                 :components
256                 ((:file "examples")
257                  (:cls-lsp-source-file "absorbtion")
258                  (:cls-lsp-source-file "diabetes")
259                  (:cls-lsp-source-file "leukemia")
260                  (:cls-lsp-source-file "randu")
261                  (:cls-lsp-source-file "aircraft")
262                  (:cls-lsp-source-file "metabolism")
263                  (:cls-lsp-source-file "book")
264                  (:cls-lsp-source-file "heating")
265                  (:cls-lsp-source-file "oxygen")
266                  (:cls-lsp-source-file "stackloss") 
267                  (:cls-lsp-source-file "car-prices")
268                  (:cls-lsp-source-file "iris")
269                  (:cls-lsp-source-file "puromycin")
270                  (:cls-lsp-source-file "tutorial")))
272                (:module
273                  "lisp-stat-unittest"
274                 :depends-on  ("packaging" "proto-objects"
275                               "cls-core"
276                               "numerics-internal" 
277                               "stat-data"
278                               "cls-basics"
279                               "descriptives"
280                               "optimization"
281                               "stat-models"
282                               "example-data")
283                  :pathname "src/unittests/"
284                  :components ((:file "unittests")
285                               (:file "unittests-lstypes" :depends-on ("unittests"))
286                               (:file "unittests-specfn" :depends-on ("unittests"))
287                               (:file "unittests-prob" :depends-on ("unittests"))
288                               (:file "unittests-proto" :depends-on ("unittests"))
289                               (:file "unittests-regression" :depends-on ("unittests"))
290                               (:file "unittests-listoflist" :depends-on ("unittests"))
291                               (:file "unittests-arrays" :depends-on ("unittests"))
292                               (:file "unittests-dataframe" :depends-on ("unittests"))))))