diff --git a/.github/workflows/build_frontend.yml b/.github/workflows/build_frontend.yml index 85024567..98712087 100644 --- a/.github/workflows/build_frontend.yml +++ b/.github/workflows/build_frontend.yml @@ -17,11 +17,14 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22 + cache: "npm" + cache-dependency-path: | + front/package-lock.json - name: Install frontend dependencies run: | cd front - npm install + npm ci - name: Build frontend app run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..98f07031 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,89 @@ +name: Lint +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + lint-backend: + env: + UV_CACHE_DIR: /tmp/.uv-cache + + runs-on: "ubuntu-latest" + + steps: + - uses: actions/checkout@v4 + + - name: Set up uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh + + - name: Set up Python 3.12 + run: uv python install 3.12 + + - name: Restore uv cache + uses: actions/cache@v4 + with: + path: /tmp/.uv-cache + key: uv-${{ runner.os }}-${{ hashFiles('back/uv.lock') }} + restore-keys: | + uv-${{ runner.os }}-${{ hashFiles('back/uv.lock') }} + uv-${{ runner.os }} + + - name: Install dev dependencies + run: | + cd back + uv sync --all-extras --dev + + - name: Run Ruff + run: | + cd back + uv run ruff check src tests + + - name: Check Formatting + run: | + cd back + uv run ruff format --check src tests + + - name: Run pyright + run: | + cd back + uv run pyright src tests + + - name: Minimize uv cache + run: uv cache prune --ci + + lint-frontend: + runs-on: "ubuntu-latest" + + steps: + - name: Checkout source code + uses: actions/checkout@v4 + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: "npm" + cache-dependency-path: | + front/package-lock.json + + - name: Install frontend dependencies + run: | + cd front + npm ci + + - name: Check formatting + run: | + cd front + npm run format-check + + - name: Lint with Nextjs + run: | + cd front + npm run lint + + - name: Lint with Typescript Compiler + run: | + cd front + npm run lint-tsc diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a89ad0b8..f1849812 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: pull_request: branches: ["main"] jobs: - test: + test-backend: env: UV_CACHE_DIR: /tmp/.uv-cache @@ -46,6 +46,16 @@ jobs: uv-${{ runner.os }}-${{ hashFiles('back/uv.lock') }} uv-${{ runner.os }} + - name: Restore uv cache + uses: actions/cache@v4 + if: ${{ matrix.os == 'windows-latest' }} + with: + path: /tmp/.uv-cache + key: uv-${{ runner.os }}-${{ hashFiles('back\uv.lock') }} + restore-keys: | + uv-${{ runner.os }}-${{ hashFiles('back\uv.lock') }} + uv-${{ runner.os }} + - name: Install the project dependencies run: | cd back @@ -81,3 +91,28 @@ jobs: - name: Minimize uv cache run: uv cache prune --ci + + test-frontend: + runs-on: "ubuntu-latest" + + steps: + - name: Checkout source code + uses: actions/checkout@v4 + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: "npm" + cache-dependency-path: | + front/package-lock.json + + - name: Install frontend dependencies + run: | + cd front + npm ci + + - name: Run tests + run: | + cd front + npm run test diff --git a/back/src/whombat/routes/model_runs.py b/back/src/whombat/routes/model_runs.py index 0a861dfc..faec5ba9 100644 --- a/back/src/whombat/routes/model_runs.py +++ b/back/src/whombat/routes/model_runs.py @@ -53,7 +53,9 @@ async def get_model_run( return await api.model_runs.get(session, model_run_uuid) -@model_runs_router.get("/detail/evaluation/", response_model=schemas.Evaluation) +@model_runs_router.get( + "/detail/evaluation/", response_model=schemas.Evaluation +) async def get_model_run_evaluation( session: Session, model_run_uuid: UUID, diff --git a/back/tests/test_api/test_audio.py b/back/tests/test_api/test_audio.py index 2f5faba6..19bdeee3 100644 --- a/back/tests/test_api/test_audio.py +++ b/back/tests/test_api/test_audio.py @@ -181,8 +181,10 @@ def test_stream_an_audio_clip(fmt: str, random_wav_factory): original_data = f.read(8_000) assert (streamed_data == original_data).all() + CHUNK_SIZE = 1024 * 512 + def test_can_stream_a_real_audio_file(data_dir: Path): path = data_dir / "bats.wav" diff --git a/front/package.json b/front/package.json index e5b5fb80..5e1ebb2e 100644 --- a/front/package.json +++ b/front/package.json @@ -9,6 +9,8 @@ "coverage": "jest --coverage", "start": "next start", "format": "prettier --write .", + "format-check": "prettier --check .", + "lint-tsc": "tsc --noEmit -p .", "lint": "next lint", "lint:fix": "eslint --fix --ext .js,.jsx,.ts,.tsx ./src", "test-ct": "playwright test -c playwright-ct.config.ts", diff --git a/front/src/app/(auth)/login/page.tsx b/front/src/app/(auth)/login/page.tsx index 347ec96d..727ac71c 100644 --- a/front/src/app/(auth)/login/page.tsx +++ b/front/src/app/(auth)/login/page.tsx @@ -8,7 +8,7 @@ import { z } from "zod"; import api from "@/app/api"; import { WhombatIcon } from "@/lib/components/icons"; -import { Input, Group } from "@/lib/components/inputs/index"; +import { Group, Input } from "@/lib/components/inputs/index"; import Info from "@/lib/components/ui/Info"; import Link from "@/lib/components/ui/Link"; diff --git a/front/src/app/(base)/evaluation/detail/model_run/page.tsx b/front/src/app/(base)/evaluation/detail/model_run/page.tsx index 42928823..c2d06d3e 100644 --- a/front/src/app/(base)/evaluation/detail/model_run/page.tsx +++ b/front/src/app/(base)/evaluation/detail/model_run/page.tsx @@ -7,8 +7,8 @@ import toast from "react-hot-toast"; import ModelRunActions from "@/app/components/model_runs/ModelRunActions"; import ModelRunEvaluation from "@/app/components/model_runs/ModelRunEvaluations"; -import ModelRunUpdate from "@/app/components/model_runs/ModelRunUpdate"; import ModelRunExplorer from "@/app/components/model_runs/ModelRunExplorer"; +import ModelRunUpdate from "@/app/components/model_runs/ModelRunUpdate"; import useModelRun from "@/app/hooks/api/useModelRun"; diff --git a/front/src/lib/api/annotation_tasks.ts b/front/src/lib/api/annotation_tasks.ts index 3f93167a..9563e3eb 100644 --- a/front/src/lib/api/annotation_tasks.ts +++ b/front/src/lib/api/annotation_tasks.ts @@ -63,7 +63,9 @@ export function registerAnnotationTasksAPI( return Page(schemas.AnnotationTaskSchema).parse(response.data); } - async function getAnnotationTask(uuid: string): Promise { + async function getAnnotationTask( + uuid: string, + ): Promise { const response = await instance.get(endpoints.get, { params: { annotation_task_uuid: uuid }, }); diff --git a/front/src/lib/api/clip_evaluations.ts b/front/src/lib/api/clip_evaluations.ts index 67089470..91faa662 100644 --- a/front/src/lib/api/clip_evaluations.ts +++ b/front/src/lib/api/clip_evaluations.ts @@ -41,7 +41,9 @@ export function registerClipEvaluationAPI( return Page(schemas.ClipEvaluationSchema).parse(response.data); } - async function getClipEvaluation(uuid: string): Promise { + async function getClipEvaluation( + uuid: string, + ): Promise { const response = await instance.get(endpoints.get, { params: { clip_evaluation_uuid: uuid }, }); diff --git a/front/src/lib/components/annotation_projects/AnnotationProjectCreate.tsx b/front/src/lib/components/annotation_projects/AnnotationProjectCreate.tsx index 1c1e90c0..45db0419 100644 --- a/front/src/lib/components/annotation_projects/AnnotationProjectCreate.tsx +++ b/front/src/lib/components/annotation_projects/AnnotationProjectCreate.tsx @@ -2,12 +2,7 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useCallback } from "react"; import { useForm } from "react-hook-form"; -import { - Input, - Group, - Submit, - TextArea, -} from "@/lib/components/inputs/index"; +import { Group, Input, Submit, TextArea } from "@/lib/components/inputs/index"; import { AnnotationProjectCreateSchema } from "@/lib/schemas"; import type { AnnotationProject, AnnotationProjectCreate } from "@/lib/types"; diff --git a/front/src/lib/components/annotation_projects/AnnotationProjectImport.tsx b/front/src/lib/components/annotation_projects/AnnotationProjectImport.tsx index cac087f5..a0dc1e32 100644 --- a/front/src/lib/components/annotation_projects/AnnotationProjectImport.tsx +++ b/front/src/lib/components/annotation_projects/AnnotationProjectImport.tsx @@ -4,6 +4,7 @@ import { useForm } from "react-hook-form"; import { UploadIcon } from "@/lib/components/icons"; import { Group, Input, Submit } from "@/lib/components/inputs/index"; + import { AnnotationProjectImportSchema } from "@/lib/schemas"; import type { AnnotationProjectImport } from "@/lib/types"; diff --git a/front/src/lib/components/annotation_projects/AnnotationProjectList.tsx b/front/src/lib/components/annotation_projects/AnnotationProjectList.tsx index 799b5fff..135e850d 100644 --- a/front/src/lib/components/annotation_projects/AnnotationProjectList.tsx +++ b/front/src/lib/components/annotation_projects/AnnotationProjectList.tsx @@ -1,8 +1,8 @@ -import Empty from "@/lib/components/ui/Empty"; import AnnotationProjectComponent from "@/lib/components/annotation_projects/AnnotationProject"; import { AddIcon, UploadIcon, WarningIcon } from "@/lib/components/icons"; import ListLayout from "@/lib/components/layouts/List"; import Dialog from "@/lib/components/ui/Dialog"; +import Empty from "@/lib/components/ui/Empty"; import type { AnnotationProject } from "@/lib/types"; diff --git a/front/src/lib/components/annotation_projects/AnnotationProjectNotesSummary.tsx b/front/src/lib/components/annotation_projects/AnnotationProjectNotesSummary.tsx index 843d5804..9549c8a3 100644 --- a/front/src/lib/components/annotation_projects/AnnotationProjectNotesSummary.tsx +++ b/front/src/lib/components/annotation_projects/AnnotationProjectNotesSummary.tsx @@ -1,8 +1,8 @@ import { type ComponentProps, type FC } from "react"; -import Empty from "@/lib/components/ui/Empty"; import { CheckIcon, IssuesIcon } from "@/lib/components/icons"; import Card from "@/lib/components/ui/Card"; +import Empty from "@/lib/components/ui/Empty"; import { H3 } from "@/lib/components/ui/Headings"; import Loading from "@/lib/components/ui/Loading"; diff --git a/front/src/lib/components/annotation_projects/AnnotationProjectProgress.tsx b/front/src/lib/components/annotation_projects/AnnotationProjectProgress.tsx index 5c0d9043..a528c411 100644 --- a/front/src/lib/components/annotation_projects/AnnotationProjectProgress.tsx +++ b/front/src/lib/components/annotation_projects/AnnotationProjectProgress.tsx @@ -1,6 +1,5 @@ import { useMemo } from "react"; -import Empty from "@/lib/components/ui/Empty"; import { AddIcon, CompleteIcon, @@ -10,6 +9,7 @@ import { } from "@/lib/components/icons"; import Button from "@/lib/components/ui/Button"; import Card from "@/lib/components/ui/Card"; +import Empty from "@/lib/components/ui/Empty"; import { H3 } from "@/lib/components/ui/Headings"; import Loading from "@/lib/components/ui/Loading"; import MetricBadge from "@/lib/components/ui/MetricBadge"; diff --git a/front/src/lib/components/clip_annotations/ClipAnnotationNotes.tsx b/front/src/lib/components/clip_annotations/ClipAnnotationNotes.tsx index c76582e0..a216cc55 100644 --- a/front/src/lib/components/clip_annotations/ClipAnnotationNotes.tsx +++ b/front/src/lib/components/clip_annotations/ClipAnnotationNotes.tsx @@ -1,7 +1,7 @@ import { ComponentProps } from "react"; -import Empty from "@/lib/components/ui/Empty"; import NotesPanel from "@/lib/components/notes/NotesPanel"; +import Empty from "@/lib/components/ui/Empty"; export default function ClipAnnotationNotes( props: Omit, "title" | "EmptyNotes">, diff --git a/front/src/lib/components/clip_annotations/ClipAnnotationSoundEvents.tsx b/front/src/lib/components/clip_annotations/ClipAnnotationSoundEvents.tsx index 265b40c9..7c75b039 100644 --- a/front/src/lib/components/clip_annotations/ClipAnnotationSoundEvents.tsx +++ b/front/src/lib/components/clip_annotations/ClipAnnotationSoundEvents.tsx @@ -2,8 +2,8 @@ import { type ComponentProps } from "react"; import type { SoundEventAnnotation } from "@/lib/types"; -import Empty from "../ui/Empty"; import SelectedSoundEventAnnotation from "../sound_event_annotations/SelectedSoundEventAnnotation"; +import Empty from "../ui/Empty"; export default function ClipAnnotationSoundEvents({ selectedSoundEventAnnotation, diff --git a/front/src/lib/components/clip_annotations/ClipAnnotationTags.tsx b/front/src/lib/components/clip_annotations/ClipAnnotationTags.tsx index d8bc4bc9..e7ea5aa3 100644 --- a/front/src/lib/components/clip_annotations/ClipAnnotationTags.tsx +++ b/front/src/lib/components/clip_annotations/ClipAnnotationTags.tsx @@ -1,7 +1,7 @@ import { type ComponentProps } from "react"; -import Empty from "@/lib/components/ui/Empty"; import Card from "@/lib/components/ui/Card"; +import Empty from "@/lib/components/ui/Empty"; import TagPanel from "../tags/TagPanel"; @@ -17,6 +17,8 @@ export default function ClipAnnotationTags( function NoTags() { return ( - No tags currently registered in this clip. + + No tags currently registered in this clip. + ); } diff --git a/front/src/lib/components/clip_predictions/ClipPredictionTags.tsx b/front/src/lib/components/clip_predictions/ClipPredictionTags.tsx index 2d2ae64f..fa324055 100644 --- a/front/src/lib/components/clip_predictions/ClipPredictionTags.tsx +++ b/front/src/lib/components/clip_predictions/ClipPredictionTags.tsx @@ -2,9 +2,9 @@ import { useMemo } from "react"; import useStore from "@/app/store"; -import Empty from "@/lib/components/ui/Empty"; import { TagsIcon } from "@/lib/components/icons"; import TagComponent from "@/lib/components/tags/Tag"; +import Empty from "@/lib/components/ui/Empty"; import { H4 } from "@/lib/components/ui/Headings"; import type { ClipPrediction, Interval, Tag } from "@/lib/types"; diff --git a/front/src/lib/components/datasets/DatasetCreate.tsx b/front/src/lib/components/datasets/DatasetCreate.tsx index 21635b59..e64e3c4e 100644 --- a/front/src/lib/components/datasets/DatasetCreate.tsx +++ b/front/src/lib/components/datasets/DatasetCreate.tsx @@ -2,12 +2,7 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useCallback } from "react"; import { useForm } from "react-hook-form"; -import { - Input, - Group, - Submit, - TextArea, -} from "@/lib/components/inputs/index"; +import { Group, Input, Submit, TextArea } from "@/lib/components/inputs/index"; import { DatasetCreateSchema } from "@/lib/schemas"; import type { DatasetCreate } from "@/lib/types"; diff --git a/front/src/lib/components/datasets/DatasetImport.tsx b/front/src/lib/components/datasets/DatasetImport.tsx index a2a59928..d641bac9 100644 --- a/front/src/lib/components/datasets/DatasetImport.tsx +++ b/front/src/lib/components/datasets/DatasetImport.tsx @@ -3,7 +3,7 @@ import { useCallback } from "react"; import { useForm } from "react-hook-form"; import { UploadIcon } from "@/lib/components/icons"; -import { Input, Group, Submit } from "@/lib/components/inputs/index"; +import { Group, Input, Submit } from "@/lib/components/inputs/index"; import { DatasetImportSchema } from "@/lib/schemas"; import type { DatasetImport } from "@/lib/types"; diff --git a/front/src/lib/components/datasets/DatasetList.tsx b/front/src/lib/components/datasets/DatasetList.tsx index 97677dd6..647431e8 100644 --- a/front/src/lib/components/datasets/DatasetList.tsx +++ b/front/src/lib/components/datasets/DatasetList.tsx @@ -1,7 +1,7 @@ -import Empty from "@/lib/components/ui/Empty"; import DatasetComponent from "@/lib/components/datasets/Dataset"; import { AddIcon, UploadIcon, WarningIcon } from "@/lib/components/icons"; import Dialog from "@/lib/components/ui/Dialog"; +import Empty from "@/lib/components/ui/Empty"; import type { Dataset } from "@/lib/types"; diff --git a/front/src/lib/components/evaluation_sets/EvaluationSetCreate.tsx b/front/src/lib/components/evaluation_sets/EvaluationSetCreate.tsx index 0b24c91b..526b8b66 100644 --- a/front/src/lib/components/evaluation_sets/EvaluationSetCreate.tsx +++ b/front/src/lib/components/evaluation_sets/EvaluationSetCreate.tsx @@ -2,12 +2,7 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useCallback } from "react"; import { Controller, useForm } from "react-hook-form"; -import { - Input, - Group, - Submit, - TextArea, -} from "@/lib/components/inputs/index"; +import { Group, Input, Submit, TextArea } from "@/lib/components/inputs/index"; import { EvaluationSetCreateSchema } from "@/lib/schemas"; import type { EvaluationSetCreate } from "@/lib/types"; diff --git a/front/src/lib/components/evaluation_sets/EvaluationSetImport.tsx b/front/src/lib/components/evaluation_sets/EvaluationSetImport.tsx index d8a820f4..2c6cff5f 100644 --- a/front/src/lib/components/evaluation_sets/EvaluationSetImport.tsx +++ b/front/src/lib/components/evaluation_sets/EvaluationSetImport.tsx @@ -3,7 +3,7 @@ import { useCallback } from "react"; import { Controller, useForm } from "react-hook-form"; import { UploadIcon } from "@/lib/components/icons"; -import { Input, Group, Submit } from "@/lib/components/inputs/index"; +import { Group, Input, Submit } from "@/lib/components/inputs/index"; import { EvaluationSetImportSchema } from "@/lib/schemas"; import { EvaluationSetImport } from "@/lib/types"; diff --git a/front/src/lib/components/evaluation_sets/EvaluationSetList.tsx b/front/src/lib/components/evaluation_sets/EvaluationSetList.tsx index ea2e7f89..e2699405 100644 --- a/front/src/lib/components/evaluation_sets/EvaluationSetList.tsx +++ b/front/src/lib/components/evaluation_sets/EvaluationSetList.tsx @@ -1,7 +1,7 @@ -import Empty from "@/lib/components/ui/Empty"; import EvaluationSetComponent from "@/lib/components/evaluation_sets/EvaluationSet"; import { AddIcon, UploadIcon, WarningIcon } from "@/lib/components/icons"; import Dialog from "@/lib/components/ui/Dialog"; +import Empty from "@/lib/components/ui/Empty"; import type { EvaluationSet, Tag } from "@/lib/types"; diff --git a/front/src/lib/components/evaluation_sets/EvaluationSetOverview.tsx b/front/src/lib/components/evaluation_sets/EvaluationSetOverview.tsx index cd43f3e3..b723794f 100644 --- a/front/src/lib/components/evaluation_sets/EvaluationSetOverview.tsx +++ b/front/src/lib/components/evaluation_sets/EvaluationSetOverview.tsx @@ -1,4 +1,3 @@ -import Empty from "@/lib/components/ui/Empty"; import { AddIcon, ModelIcon, @@ -9,6 +8,7 @@ import { } from "@/lib/components/icons"; import Button from "@/lib/components/ui/Button"; import Card from "@/lib/components/ui/Card"; +import Empty from "@/lib/components/ui/Empty"; import { H3 } from "@/lib/components/ui/Headings"; import MetricBadge from "@/lib/components/ui/MetricBadge"; diff --git a/front/src/lib/components/inputs/Location.tsx b/front/src/lib/components/inputs/Location.tsx index 0c51e14a..30508e84 100644 --- a/front/src/lib/components/inputs/Location.tsx +++ b/front/src/lib/components/inputs/Location.tsx @@ -5,7 +5,7 @@ import dynamic from "next/dynamic"; import { useForm } from "react-hook-form"; import { z } from "zod"; -import { Input, Group } from "@/lib/components/inputs"; +import { Group, Input } from "@/lib/components/inputs"; import useDebounceSubmit from "@/lib/hooks/forms/useDebounceSubmit"; @@ -74,11 +74,7 @@ export default function LocationInput({
{!disabled && (
- + - + tag.key === "Scientific Taxon Name")?.value || "unknown"; + return ( + data.tags?.find((tag) => tag.key === "Scientific Taxon Name")?.value || + "unknown" + ); } diff --git a/front/src/lib/components/tags/TagPanel.tsx b/front/src/lib/components/tags/TagPanel.tsx index ebf0d538..7241962e 100644 --- a/front/src/lib/components/tags/TagPanel.tsx +++ b/front/src/lib/components/tags/TagPanel.tsx @@ -1,6 +1,5 @@ import { type FC } from "react"; -import Empty from "@/lib/components/ui/Empty"; import { DeleteIcon, TagsIcon } from "@/lib/components/icons"; import AddTagButton from "@/lib/components/tags/AddTagButton"; import TagComponent from "@/lib/components/tags/Tag"; @@ -8,6 +7,7 @@ import TagSearchBarBase, { type TagSearchBarProps, } from "@/lib/components/tags/TagSearchBar"; import Button from "@/lib/components/ui/Button"; +import Empty from "@/lib/components/ui/Empty"; import { H4 } from "@/lib/components/ui/Headings"; import type { Tag } from "@/lib/types"; diff --git a/front/src/lib/components/users/UserChangePassword.tsx b/front/src/lib/components/users/UserChangePassword.tsx index f9201ed6..218943c2 100644 --- a/front/src/lib/components/users/UserChangePassword.tsx +++ b/front/src/lib/components/users/UserChangePassword.tsx @@ -4,7 +4,7 @@ import { z } from "zod"; import useActiveUser from "@/app/hooks/api/useActiveUser"; -import { Input, Group } from "@/lib/components/inputs/index"; +import { Group, Input } from "@/lib/components/inputs/index"; import type { User } from "@/lib/types"; diff --git a/front/src/lib/components/users/UserCreateForm.tsx b/front/src/lib/components/users/UserCreateForm.tsx index 1756972a..dd7f50ad 100644 --- a/front/src/lib/components/users/UserCreateForm.tsx +++ b/front/src/lib/components/users/UserCreateForm.tsx @@ -6,7 +6,7 @@ import { useForm } from "react-hook-form"; import api from "@/app/api"; -import { Input, Group } from "@/lib/components/inputs/index"; +import { Group, Input } from "@/lib/components/inputs/index"; import Button from "@/lib/components/ui/Button"; import { UserCreateSchema } from "@/lib/schemas"; diff --git a/front/src/lib/hooks/recordings/useRecordingTable.tsx b/front/src/lib/hooks/recordings/useRecordingTable.tsx index f2854656..99ef59e0 100644 --- a/front/src/lib/hooks/recordings/useRecordingTable.tsx +++ b/front/src/lib/hooks/recordings/useRecordingTable.tsx @@ -13,8 +13,8 @@ import { TagIcon, TimeIcon, } from "@/lib/components/icons"; -import TableCell from "@/lib/components/tables/TableCell"; import Checkbox from "@/lib/components/inputs/Checkbox"; +import TableCell from "@/lib/components/tables/TableCell"; import TableHeader from "@/lib/components/tables/TableHeader"; import TableInput from "@/lib/components/tables/TableInput"; import TableMap from "@/lib/components/tables/TableMap"; diff --git a/front/src/lib/schemas/datasets.ts b/front/src/lib/schemas/datasets.ts index fc7808b5..68b7c112 100644 --- a/front/src/lib/schemas/datasets.ts +++ b/front/src/lib/schemas/datasets.ts @@ -1,6 +1,7 @@ "use client"; import { z } from "zod"; + import { FileSchema } from "./common"; export const DatasetSchema = z.object({ diff --git a/front/src/lib/schemas/model_runs.ts b/front/src/lib/schemas/model_runs.ts index 14f9046e..7dda5ba2 100644 --- a/front/src/lib/schemas/model_runs.ts +++ b/front/src/lib/schemas/model_runs.ts @@ -1,6 +1,7 @@ "use client"; import { z } from "zod"; + import { FileSchema } from "./common"; export const ModelRunSchema = z.object({ @@ -19,5 +20,5 @@ export const ModelRunUpdateSchema = z.object({ export const ModelRunImportSchema = z.object({ evaluation_set_uuid: z.string().uuid(), - model_run: FileSchema + model_run: FileSchema, });