-
Notifications
You must be signed in to change notification settings - Fork 0
/
dbc.asd
362 lines (281 loc) · 12.3 KB
/
dbc.asd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
;;; :FILE-CREATED <Timestamp: #{2011-01-01T14:14:51-05:00Z}#{11526} - by MON>
;;; :FILE dbc-specific/dbc.asd
;;; ==============================
;;; ==============================
;;; :LOGICAL-PATHNAMES
;;; ==============================
;;;
;;; (logical-pathname-translations "MON")
;;;
;;; (translate-logical-pathname "MON:dbc-specific;")
;;;
;;; (push (translate-logical-pathname "MON:dbc-specific;") asdf:*central-registry*)
;;;
;;; Finding current fasls:
;;; (logical-pathname-translations "FASL")
;;; (translate-logical-pathname "FASL:dbc-specific;")
;;;
;;; ==============================
;;;
;;; :NOTE While debugging per file:
;;; (declaim (optimize (debug 3)))
;;; Or, alternativley:
;;; (sb-ext:restrict-compiler-policy 'debug 3)
;;;
;;; To set it back to default (debug 1):
;;; (sb-ext:restrict-compiler-policy 'debug 1)
;;;
;;; (setf *break-on-signals* t)
;;;
;;; sb-debug:
;;;
;;; ==============================
;;;
;;; To remove the compiled dbc fasls do:
;;;
;;; (asdf:clear-system :dbc)
;;;
;;; ==============================
;;;
;;; (ql:quickload :dbc :verbose t :explain t)
;;;
;;; ==============================
;;;
;;; (let (des) (do-external-symbols (i :dbc des) (push i des)) des)
;;;
;;; ==============================
(defpackage #:dbc-build-system
(:use #:common-lisp
#:asdf )
(:export
#:*dbc-build-system-reloading-system*))
(in-package #:dbc-build-system)
(defvar *dbc-build-system-reloading-system* nil)
(defvar *author-maintainer-contact* (format nil "MON KEY -- ~A"
(map 'string 'code-char
#(109 111 110 107 112 101 97 114 109 97 110
64 105 99 108 111 117 100 46 99 111 109))))
(asdf:defsystem #:dbc
;; :name ""
:author "MON KEY"
:maintainer #.*author-maintainer-contact*
:license "BSD"
:description "DBC agglomerated."
:version "1.0.0"
:depends-on (:cxml
:closure-html
:unicly
:mon
:mon-test
:image-ops
:csv-parser
:puri
:drakma
;; :NOTE Following will be made available to system by :mon
;; :local-time
;; :split-sequence
;; :string-case
;; :alexandria
;; :cl-ppcre
;; :flexi-streams
;; :ironclad
;; :cl-fad
;; :salza2
;; :chipz
;; :closer-mop
;; ==============================
;; :NOTE prob. better to use a separate system for drakma related dependencies.
;; ==============================
;; :NOTE Time related dependencies should maybe use a separate
;; time dedicated system for these (and others).
;; :SEE :FILE "dbc-french-dates.lisp" below.
;; :local-time :chronicity
;; :parse-time ;; Not sure which version to use
;; :date-calc
;; #+sbcl :sb-ext ;; pretty sure :mon and :unicly already use this but....
)
:serial t
:components
((:file "package")
(:file "specials")
;; (:module "dbc-uuid"
;; :components
;; ((:file "dbc-uuid-types")
;; (:file "dbc-uuid-class" :depends-on ("dbc-uuid-types"))
;; (:file "dbc-uuid" :depends-on ("dbc-uuid-types" "dbc-uuid-class"))))
(:file "conditions")
(:file "dbc-utils")
(:module "dbc-time"
:components
((:file "date-localtime-utils")))
(:module "dbc-classes"
:components
;; dbc-docstrings-for-class.lisp interns docstrings for many of
;; classes below to a hashtable holding docstrings. Load it first
((:file "dbc-docstrings-for-class")
;; ==============================
;; Following file "dbc-class.lisp"
;; defines class `base-dbc'
(:file "dbc-class")
;; ==============================
;; Following file "dbc-class-paths.lisp"
;; defines class `system-base', `system-path'
(:file "dbc-class-paths")
;; ==============================
;; Following file "dbc-class-uuid.lisp"
;; defines class `base-uuid'
(:file "dbc-class-uuid")
;; ==============================
;; Following file "dbc-class-system-object-uuid.lisp"
;; defines class `system-object-uuid'
(:file "dbc-class-system-object-uuid")
;; ==============================
;; Following file "dbc-class-uuid-vars.lisp"
;; class namespace variables cached to var `*control-id-namespace-table*'
(:file "dbc-class-uuid-vars")
;; ==============================
;; Following file "dbc-class-record.lisp"
;; defines class `base-record' subclass of `base-dbc'
(:file "dbc-class-record")
;; ==============================
;; Following file "dbc-class-inventory-record.lisp"
;; defines class `base-inventory-record' subclass of `base-record'
(:file "dbc-class-inventory-record")
(:file "dbc-class-inventory-publication-record")
(:file "dbc-class-inventory-sales-record")
(:file "dbc-class-authority-record")
;; ==============================
;; Following file "dbc-class-entity.lips"
;; defines following class/subclass definitions:
;; defines class `base-entity' subclass of `base-dbc',
;; defines classes `base-<FOO>-entity' subclasses of `base-entity'
(:file "dbc-class-entity")
;; ==============================
;; Following file "dbc-class-control-id.lisp"
;; defines class definition scaffolding as follows:
;; defines class `base-entity' subclass of `base-dbc'
;; defines classes `base-control-id' & `control-id-type' subclass of `base-dbc'.
;; defines class `control-id-indexed-number' subclass of `base-control-id'
;; defines class `control-id-record-type' subclass of `control-id-type'
;; defines classes `control-id-<FOO>-record-type' subclasses of `control-id-record-type'
;; defines classes `control-id-<FOO>-indexed-number' subclasses of `control-id-indexed-number'
;; defines class `control-id-entity-type' subclass of `control-id-type'
;; defines classes `control-id-<FOO>-entity-type' subclasses of `control-id-entity-type'
;; defines class `control-id-display-name' subclass of `base-control-id'
;; defines class `control-id-display-name-for-entity-type' subclass of `control-id-display-name'
;; defines class `control-id-<FOO>-record' subclasses `control-id-inventory-record-type' `base-control-id'
;; defines class `control-id-indexed-<FOO>-record' subclasses `control-id-<FOO>-record' `control-id-record-indexed-number'
;; ... a bunch of other abstract classes ...
(:file "dbc-class-control-id")
(:file "dbc-class-edit")
(:file "dbc-class-naf-entity")
(:module "dbc-class-category-entities"
:components
((:file "dbc-class-category-entity")))
(:file "dbc-class-theme-entity")
(:file "dbc-class-media-entity")
(:file "dbc-class-location-entity")
(:file "dbc-class-taxon-entity")
(:file "dbc-class-regexps")
(:file "dbc-class-users")
(:file "dbc-class-description")
(:file "dbc-class-documentation-record")
;; ==============================
;; Following file "dbc-class-parsed.lisp"
;; defines class `parsed-class' sublasses `base-dbc'
(:file "dbc-class-parsed")
(:file "dbc-class-parsed-slot-value-equal")
(:file "dbc-class-parsed-field-slot-mapping")
(:file "dbc-class-parsed-convert")
(:file "dbc-class-parsed-slot-value-format")
(:file "dbc-class-parsed-inventory-record")
(:file "dbc-class-parsed-artist-record")
(:file "dbc-class-parsed-author-record")
(:file "dbc-class-parsed-person-record")
(:file "dbc-class-parsed-brand-record")
(:file "dbc-class-parsed-technique-record")
(:file "dbc-class-parsed-publication-record")
(:file "dbc-class-parsed-theme-record")
(:file "dbc-class-parsed-documentation-record")
(:file "dbc-class-parsed-translation-for-inventory-record")
(:file "dbc-class-parsed-inventory-sales-order-record")
(:file "dbc-class-parsed-inventory-sales-sold-record")
(:file "dbc-class-parsed-inventory-sales-sold-in-store-record")
;; (:file "dbc-tgm")))
;; (:file "dbc-class-symbol-construct-deprecated")
(:file "dbc-class-image")
(:file "dbc-class-image-path-convert")
(:file "dbc-class-image-path-inventory-record")
(:file "dbc-class-parsed-csv-writer")
(:file "dbc-class-parsed-slot-value-cleaning")
(:file "dbc-class-parsed-tgm-theme-record")))
(:module "dbc-parse"
:components
((:file "dbc-cln-parse")
(:file "dbc-xml-sql-parse")
(:file "dbc-xml-refs-parse")
(:file "dbc-xml-parse-sax")
;; (:file "psa-parse-table.lisp")
))
(:module "dbc-translate"
:components
((:file "dbc-french-numbers")
(:file "dbc-french-dates")))
(:file "dbc-docs"))
:in-order-to ((test-op (test-op "dbc/dbc-test")))
)
;; dbc-test::make-v5-uuid-test
;; dbc-test::system-test-temp-dir-exists-p
;; (sb-rt:do-test 'dbc-test::field-convert-1-0-x-empty-TEST.0)
;; (sb-rt:do-test 'dbc-test::split-field-on-char-if-TEST.0)
;; (sb-rt:do-test 'split-field-on-char-if-TEST.2)
;; (defpackage #:dbc-test-system (:use :common-lisp :asdf))
;; (in-package #:dbc-test-system)
(asdf:defsystem :dbc/dbc-test
;; :name ""
;; :author "MON KEY"
;; :maintainer "MON KEY"
;; :license
:description "DBC tests."
:version "1.0.1"
:pathname "dbc-tests/"
;; :depends-on (:dbc)
;; (make-pathname :name nil :type nil :defaults *load-truename*))
:components
((:file "package")
(:file "tests")
(:file "dbc-uuid-profile"))
:depends-on (:dbc :mon-test
#+sbcl :sb-rt
;; :NOTE Need to add a package-nickname for :sb-rt for following:
#-sbcl :rt
)
:perform #+sbcl(test-op (o c) (funcall (intern (symbol-name '#:do-tests)
(find-package '#:dbc/test))))
)
;; :NOTE is this needed anymore with ASDF3? Doesn't seem so.
;; (defmethod asdf:perform :after ((op asdf:load-op) (system (eql (asdf:find-system :dbc-test))))
;; (pushnew :dbc-test cl:*features*))
(defmethod asdf:perform :after ((op asdf:load-op) (system (eql (asdf:find-system :dbc))))
(let* (;; #-:IS-MON(chk-if(uiop:file-exists-p ;; :WAS cl-fad:file-exists-p
;; (merge-pathnames (make-pathname :name "loadtime-bind" :type "lisp")
;; ;; :WAS (mon:pathname-directory-system :dbc)
;; (make-pathname :directory (pathname-directory (asdf/system-registry:sysdef-central-registry-search :DBC))))))
(chk-if (probe-file (translate-logical-pathname "MON:DBC-SPECIFIC;loadtime-bind.lisp")))
(chk-existing-feature (member :dbc *features*))
(dbc-build-system::*dbc-build-system-reloading-system*
(or (and chk-existing-feature t) dbc-build-system::*dbc-build-system-reloading-system*)))
(and chk-if
(load chk-if)))
(pushnew :dbc cl:*features*)
;; Don't think this is needed any longer with ASDF3
;; (asdf:operate 'asdf:load-op 'dbc-test)
)
;;; ==============================
;; Local Variables:
;; indent-tabs-mode: nil
;; show-trailing-whitespace: nil
;; mode: lisp-interaction
;; End:
;;; ==============================
;;; EOF