Skip to content

Commit 41d2ba3

Browse files
committed
Integrate gotap and update to current spec
1 parent 66fda39 commit 41d2ba3

2 files changed

Lines changed: 18 additions & 12 deletions

File tree

Dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
FROM node:18.12.1-buster
1+
FROM node:latest
2+
3+
# Build spec binary from source (arm64 compatible)
4+
RUN apt-get update && apt-get install -y wget git && \
5+
wget https://go.dev/dl/go1.21.5.linux-arm64.tar.gz && \
6+
tar -C /usr/local -xzf go1.21.5.linux-arm64.tar.gz && \
7+
export PATH=$PATH:/usr/local/go/bin && \
8+
git clone https://github.com/hydrocode-de/gotap.git /tmp/gotap && \
9+
cd /tmp/gotap && /usr/local/go/bin/go build -o /usr/local/bin/spec ./main.go && \
10+
rm -rf /tmp/gotap /usr/local/go go1.21.5.linux-arm64.tar.gz && \
11+
apt-get remove -y wget git && apt-get autoremove -y && apt-get clean
212

313
# create the tool input structure
414
RUN mkdir /in
@@ -10,7 +20,7 @@ COPY ./src /src
1020
WORKDIR /src
1121

1222
# install dependencies: js2args
13-
RUN npm install js2args@v0.3.0
23+
RUN npm install js2args
1424

1525
# run command
16-
CMD ["node", "run.js"]
26+
CMD ["spec", "run", "foobar", "--input-file", "/in/parameters.json"]

src/tool.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ tools:
22
foobar:
33
title: Foo Bar
44
description: A dummy tool to exemplify the YAML file
5-
# deleted this field - version: 0.1
5+
command: "node run.js"
66
parameters:
7-
foo_int:
7+
foo_int:
88
type: integer
99
foo_float:
1010
type: float
@@ -19,14 +19,10 @@ tools:
1919
foo_array:
2020
type: integer
2121
array: true
22-
foo_matrix:
23-
type: asset # changed from file
24-
foo_csv:
25-
type: asset # changed from file
26-
data: # added section to descrive files more explicitly
22+
data:
2723
foo_matrix:
2824
extension: dat
29-
description: A matrix file that can be read by numpy
25+
description: A matrix file
3026
foo_csv:
3127
extension: csv
32-
description: A standard formatted CSV file, for autoloading using pandas
28+
description: A CSV file

0 commit comments

Comments
 (0)