From 4ba78d0549180833073b755b1e748b46cf38db8b Mon Sep 17 00:00:00 2001
From: Remi  PLANEL <rplanel@pasteur.fr>
Date: Thu, 25 Apr 2024 16:26:45 +0200
Subject: [PATCH] add changes

---
 .gitlab-ci.yml                                | 32 +++++++++++--------
 components/OperonStructure.vue                |  4 +--
 .../content/ArticleSystemDistributionPlot.vue |  4 +--
 3 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d2ceaf62..458be9c4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,16 +26,11 @@ cache:
     
 
 stages:
-  # - build-df-cli
-  # - deploy-meilisearch
-  - zotero
+  - delete-release
   - get-meili-key
   - pre-processing
   - build
-  # - build-wiki
-  - delete-release
   - lint
-  # - update-meilisearch-indexes
   - deploy
   - post-deploy
 
@@ -141,7 +136,7 @@ deploy:meilisearch:prod:
 
 ############### DELETE RELEASE
 
-delete-meili-helm-release:
+delete-meilisearch-release:dev:
   rules:
     - if: $CI_COMMIT_BRANCH != "main"
   stage: delete-release
@@ -158,7 +153,7 @@ delete-meili-helm-release:
     - helm delete -n ${NAMESPACE} ${CI_PROJECT_NAME}-${CI_ENVIRONMENT_NAME}-meilisearch 
 
 
-delete-meili-helm-release:prod:
+delete-meilisearch-release:prod:
   rules:
     - if: $CI_COMMIT_BRANCH == "main"
   stage: delete-release
@@ -351,7 +346,7 @@ lint:
       meilisearch 
       --host ${MEILI_HOST}
       --key "${MEILI_MASTER_KEY}"
-      update article
+      update articles
       --file zot-articles.json
 
 
@@ -412,17 +407,26 @@ set-meili-env:prod:
     - if: $CI_COMMIT_BRANCH == "main"  
 
 ##############################
-sync-zotero:
+.sync-zotero:
   extends: .df-wiki-cli-run
-  stage: zotero
+  stage: pre-processing
   script:
     - df-wiki-cli articles missing-doi --dir ./content/ --key ${ZOTERO_API_KEY}
     - df-wiki-cli articles fetch-from-zotero --key ${ZOTERO_API_KEY} --output zot-articles.json
   artifacts:
     paths:
       - zot-articles.json
+
+sync-zotero:dev:
+  extends: .sync-zotero
+  when: manual
   rules:
-    - if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "dev"
+    - if: $CI_COMMIT_BRANCH != "main"
+
+sync-zotero:prod:
+  extends: .sync-zotero
+  rules:
+    - if: $CI_COMMIT_BRANCH == "main"
 
 
 ################ BUILD ##########################
@@ -468,7 +472,7 @@ build:prod:wiki:
   extends: .build
   needs:
     - set-meili-env:prod
-    - sync-zotero
+    - sync-zotero:prod
     # - get-pfam
   variables:
     BASE_URL: /wiki/
@@ -514,7 +518,7 @@ build:prod:wiki:
 deploy:dev:
   extends: .deploy
   rules:
-    - if: $CI_COMMIT_BRANCH == "dev" || $CI_COMMIT_BRANCH == "system-distribution-plot"
+    - if: $CI_COMMIT_BRANCH == "dev" || $CI_COMMIT_BRANCH == "operon-struct-type-article-update"
   needs:
     - "build:dev:wiki"
   when: manual
diff --git a/components/OperonStructure.vue b/components/OperonStructure.vue
index 93fa51e1..83bb83f7 100644
--- a/components/OperonStructure.vue
+++ b/components/OperonStructure.vue
@@ -18,9 +18,9 @@ const height = ref<number>(150)
 const svgRef = ref<SVGElement | null>(null)
 const margin = ref<PlotMargin>({
     marginTop: 10,
-    marginRight: 5,
+    marginRight: 7,
     marginBottom: 30,
-    marginLeft: 5,
+    marginLeft: 7,
 })
 
 const snackbar = ref(false)
diff --git a/components/content/ArticleSystemDistributionPlot.vue b/components/content/ArticleSystemDistributionPlot.vue
index 908347da..26fe6075 100644
--- a/components/content/ArticleSystemDistributionPlot.vue
+++ b/components/content/ArticleSystemDistributionPlot.vue
@@ -191,7 +191,7 @@ async function fetchSystemHits() {
         pending.value = true
         const data = await client.index(toValue(msIndexName)).search("", {
             facets: ["*"],
-            filter: [`type = '${toValue(systemName)}'`],
+            filter: [`type='${toValue(systemName)}'`],
             limit: 500000,
         })
         systemHits.value = data
@@ -285,4 +285,4 @@ async function fetchRefSeqTaxo() {
             </v-card-text>
         </v-card>
     </v-card>
-</template>
\ No newline at end of file
+</template>
-- 
GitLab