From 4c3a08f844aaa0678b9eb9928f4e5074b9195a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cle=CC=81ment=20Doumouro?= Date: Wed, 13 Nov 2024 13:49:40 +0100 Subject: [PATCH] chore: rename stage --- datashare-api/src/main/java/org/icij/datashare/Stage.java | 2 +- .../src/test/java/org/icij/datashare/PipelineHelperTest.java | 2 +- datashare-app/src/main/java/org/icij/datashare/CliApp.java | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/datashare-api/src/main/java/org/icij/datashare/Stage.java b/datashare-api/src/main/java/org/icij/datashare/Stage.java index 93db1f25e..4518ff2c5 100644 --- a/datashare-api/src/main/java/org/icij/datashare/Stage.java +++ b/datashare-api/src/main/java/org/icij/datashare/Stage.java @@ -11,7 +11,7 @@ public enum Stage { INDEX(true), ENQUEUEIDX(false), NLP(true), - CREATENLPBATCHESFROMINDEX(false), + CREATENLPBATCHESFROMIDX(false), BATCHNLP(false), ARTIFACT(false); diff --git a/datashare-api/src/test/java/org/icij/datashare/PipelineHelperTest.java b/datashare-api/src/test/java/org/icij/datashare/PipelineHelperTest.java index bf4df7b91..1445bb9a7 100644 --- a/datashare-api/src/test/java/org/icij/datashare/PipelineHelperTest.java +++ b/datashare-api/src/test/java/org/icij/datashare/PipelineHelperTest.java @@ -52,7 +52,7 @@ public void test_get_queue_names_for_batch_nlp_pipeline() { @Test public void test_get_queue_names_for_batch_nlp_pipeline_from_index() { PipelineHelper pipelineHelper = new PipelineHelper(new PropertiesProvider(new HashMap<>() {{ - put("stages", "CREATENLPBATCHESFROMINDEX,BATCHNLP"); + put("stages", "CREATENLPBATCHESFROMIDX,BATCHNLP"); }})); assertThat(pipelineHelper.getQueueNameFor(Stage.BATCHNLP)).isEqualTo("extract:queue:batchnlp"); } diff --git a/datashare-app/src/main/java/org/icij/datashare/CliApp.java b/datashare-app/src/main/java/org/icij/datashare/CliApp.java index e351f7adf..b1f17fa66 100644 --- a/datashare-app/src/main/java/org/icij/datashare/CliApp.java +++ b/datashare-app/src/main/java/org/icij/datashare/CliApp.java @@ -22,7 +22,6 @@ import org.slf4j.LoggerFactory; import java.io.IOException; -import java.nio.file.Path; import java.util.List; import java.util.Properties; @@ -137,7 +136,7 @@ private static void runTaskWorker(CommonMode mode, Properties properties) throws new Task<>(EnqueueFromIndexTask.class.getName(), nullUser(), propertiesToMap(properties))); } - if (pipeline.has(Stage.CREATENLPBATCHESFROMINDEX)) { + if (pipeline.has(Stage.CREATENLPBATCHESFROMIDX)) { taskFactory.createBatchEnqueueFromIndexTask( new Task<>(CreateNlpBatchesFromIndex.class.getName(), nullUser(), propertiesToMap(properties)), (percentage) -> {logger.info("percentage: {}% done", percentage); return null;}).call();