From 9da807ccb2a25c7827a2d99f429e4d3f8f278497 Mon Sep 17 00:00:00 2001 From: Carlo Minotti <50220438+minottic@users.noreply.github.com> Date: Tue, 30 Jul 2024 14:17:58 +0200 Subject: [PATCH 1/4] Fetch owl from release asset --- src/misc/technique-getter.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/misc/technique-getter.ts b/src/misc/technique-getter.ts index 4ceec0d..2af0569 100644 --- a/src/misc/technique-getter.ts +++ b/src/misc/technique-getter.ts @@ -128,9 +128,9 @@ export class GitHubOwlTechnique extends OntologyTechnique { config = config ?? {}; this.repoURL = config.url ?? - 'https://raw.githubusercontent.com/ExPaNDS-eu/ExPaNDS-experimental-techniques-ontology'; - this.commit = config.commit ?? 'master'; - this.file = config.file ?? 'source/PaNET.owl'; + 'https://github.com/ExPaNDS-eu/ExPaNDS-experimental-techniques-ontology/releases/' + this.commit = config.commit? `download/${config.commit}` ?? 'latest/download'; + this.file = config.file ?? 'PaNET.owl'; this.equivalentClasses = {}; this.keys.push(...['prefLabel', 'synonym']); } From d9fc8e119a514fcf95fa30b6ccda8ddf5000e6b1 Mon Sep 17 00:00:00 2001 From: Carlo Minotti <50220438+minottic@users.noreply.github.com> Date: Tue, 30 Jul 2024 14:20:21 +0200 Subject: [PATCH 2/4] Fix syntax --- src/misc/technique-getter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/technique-getter.ts b/src/misc/technique-getter.ts index 2af0569..d48646c 100644 --- a/src/misc/technique-getter.ts +++ b/src/misc/technique-getter.ts @@ -129,7 +129,7 @@ export class GitHubOwlTechnique extends OntologyTechnique { this.repoURL = config.url ?? 'https://github.com/ExPaNDS-eu/ExPaNDS-experimental-techniques-ontology/releases/' - this.commit = config.commit? `download/${config.commit}` ?? 'latest/download'; + this.commit = config.commit? `download/${config.commit}`: 'latest/download'; this.file = config.file ?? 'PaNET.owl'; this.equivalentClasses = {}; this.keys.push(...['prefLabel', 'synonym']); From 3aeab16afac9267e9083e88cfb1f01728af3e23d Mon Sep 17 00:00:00 2001 From: minottic Date: Tue, 30 Jul 2024 14:23:05 +0200 Subject: [PATCH 3/4] Fix tests --- src/__tests__/unit/technique-getter.unit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__tests__/unit/technique-getter.unit.ts b/src/__tests__/unit/technique-getter.unit.ts index 419cb11..110e4ad 100644 --- a/src/__tests__/unit/technique-getter.unit.ts +++ b/src/__tests__/unit/technique-getter.unit.ts @@ -262,7 +262,7 @@ describe('GitHubOwlTechnique', () => { }); describe('composeURL', () => { - const expectedURL = 'http://aurl/aCommit/aFile'; + const expectedURL = 'http://aurl/download/aCommit/aFile'; const tests = [ { args: new techniqueGetter.GitHubOwlTechnique({ From f2b311762f36491340fa768fbf482688e364f280 Mon Sep 17 00:00:00 2001 From: minottic Date: Tue, 30 Jul 2024 14:31:02 +0200 Subject: [PATCH 4/4] Fix linting --- src/misc/technique-getter.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/misc/technique-getter.ts b/src/misc/technique-getter.ts index d48646c..52f76d8 100644 --- a/src/misc/technique-getter.ts +++ b/src/misc/technique-getter.ts @@ -128,8 +128,10 @@ export class GitHubOwlTechnique extends OntologyTechnique { config = config ?? {}; this.repoURL = config.url ?? - 'https://github.com/ExPaNDS-eu/ExPaNDS-experimental-techniques-ontology/releases/' - this.commit = config.commit? `download/${config.commit}`: 'latest/download'; + 'https://github.com/ExPaNDS-eu/ExPaNDS-experimental-techniques-ontology/releases/'; + this.commit = config.commit + ? `download/${config.commit}` + : 'latest/download'; this.file = config.file ?? 'PaNET.owl'; this.equivalentClasses = {}; this.keys.push(...['prefLabel', 'synonym']);