docs and dataframe-listoflist structures, and use of new listoflist dispatched methods.
[CommonLispStat.git] / lispstat.asd
blob6c95be07d80be94c8db272a29d2f3ba3aff80efb
1 ;;  -*- mode: lisp -*-
2 ;;; Time-stamp: <2009-07-14 13:20:23 tony>
3 ;;; Created:    <2005-05-30 17:09:47 blindglobe>
4 ;;; File:       lispstat.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            *lispstat-home-dir*
21            *lispstat-data-dir* *lispstat-examples-dir*))
23 (in-package :lisp-stat-config)
25 (defparameter *lispstat-home-dir*
26   (directory-namestring
27    (truename (asdf:system-definition-pathname :lispstat)))
28   "Value considered \"home\" for our data")
30 (macrolet ((ls-dir (root-str)
31              `(pathname (concatenate 'string
32                                      (namestring *lispstat-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 *lispstat-asdf-dir* "ASDF"))
39   ;;(macroexpand-1 '(ls-defdir *lispstat-asdf-dir* "ASDF"))
40   ;;(macroexpand-1 '(ls-dir "ASDF"))
42   (ls-defdir *lispstat-asdf-dir* "ASDF/")
43   (ls-defdir *lispstat-data-dir* "Data/")
44   (ls-defdir *lispstat-external-dir* "external/")
47 ;;(pushnew *lispstat-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 #:lispstat-system
65     (:use :common-lisp :asdf))
67 (in-package #:lispstat-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 lispstat-lsp-source-file (cl-source-file) ())
76 (defparameter *fasl-directory*
77    (make-pathname :directory '(:relative
78                                #+sbcl "sbcl-fasl"
79                                #+openmcl "openmcl-fasl"
80                                #+cmu "cmucl-fasl"
81                                #+clisp "clisp-fasl"
82                                #-(or sbcl openmcl clisp cmucl) "fasl"
83                                )))
86 ;;; Handle Luke's *.lsp suffix
87 (defmethod source-file-type ((c lispstat-lsp-source-file) (s module)) "lsp")
88 (defmethod asdf::output-files :around ((operation compile-op)
89                                        (c lispstat-lsp-source-file))
90   (list (merge-pathnames *fasl-directory*
91                          (compile-file-pathname (component-pathname c)))))
92 ;;; again, thanks to Cyrus for saving me time...
95 (defsystem "lispstat"
96   :version #.(with-open-file
97                  (vers (merge-pathnames "version.lisp-expr" *load-truename*))
98                (read vers))
99   :author "A.J. Rossini <blindglobe@gmail.com>"
100   :license "BSD"
101   :description "Common Lisp Statistics (CLS): A System for Statistical
102   Computing with Common Lisp; based on CLS alpha1 by Luke Tierney
103   <luke@stat.uiowa.edu> (apparently originally written when Luke was
104   at CMU, on leave at Bell Labs?).  Last touched by him in 1991, then
105   by AJR in 2005--2009."
106   :serial t
107   :depends-on (:cffi
108                :xarray
109                :lisp-matrix
110                :lift
111                :rsm-string
112                ;;    :cl-cairo2  :cl-2d
113                )
114   :components ((:static-file "version" :pathname #p"version.lisp-expr")
115                (:static-file "LICENSE")
116                (:static-file "README")
118                ;; reading in DSV files for data access
120                (:module 
121                 "csv-data"
122                 :pathname "src/data/"
123                 :components
124                 ((:file "test-cybertiggyr")
125                  (:file "dsv-cybertiggyr" :depends-on ( "test-cybertiggyr"))))
126 |#             
127                (:module
128                 "packaging"
129                 :pathname #p"src/"
130                 ;; :depends-on ("csv-data")
131                 :components
132                 ((:file "packages")))
134                (:module
135                 "proto-objects"
136                 :pathname "src/objsys/"
137                 :serial t
138                 :depends-on ("packaging")
139                 :components
140                 ((:lispstat-lsp-source-file "lsobjects")))
142                (:module "lispstat-core"
143                         :pathname "src/basics/"
144                         :serial t
145                         :depends-on ("packaging" "proto-objects")
146                         :components
147                         (; (:lispstat-lsp-source-file "defsys")
148                          (:lispstat-lsp-source-file "lstypes")
149                          (:lispstat-lsp-source-file "lsfloat")
150                          
151                          (:lispstat-lsp-source-file "compound")
152                          (:lispstat-lsp-source-file "lsmacros" 
153                                                     :depends-on ("compound"))
154                          
155                          (:lispstat-lsp-source-file "lsmath"
156                                                     :depends-on ("compound"
157                                                                  "lsmacros"
158                                                                  "lsfloat"))))
160                (:module
161                 "numerics-internal"
162                 :pathname "src/numerics/"
163                 :depends-on ("packaging" "proto-objects" "lispstat-core")
164                 :components
165                 ((:lispstat-lsp-source-file "cffiglue")
166                  (:lispstat-lsp-source-file "dists"
167                                             :depends-on ("cffiglue"))
169                  (:lispstat-lsp-source-file "matrices"
170                                             :depends-on ("cffiglue"))
171                  (:lispstat-lsp-source-file "ladata"
172                                             :depends-on ("cffiglue"
173                                                          "matrices"))
174                  (:file "linalg"
175                         :depends-on ("cffiglue"
176                                      "matrices"
177                                      "ladata"))
179                  ))
182                ;; prototype and CLOS approaches.
183                (:module
184                 "stat-data"
185                 :pathname "src/data/"
186                 :depends-on ("packaging"
187                              "proto-objects"
188                              "lispstat-core"
189                              "numerics-internal")
190                 :components
191                 ((:file "dataframe")
192                  (:file "data")
193                  (:file "listoflist")))
195                (:module
196                 "lispstat-basics"
197                 :pathname "src/basics/"
198                 :depends-on ("packaging"
199                              "proto-objects"
200                              "lispstat-core"
201                              "numerics-internal"
202                              "stat-data")
203                 :components
204                 ((:lispstat-lsp-source-file "lsbasics")))
207                
208                (:module
209                 "descriptives"
210                 :pathname "src/describe/"
211                 :depends-on ("packaging"
212                              "proto-objects"
213                              "lispstat-core"
214                              "numerics-internal"
215                              "stat-data"
216                              "lispstat-basics")
217                 :components
218                 ((:lispstat-lsp-source-file "statistics")))
220                (:module
221                 "visualize"
222                 :pathname "src/visualize/"
223                 :depends-on ("lispstat-core")
224                 :components
225                 ((:file "plot")))
227                (:module
228                 "optimization"
229                 :pathname "src/numerics/"
230                 :depends-on ("packaging"
231                              "proto-objects"
232                              "lispstat-core"
233                              "numerics-internal"
234                              "stat-data"
235                              "lispstat-basics")
236                 :components
237                 ((:file "optimize")))
238                  
239                
240                ;; Applications
241                (:module
242                 "stat-models"
243                 :pathname "src/stat-models/"
244                 :depends-on ("packaging"
245                              "proto-objects"
246                              "lispstat-core"
247                              "numerics-internal"
248                              "lispstat-basics"
249                              "descriptives"
250                              "optimization")
251                 :components
252                 ((:file "regression")
253                  ;; (:lispstat-lsp-source-file "nonlin"
254                  ;;       :depends-on ("regression"))
255                  ;; (:lispstat-lsp-source-file "bayes"
256                  ;;       :depends-on ("regression"))
257                  ))
259                ;; Applications
260                (:module
261                 "example-data"
262                 :pathname "Data/"
263                 :depends-on ("packaging"
264                              "proto-objects"
265                              "lispstat-core"
266                              "numerics-internal"
267                              "lispstat-basics"
268                              "descriptives"
269                              "optimization")
270                 :components
271                 ((:file "examples")
272                  (:lispstat-lsp-source-file "absorbtion")
273                  (:lispstat-lsp-source-file "diabetes")
274                  (:lispstat-lsp-source-file "leukemia")
275                  (:lispstat-lsp-source-file "randu")
276                  (:lispstat-lsp-source-file "aircraft")
277                  (:lispstat-lsp-source-file "metabolism")
278                  (:lispstat-lsp-source-file "book")
279                  (:lispstat-lsp-source-file "heating")
280                  (:lispstat-lsp-source-file "oxygen")
281                  (:lispstat-lsp-source-file "stackloss") 
282                  (:lispstat-lsp-source-file "car-prices")
283                  (:lispstat-lsp-source-file "iris")
284                  (:lispstat-lsp-source-file "puromycin")
285                  (:lispstat-lsp-source-file "tutorial")))
287                (:module
288                  "lisp-stat-unittest"
289                 :depends-on  ("packaging" "proto-objects"
290                               "lispstat-core"
291                               "numerics-internal" 
292                               "stat-data"
293                               "lispstat-basics"
294                               "descriptives"
295                               "optimization"
296                               "stat-models"
297                               "example-data")
298                  :pathname "src/unittests/"
299                  :components ((:file "unittests")
300                               (:file "unittests-lstypes" :depends-on ("unittests"))
301                               (:file "unittests-specfn" :depends-on ("unittests"))
302                               (:file "unittests-prob" :depends-on ("unittests"))
303                               (:file "unittests-proto" :depends-on ("unittests"))
304                               (:file "unittests-regression" :depends-on ("unittests"))
305                               (:file "unittests-listoflist" :depends-on ("unittests"))
306                               (:file "unittests-arrays" :depends-on ("unittests"))
307                               (:file "unittests-dataframe" :depends-on ("unittests"))))))