-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
345 lines (310 loc) · 6.58 KB
/
build.sbt
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
import hammerlab.{ math, types }
import org.scalajs.jsenv.nodejs.NodeJSEnv
import scalajs._
val cdm = "org.lasersonlab.thredds" ^ "cdm" ^ "5.0.0"
val concurrent = "org.lasersonlab" ^^ "concurrent" ^ "0.1.0"
val files = "org.lasersonlab" ^^ "portable-files" ^ "0.1.0"
val `gcp-nio` = "org.lasersonlab" ^ "google-cloud-nio" ^ "0.55.2-alpha"
default(
group("org.lasersonlab"),
versions(
hammerlab. bytes → "1.3.0",
hammerlab. channel → "1.5.3",
hammerlab. cli.base → "1.0.1",
hammerlab. math.utils → "2.4.0",
hammerlab. paths → "1.6.0",
hammerlab. types → "1.5.0",
hammerlab.shapeless_utils → "1.5.1",
hammerlab. io → "5.2.1",
diode.react → "1.1.4.131",
dom → "0.9.6"
),
circe.version := "0.11.1",
http4s.version := "0.20.0-M1",
diode.version := "1.1.4",
)
lazy val blosc =
cross
.settings(
dep(math.utils)
)
lazy val `blosc-x` = blosc.x
lazy val cloud =
cross
.in(new File("cloud"))
.settings(
subgroup("cloud", "all")
)
.dependsOn(aws, gcp)
.aggregate(aws, gcp)
lazy val `cloud-x` = cloud.x
lazy val aws =
cross
.in(new File("cloud") / "aws")
.settings(
subgroup("cloud")
)
.jvmSettings(
dep(
"org.lasersonlab" ^ "s3fs" ^ "2.2.3"
)
)
lazy val `aws-x` = aws.x
lazy val gcp =
cross
.in(new File("cloud") / "gcp")
.settings(
subgroup("cloud"),
dep(
cats,
circe,
circe.generic,
files ,
hammerlab.types,
shapeless,
sttp
),
enableMacroParadise
)
.jsSettings(
dep(
dom
)
)
.jvmSettings(
dep(
`gcp-nio`
)
)
.dependsOn(
`circe-utils`
)
lazy val `gcp-x` = gcp.x
lazy val `circe-utils` =
cross
.in(new File("circe"))
.settings(
dep(
circe,
circe.generic,
hammerlab.shapeless_utils,
shapeless
),
)
lazy val `circe-utils-x` = `circe-utils`.x
lazy val convert =
project
.settings(
dep(
circe,
concurrent,
hammerlab.cli.base,
hammerlab.io,
hammerlab.paths,
),
// Test-resources include "hidden" (basenames starting with ".") Zarr-metadata files that we need to include on the
// test classpath for tests to be able to read them. TOOD: factor out to plugin
includeHiddenTestResources,
partialUnification,
utest
)
.dependsOn(
cloud.jvm,
netcdf,
testing.jvm forTests,
utils,
zarr.jvm andTest
)
lazy val ndarray =
cross
.settings(
dep(
cats,
hammerlab.shapeless_utils,
hammerlab.types,
shapeless
),
kindProjector.settings,
partialUnification
)
.dependsOn(
slist
)
lazy val `ndarray-x` = ndarray.x
lazy val netcdf = project.settings(
dep(
hammerlab.bytes,
hammerlab.cli.base,
hammerlab.io,
hammerlab.paths,
hammerlab.types,
)
).dependsOn(
cloud.jvm,
utils
)
lazy val singlecell = project.settings(
spark,
dep(
spark.mllib,
spark.sql
)
).dependsOn(
utils
)
lazy val slist = cross.settings(
dep(
cats,
hammerlab.types
)
)
lazy val `slist-x` = slist.x
lazy val testing =
cross
.settings(
dep(
cats,
concurrent,
files,
hammerlab.test.suite compile,
magnolia,
utest compile
),
utest
)
lazy val `testing-x` = testing.x
lazy val utils = project.settings(
dep(
hammerlab.channel,
cdm,
junit tests
)
)
// Stubs for a "viewer" webapp (client+server)
lazy val viewerCommon =
cross
.settings(
dep(
scalatags,
circe,
circe.generic,
circe.parser
)
)
lazy val viewerClient =
project
.settings(
// cf. https://github.com/scalacenter/scalajs-bundler/issues/278; TODO: move to JS plugin?
version in startWebpackDevServer := "3.1.14",
react,
dep(
cats,
concurrent,
circe,
circe.generic,
circe.parser,
diode,
diode.react,
dom,
react.extra,
files,
hammerlab.types,
scalajs.time,
sttp,
),
webpackBundlingMode := BundlingMode.LibraryAndApplication(),
enableMacroParadise,
kindProjector,
partialUnification,
scalaJSUseMainModuleInitializer := true,
utest,
npmDependencies in Compile ++=
Seq(
"pako" → "1.0.7",
"react-proxy" → "1.1.8"
),
)
.enablePlugins(JS, ScalaJSBundlerPlugin)
.dependsOn(
gcp.js,
viewerCommon.js,
testing.js forTests
)
lazy val viewerServer =
project
.settings(
dep(
http4s.`blaze-server`,
http4s. circe,
http4s. dsl,
),
// Allows to read the JS generated by client
resources in Compile ++= {
(webpack in (viewerClient, Compile, fastOptJS)).value.map(_.data)
},
// rebuild JS on reStart
reStart := (reStart dependsOn (webpack in (viewerClient, Compile, fastOptJS))).evaluated,
// reStart if a client scala.js file changes
watchSources ++= (watchSources in viewerClient).value,
fork := false
)
.dependsOn(
viewerCommon.jvm
)
lazy val xscala = cross.settings()
lazy val `xscala-x` = xscala.x
lazy val zarr =
cross
.settings(
dep(
circe,
circe.generic,
circe.parser,
concurrent,
files,
hammerlab.bytes,
hammerlab.io,
hammerlab.math.utils,
hammerlab.shapeless_utils,
hammerlab.types,
kittens,
magnolia,
sourcecode,
),
utest,
kindProjector,
partialUnification,
includeHiddenTestResources,
)
.jvmSettings(
dep(
"org.lasersonlab" ^ "jblosc" ^ "1.0.1"
)
)
.jsSettings(
jsDependencies += "org.webjars.npm" % "pako" % "1.0.7" / "pako.js",
jsEnv := new NodeJSEnv(NodeJSEnv.Config().withArgs("--max-old-space-size=4096" :: Nil)) // TODO: factor out
)
.dependsOn(
`circe-utils`,
ndarray,
slist,
testing forTests,
xscala
)
lazy val `zarr-x` = zarr.x
lazy val all =
root(
`blosc-x` ,
`circe-utils-x` ,
`cloud-x` ,
convert ,
`ndarray-x` ,
netcdf ,
singlecell ,
`slist-x` ,
`testing-x` ,
utils ,
`xscala-x` ,
`zarr-x` ,
)