Skip to content

Commit

Permalink
instanceName -> organismName
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson committed May 22, 2024
1 parent 29c73d9 commit 924aa6b
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ data class InstanceConfig(
)

data class Schema(
val instanceName: String,
val organismName: String,
val metadata: List<Metadata>,
)

Expand Down
4 changes: 2 additions & 2 deletions backend/src/test/resources/backend_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
},
"schema": {
"instanceName": "Test",
"organismName": "Test",
"metadata": [
{
"name": "date",
Expand Down Expand Up @@ -103,7 +103,7 @@
]
},
"schema": {
"instanceName": "Test",
"organismName": "Test",
"metadata": [
{
"name": "date",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
},
"schema": {
"instanceName": "Test",
"organismName": "Test",
"metadata": [
{
"name": "date",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ organisms:
ebolavirus-sudan:
schema:
image: "https://cdn.britannica.com/01/179201-050-FED1B381/filamentous-ebolavirus-particles-scanning-electron-micrograph-cell.jpg?w=400&h=300&c=crop"
instanceName: "Ebolavirus Sudan"
organismName: "Ebolavirus Sudan"
metadata:
- name: date
type: date
Expand Down
4 changes: 2 additions & 2 deletions kubernetes/loculus/templates/_common-metadata.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ organisms:
{{ $key }}:
schema:
{{- with ($instance.schema | include "loculus.patchMetadataSchema" | fromYaml) }}
instanceName: {{ quote .instanceName }}
organismName: {{ quote .organismName }}
loadSequencesAutomatically: {{ .loadSequencesAutomatically | default false }}
{{ if .image }}
image: {{ .image }}
Expand Down Expand Up @@ -167,7 +167,7 @@ organisms:
{{ $key }}:
schema:
{{- with $instance.schema }}
instanceName: {{ quote .instanceName }}
organismName: {{ quote .organismName }}
metadata:
{{ $metadata := (include "loculus.patchMetadataSchema" .
| fromYaml).metadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data:
{{- with ($instance.schema | include "loculus.patchMetadataSchema" | fromYaml) }}
database_config.yaml: |
schema:
instanceName: {{ .instanceName }}
organismName: {{ .organismName }}
opennessLevel: OPEN
metadata:
{{- range (concat $commonMetadata .metadata) }}
Expand Down
10 changes: 5 additions & 5 deletions kubernetes/loculus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ logo:
defaultOrganismConfig: &defaultOrganismConfig
schema: &schema
loadSequencesAutomatically: true
instanceName: "Ebola Zaire"
organismName: "Ebola Zaire"
image: "https://cdn.britannica.com/01/179201-050-FED1B381/filamentous-ebolavirus-particles-scanning-electron-micrograph-cell.jpg?w=400&h=300&c=crop"
### Field list
## General fields
Expand Down Expand Up @@ -910,7 +910,7 @@ defaultOrganisms:
<<: *defaultOrganismConfig
schema:
<<: *schema
instanceName: "Ebola Sudan"
organismName: "Ebola Sudan"
image: "https://www.nih.gov/sites/default/files/styles/featured_media_breakpoint-medium/public/news-events/news-releases/2023/niaid-03.jpg?itok=m4wFNGkn&timestamp=1675437186"
preprocessing:
- <<: *preprocessing
Expand Down Expand Up @@ -949,7 +949,7 @@ defaultOrganisms:
<<: *defaultOrganismConfig
schema:
<<: *schema
instanceName: "Mpox Virus"
organismName: "Mpox Virus"
image: "https://cdn.who.int/media/images/default-source/health-topics/monkeypox/12763.tmb-1200v.jpg?sfvrsn=cd044fbd_37"
metadataAdd:
- name: clade
Expand Down Expand Up @@ -1013,7 +1013,7 @@ defaultOrganisms:
<<: *defaultOrganismConfig
schema:
<<: *schema
instanceName: "West Nile Virus"
organismName: "West Nile Virus"
image: "https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/West_Nile_Virus_Image.jpg/256px-West_Nile_Virus_Image.jpg?20200815184100"
metadataAdd:
- name: lineage
Expand Down Expand Up @@ -1078,7 +1078,7 @@ defaultOrganisms:
dummy-organism:
schema:
image: "https://www.un.org/sites/un2.un.org/files/field/image/1583952355.1997.jpg"
instanceName: "Test Dummy Organism"
organismName: "Test Dummy Organism"
metadata:
- name: date
type: date
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { Schema } from '../../types/config.ts';
import type { MutationProportionCount } from '../../types/lapis.ts';

const schema: Schema = {
instanceName: 'instance name',
organismName: 'instance name',
metadata: [
{ name: 'metadataField1', type: 'string', header: 'testHeader1' },
{ name: 'metadataField2', type: 'string' },
Expand Down
2 changes: 1 addition & 1 deletion website/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export type Organism = {
export function getConfiguredOrganisms() {
return Object.entries(getWebsiteConfig().organisms).map(([key, instance]) => ({
key,
displayName: instance.schema.instanceName,
displayName: instance.schema.organismName,
image: instance.schema.image,
description: instance.schema.description,
}));
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/api_documentation/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const organismKeys = Object.keys(websiteConfig.organisms);
const organismToDisplayName = Object.fromEntries(
organismKeys.map((organism) => {
return [organism, websiteConfig.organisms[organism].schema.instanceName];
return [organism, websiteConfig.organisms[organism].schema.organismName];
}),
);
Expand Down
2 changes: 1 addition & 1 deletion website/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export type MutationFilter = {
};

const schema = z.object({
instanceName: z.string(),
organismName: z.string(),
image: z.string().optional(),
description: z.string().optional(),
metadata: z.array(metadata),
Expand Down
2 changes: 1 addition & 1 deletion website/tests/playwrightSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default async function globalSetupForPlaywright() {
lapisUrl,
{
metadata: [],
instanceName: 'Test',
organismName: 'Test',
primaryKey: 'doesNotMatter',
defaultOrderBy: 'neitherDoesThis',
defaultOrder: 'ascending',
Expand Down

0 comments on commit 924aa6b

Please sign in to comment.