Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • mdm-lab/wiki
  • hvaysset/wiki
  • jsousa/wiki
  • tclabby/wiki
4 results
Show changes
Commits on Source (8)
......@@ -360,12 +360,13 @@ update-meilisearch-index:prod:
stage: get-meili-key
variables:
MEILI_HOST: "http://localhost:7700"
MEILI_HOST_NO_PROTOCOLE: "localhost:7700"
script:
- >
df-wiki-cli
meilisearch
--key "${MEILI_MASTER_KEY}"
--host ${MEILI_HOST}
--host "${MEILI_HOST}"
get-env-var
--output build.env
artifacts:
......@@ -378,6 +379,7 @@ set-meili-env:dev:
extends: .set-meili-env
variables:
MEILI_HOST: "https://${MEILI_HOST_DEV}"
MEILI_HOST_NO_PROTOCOLE: ${MEILI_HOST_DEV}
rules:
- if: $CI_COMMIT_BRANCH != "main"
......@@ -385,6 +387,8 @@ set-meili-env:prod:
extends: .set-meili-env
variables:
MEILI_HOST: "https://${MEILI_HOST_PROD}"
MEILI_HOST_NO_PROTOCOLE: ${MEILI_HOST_PROD}
rules:
- if: $CI_COMMIT_BRANCH == "main"
......@@ -416,7 +420,6 @@ sync-zotero:
- *docker-login
script:
- echo $MEILI_HOST
- echo $MEILI_API_KEY
- >
docker buildx build --pull -t "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$CI_COMMIT_SHORT_SHA"
--build-arg "BASE_URL=$BASE_URL"
......@@ -450,7 +453,7 @@ build:prod:wiki:
# - get-pfam
variables:
BASE_URL: /wiki/
HOST_URL: https://${HOST_PROD}
HOST_URL: "https://${HOST_PROD}"
rules:
- if: $CI_COMMIT_BRANCH == "main"
......@@ -517,7 +520,7 @@ deploy:prod:
variables:
NODE_ENV: "production"
KUBE_NAMESPACE: "defense-finder-prod"
PUBLIC_URL: "${HOST_PROD}"
PUBLIC_URL: "https://${HOST_PROD}"
CI_DEBUG_TRACE: "false"
ENV: "production"
environment:
......@@ -601,7 +604,7 @@ create-structures-archives:prod:
variables:
NODE_ENV: "production"
KUBE_NAMESPACE: "defense-finder-prod"
PUBLIC_URL: "${HOST_PROD}"
PUBLIC_URL: "https://${HOST_PROD}"
CI_DEBUG_TRACE: "false"
ENV: "production"
environment:
......
......@@ -18,7 +18,12 @@ const itemValue = ref("id");
const { width } = useDisplay();
const dbName = ref("refseq")
const taxonomyFacet = ref<Record<string, any> | undefined>(undefined)
const cellPlotMargin = ref({
marginLeft: 150,
marginBottom: 200,
marginTop: 0,
marginRight: 50
})
onBeforeMount(async () => {
......@@ -150,7 +155,7 @@ const availableTaxo: Ref<string[]> = ref([
"Superkingdom"
]);
const scaleTypes = ref<string[]>(['linear', 'sqrt', 'log', 'symlog'])
const scaleTypes = ref<string[]>(['linear', 'sqrt', 'symlog'])
const selectedTaxoRank = ref<"species" | "genus" | "family" | "order" | "class" | "phylum" | "Superkingdom">("Superkingdom");
const headers = ref([
......@@ -190,7 +195,18 @@ const computedWidth = computed(() => {
return Math.max(currentWidth, 550);
});
const cellPlotComputedDimension = computed(() => {
const { marginLeft, marginBottom, marginRight, marginTop } = toValue(cellPlotMargin)
const toValWidth = toValue(width)
const widthFixCell = countSystem.value * 50 + marginLeft + marginRight
const heigthFix = countClade.value * 50 + marginTop + marginBottom
if (widthFixCell > toValWidth) {
return { width: toValWidth - marginLeft - marginRight, height: undefined }
} else {
return { width: widthFixCell, height: heigthFix }
}
})
const allHits: Ref<Record<string, any> | undefined> = ref(undefined)
......@@ -360,17 +376,33 @@ const sortedCellDomain = computed(() => {
}
})
const binPlotOptions = computed(() => {
const { marginLeft, marginBottom } = toValue(cellPlotMargin)
const { height } = toValue(cellPlotComputedDimension)
return {
marginLeft: 150,
marginBottom: 200,
marginLeft,
marginBottom,
padding: 0,
grid: true,
aspectRatio: true,
aspectRatio: height ? undefined : 1,
x: { tickRotate: 90, label: "Systems", domain: toValue(sortedCellDomain) },
color: { scheme: "plasma", legend: true, label: `Proportion per ${selectedTaxoRank.value}`, domain: [0, 100] },
}
})
const countSystem = computed(() => {
const toValueAllHits = toValue(allHits)
const data = toValueAllHits?.hits ?? []
const setSystem = new Set(data.map(d => d.type))
return setSystem.size
})
const countClade = computed(() => {
const toValueAllHits = toValue(allHits)
const data = toValueAllHits?.hits ?? []
const setSystem = new Set(data.map(d => d[selectedTaxoRank.value]))
return setSystem.size
})
const binPlotGroup = computed(() => {
return Plot.group(
......@@ -419,9 +451,13 @@ const binPlotDataOptions = computed(() => {
const toValBinPlotGroup = toValue(binPlotGroup)
const data = toValueAllHits?.hits ?? []
const plotCellMark = Plot.cell(data, toValBinPlotGroup)
const { width, height } = toValue(cellPlotComputedDimension)
const dim = height ? { width, height } : { width }
return toValueAllHits?.hits?.length > 0 ? {
...binPlotOptions.value,
width: width.value,
...dim,
title: `Proportion of genomes with defense system X per ${selectedTaxoRank.value} taxonomic rank`,
color: {
...binPlotOptions.value.color,
......
......@@ -35,6 +35,7 @@ securityContext:
runAsNonRoot: true
runAsUser: 101
runAsGroup: 101
allowPrivilegeEscalation: false
# capabilities:
# drop:
# - ALL
......
......@@ -137,7 +137,9 @@ def get_env_var(
keys = client.get_keys()
api_key = [res.key for res in keys.results if res.name == "Default Search API Key"]
print(ctx.obj.host)
if len(api_key) == 1:
with open(output, "a") as outfile:
outfile.write(f"MEILI_HOST={ctx.obj.host}\n")
outfile.write(f"MEILI_API_KEY={api_key[0]}\n")
print(ctx.obj.host)
outfile.write(f'MEILI_HOST="{ctx.obj.host}"\n')
outfile.write(f'MEILI_API_KEY="{api_key[0]}"\n')