more fleshing out the classes.
[CommonLispStat.git] / cls.asd
blob63bf8076f4a8187d9e638cb7eb8aca1014788ff3
1 ;;  -*- mode: lisp -*-
2 ;;; Time-stamp: <2009-10-02 09:00:12 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*
21            *cls-data-dir* *cls-examples-dir*))
23 (in-package :lisp-stat-config)
25 (defparameter *cls-home-dir*
26   (directory-namestring
27    (truename (asdf:system-definition-pathname :cls)))
28   "Value considered \"home\" for our data")
30 (macrolet ((ls-dir (root-str)
31              `(pathname (concatenate 'string
32                                      (namestring *cls-home-dir*) ,root-str)))
34            (ls-defdir (target-dir-var  root-str)
35              `(defvar ,target-dir-var (ls-dir ,root-str))))
37   ;; reminder of testing
38   ;;(macroexpand '(ls-defdir *cls-asdf-dir* "ASDF"))
39   ;;(macroexpand-1 '(ls-defdir *cls-asdf-dir* "ASDF"))
40   ;;(macroexpand-1 '(ls-dir "ASDF"))
42   (ls-defdir *cls-asdf-dir* "ASDF/")
43   (ls-defdir *cls-data-dir* "Data/")
44   (ls-defdir *cls-external-dir* "external/")
47 ;;(pushnew *cls-asdf-dir* asdf:*central-registry*)
50 ;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft
52 ;;; back to our regularly scheduled work...
53 ;;; We should not need these, I think, but?
54 ;; (asdf:oos 'asdf:compile-op :cffi)            ;; FFI
55 ;; (asdf:oos 'asdf:compile-op :lift)            ;; Unit Testing 
56 ;; (asdf:oos 'asdf:load-op :cffi)            ;; FFI
57 ;; (asdf:oos 'asdf:load-op :lift)            ;; Unit Testing 
59 ;;; MAJOR HACK, FIXME!
60 ;;(load "/media/disk/Desktop/sandbox/matlisp.git/start.lisp")
62 (in-package :cl-user)
64 (defpackage #:cls-system
65     (:use :common-lisp :asdf))
67 (in-package #:cls-system)
69 ;;; To avoid renaming everything from *.lsp to *.lisp...
70 ;;; borrowed from Cyrus Harmon's work, for example for the ch-util.
71 ;;; NOT secure against serving multiple architectures/hardwares from
72 ;;; the same file system (i.e. PPC and x86 would not be
73 ;;; differentiated). 
75 (defclass cls-lsp-source-file (cl-source-file) ())
76 (defparameter *fasl-directory*
77    (make-pathname :directory '(:relative
78                                #+sbcl "fasl-sbcl"
79                                #+openmcl "fasl-ccl"
80                                #+openmcl "fasl-ccl"
81                                #+cmu "fasl-cmucl"
82                                #+clisp "fasl-clisp"
83                                #-(or sbcl openmcl clisp cmucl) "fasl"
84                                )))
87 ;;; Handle Luke's *.lsp suffix
88 (defmethod source-file-type ((c cls-lsp-source-file) (s module)) "lsp")
89 (defmethod asdf::output-files :around ((operation compile-op)
90                                        (c cls-lsp-source-file))
91   (list (merge-pathnames *fasl-directory*
92                          (compile-file-pathname (component-pathname c)))))
93 ;;; again, thanks to Cyrus for saving me time...
96 (defsystem "cls"
97   :version #.(with-open-file
98                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
99                (read vers))
100   :author "A.J. Rossini <blindglobe@gmail.com>"
101   :license "BSD"
102   :description "Common Lisp Statistics (CLS): A System for Statistical
103   Computing with Common Lisp; based on CLS alpha1 by Luke Tierney
104   <luke@stat.uiowa.edu> (apparently originally written when Luke was
105   at CMU, on leave at Bell Labs?).  Last touched by him in 1991, then
106   by AJR in 2005--2009."
107   :serial t
108   :depends-on (:cffi
109                :xarray
110                :lisp-matrix
111                :lift
112                :rsm-string
113                ;;    :cl-cairo2  :cl-2d
114                )
115   :components ((:static-file "version" :pathname #p"version.lisp-expr")
116                (:static-file "LICENSE")
117                (:static-file "README")
119                ;; reading in DSV files for data access
121                (:module 
122                 "csv-data"
123                 :pathname "src/data/"
124                 :components
125                 ((:file "test-cybertiggyr")
126                  (:file "dsv-cybertiggyr" :depends-on ( "test-cybertiggyr"))))
127 |#             
128                (:module
129                 "packaging"
130                 :pathname #p"src/"
131                 ;; :depends-on ("csv-data")
132                 :components
133                 ((:file "packages")))
135                (:module
136                 "proto-objects"
137                 :pathname "src/objsys/"
138                 :serial t
139                 :depends-on ("packaging")
140                 :components
141                 ((:cls-lsp-source-file "lsobjects")))
143                (:module "cls-core"
144                         :pathname "src/basics/"
145                         :serial t
146                         :depends-on ("packaging" "proto-objects")
147                         :components
148                         (; (:cls-lsp-source-file "defsys")
149                          (:cls-lsp-source-file "lstypes")
150                          (:cls-lsp-source-file "lsfloat")
151                          
152                          (:cls-lsp-source-file "compound")
153                          (:cls-lsp-source-file "lsmacros" 
154                                                     :depends-on ("compound"))
155                          
156                          (:cls-lsp-source-file "lsmath"
157                                                     :depends-on ("compound"
158                                                                  "lsmacros"
159                                                                  "lsfloat"))))
161                (:module
162                 "numerics-internal"
163                 :pathname "src/numerics/"
164                 :depends-on ("packaging" "proto-objects" "cls-core")
165                 :components
166                 ((:cls-lsp-source-file "cffiglue")
167                  (:cls-lsp-source-file "dists"
168                                             :depends-on ("cffiglue"))
170                  (:cls-lsp-source-file "matrices"
171                                             :depends-on ("cffiglue"))
172                  (:cls-lsp-source-file "ladata"
173                                             :depends-on ("cffiglue"
174                                                          "matrices"))
175                  (:file "linalg"
176                         :depends-on ("cffiglue"
177                                      "matrices"
178                                      "ladata"))
180                  ))
183                ;; Dataframes and statistical structures.
184                (:module
185                 "stat-data"
186                 :pathname "src/data/"
187                 :depends-on ("packaging"
188                              "proto-objects"
189                              "cls-core"
190                              "numerics-internal")
191                 :components
192                 ((:file "dataframe")
193                  (:file "dataframe-array")
194                  (:file "dataframe-matrixlike")
195                  (:file "dataframe-listoflist")
196                  (:file "data")
197                  (:file "import")
198                  ;;(:file "listoflist")
199                  ))
201                (:module
202                 "cls-basics"
203                 :pathname "src/basics/"
204                 :depends-on ("packaging"
205                              "proto-objects"
206                              "cls-core"
207                              "numerics-internal"
208                              "stat-data")
209                 :components
210                 ((:cls-lsp-source-file "lsbasics")))
213                
214                (:module
215                 "descriptives"
216                 :pathname "src/describe/"
217                 :depends-on ("packaging"
218                              "proto-objects"
219                              "cls-core"
220                              "numerics-internal"
221                              "stat-data"
222                              "cls-basics")
223                 :components
224                 ((:cls-lsp-source-file "statistics")))
226                (:module
227                 "visualize"
228                 :pathname "src/visualize/"
229                 :depends-on ("cls-core")
230                 :components
231                 ((:file "plot")))
233                (:module
234                 "optimization"
235                 :pathname "src/numerics/"
236                 :depends-on ("packaging"
237                              "proto-objects"
238                              "cls-core"
239                              "numerics-internal"
240                              "stat-data"
241                              "cls-basics")
242                 :components
243                 ((:file "optimize")))
244                  
245                
246                ;; Applications
247                (:module
248                 "stat-models"
249                 :pathname "src/stat-models/"
250                 :depends-on ("packaging"
251                              "proto-objects"
252                              "cls-core"
253                              "numerics-internal"
254                              "cls-basics"
255                              "descriptives"
256                              "optimization")
257                 :components
258                 ((:file "regression")
259                  ;; (:cls-lsp-source-file "nonlin"
260                  ;;       :depends-on ("regression"))
261                  ;; (:cls-lsp-source-file "bayes"
262                  ;;       :depends-on ("regression"))
263                  ))
265                ;; Applications
266                (:module
267                 "example-data"
268                 :pathname "Data/"
269                 :depends-on ("packaging"
270                              "proto-objects"
271                              "cls-core"
272                              "numerics-internal"
273                              "cls-basics"
274                              "descriptives"
275                              "optimization")
276                 :components
277                 ((:file "examples")
278                  (:cls-lsp-source-file "absorbtion")
279                  (:cls-lsp-source-file "diabetes")
280                  (:cls-lsp-source-file "leukemia")
281                  (:cls-lsp-source-file "randu")
282                  (:cls-lsp-source-file "aircraft")
283                  (:cls-lsp-source-file "metabolism")
284                  (:cls-lsp-source-file "book")
285                  (:cls-lsp-source-file "heating")
286                  (:cls-lsp-source-file "oxygen")
287                  (:cls-lsp-source-file "stackloss") 
288                  (:cls-lsp-source-file "car-prices")
289                  (:cls-lsp-source-file "iris")
290                  (:cls-lsp-source-file "puromycin")
291                  (:cls-lsp-source-file "tutorial")))
293                (:module
294                  "lisp-stat-unittest"
295                 :depends-on  ("packaging" "proto-objects"
296                               "cls-core"
297                               "numerics-internal" 
298                               "stat-data"
299                               "cls-basics"
300                               "descriptives"
301                               "optimization"
302                               "stat-models"
303                               "example-data")
304                  :pathname "src/unittests/"
305                  :components ((:file "unittests")
306                               (:file "unittests-lstypes" :depends-on ("unittests"))
307                               (:file "unittests-specfn" :depends-on ("unittests"))
308                               (:file "unittests-prob" :depends-on ("unittests"))
309                               (:file "unittests-proto" :depends-on ("unittests"))
310                               (:file "unittests-regression" :depends-on ("unittests"))
311                               (:file "unittests-listoflist" :depends-on ("unittests"))
312                               (:file "unittests-arrays" :depends-on ("unittests"))
313                               (:file "unittests-dataframe" :depends-on ("unittests"))))))