Skip to content

Commit

Permalink
Add field, and added test values for the dummy organism
Browse files Browse the repository at this point in the history
  • Loading branch information
fhennig committed Dec 11, 2024
1 parent 4ae7b84 commit 3e7d3db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions kubernetes/loculus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1275,6 +1275,9 @@ defaultOrganisms:
schema:
image: "https://www.un.org/sites/un2.un.org/files/field/image/1583952355.1997.jpg"
organismName: "Test Dummy Organism"
metadataTemplate:
- country
- date
metadata:
- name: date
type: date
Expand Down
5 changes: 4 additions & 1 deletion website/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ export function getSchema(organism: string): Schema {
}

export function getMetadataTemplateFields(organism: string): string[] {
const schema = getConfig(organism).schema;
if (schema.metadataTemplate !== undefined) {
return schema.metadataTemplate;
}
return getConfig(organism).schema.inputFields.map((field) => field.name);
// TODO
}

export function getRuntimeConfig(): RuntimeConfig {
Expand Down
1 change: 1 addition & 0 deletions website/src/pages/[organism]/submission/template/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { UploadAction } from '../../../../components/Submission/DataUploadF
import { getMetadataTemplateFields } from '../../../../config';
import { ACCESSION_FIELD, SUBMISSION_ID_FIELD } from '../../../../settings.ts';

/** The TSV template file that users can download from the submission page. */
export const GET: APIRoute = async ({ params, request }) => {
const rawOrganism = params.organism!;
const { organism } = cleanOrganism(rawOrganism);
Expand Down

0 comments on commit 3e7d3db

Please sign in to comment.