From 9572b4eb3b2d81dfde15ebd66e32668fdacada22 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 28 Jan 2020 18:59:06 +0100 Subject: [PATCH] algorithm metadata cleanup --- integration/utils/ddo-metadata-generator.ts | 8 +++----- src/ddo/MetaData.ts | 11 +++++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/integration/utils/ddo-metadata-generator.ts b/integration/utils/ddo-metadata-generator.ts index 71aad12..9898897 100644 --- a/integration/utils/ddo-metadata-generator.ts +++ b/integration/utils/ddo-metadata-generator.ts @@ -1,4 +1,4 @@ -import { MetaData } from '../../src' // @oceanprotocol/squid +import { MetaData, MetaDataAlgorithm } from '../../src' // @oceanprotocol/squid import { ServiceType } from '../../src/ddo/Service' import ddoExample from '../../test/testdata/ddo.json' @@ -48,14 +48,12 @@ const metadata: Partial = { } } -const algorithmMeta = { +const algorithmMeta: MetaDataAlgorithm = { language: 'scala', format: 'docker-image', version: '0.1', - entrypoint: 'ocean-entrypoint.sh', - requirements: [], container: { - entrypoint: 'node $ALGO', + entrypoint: 'ocean-entrypoint.sh', image: 'node', tag: '10' } diff --git a/src/ddo/MetaData.ts b/src/ddo/MetaData.ts index dacaec2..2e0ad4d 100644 --- a/src/ddo/MetaData.ts +++ b/src/ddo/MetaData.ts @@ -84,16 +84,15 @@ export interface File { compression?: string } -export interface Algorithm { +export interface MetaDataAlgorithm { + language?: string + format?: string + version?: string container: { entrypoint: string image: string tag: string } - language?: string - format?: string - version?: string - files?: File[] } /** @@ -164,7 +163,7 @@ export interface MetaDataMain { service?: Service - algorithm?: Algorithm + algorithm?: MetaDataAlgorithm } /**