From 81478ac88ebc42b18d2ae616737881bdd6304028 Mon Sep 17 00:00:00 2001 From: Hiro Date: Tue, 14 Nov 2023 18:21:06 +0530 Subject: [PATCH 1/3] ci: fixes cross hardhat (#148) * style: prettier Signed-off-by: Nasfame * ci: env fixes Signed-off-by: Nasfame * setup: node arm64 Signed-off-by: Nasfame * cross: matrix arch Signed-off-by: Nasfame * ci: prettier Signed-off-by: Nasfame * checkout:main Signed-off-by: Nasfame * check:prettier * try: pr types Signed-off-by: Nasfame * try: Signed-off-by: Nasfame * ci: ready_for_review Signed-off-by: Nasfame * pr: try Signed-off-by: Nasfame * prettier: ready_for vewi Signed-off-by: Nasfame * ci: on fixes Signed-off-by: Nasfame * fixes: persist creds Signed-off-by: Nasfame * ci: setup upterm Signed-off-by: Nasfame * cross: setup uptream only when req Signed-off-by: Nasfame * cross: setup tmate session Signed-off-by: Nasfame * cross: reorder os jobs Signed-off-by: Nasfame * ci: cross...... Signed-off-by: Nasfame * cross: setup working directory Signed-off-by: Nasfame * prettier: ignore hardhat Signed-off-by: Nasfame * cross: fixes Signed-off-by: Nasfame * cross: envfile experiment Signed-off-by: Nasfame * ci: experiment tmate Signed-off-by: Nasfame * cross: serctest ENV HARHDat Signed-off-by: Nasfame * cross: fix .envfile Signed-off-by: Nasfame * fix: cross Signed-off-by: Nasfame * cross: .env.tmp Signed-off-by: Nasfame * cross: write file action fixes Signed-off-by: Nasfame * fix: write file action Signed-off-by: Nasfame * cross: envfile Signed-off-by: Nasfame * ci: cross Signed-off-by: Nasfame * final: fixes Signed-off-by: Nasfame --------- Signed-off-by: Nasfame --- .github/workflows/cross.yml | 1 + .github/workflows/cross[hardhat].yml | 14 +++++++++++++- .prettierignore | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cross.yml b/.github/workflows/cross.yml index 855a8f1d..c24b2045 100644 --- a/.github/workflows/cross.yml +++ b/.github/workflows/cross.yml @@ -84,6 +84,7 @@ jobs: check-latest: true - name: Write environment #TODO: add coachroach ssl certificate + shell: bash run: | echo $envfile > .env.tmp sed 's/ /\n/g' .env.tmp > .env diff --git a/.github/workflows/cross[hardhat].yml b/.github/workflows/cross[hardhat].yml index f06c4c3e..0c36775a 100644 --- a/.github/workflows/cross[hardhat].yml +++ b/.github/workflows/cross[hardhat].yml @@ -32,7 +32,7 @@ jobs: max-parallel: 2 fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [windows-latest, ubuntu-latest, macos-latest] node_version: [18, 19, 20] architecture: [x64] @@ -53,11 +53,23 @@ jobs: architecture: ${{ matrix.architecture }} check-latest: true + - uses: DamianReeves/write-file-action@master + with: + path: ${{github.workspace}}/.env.tmp + write-mode: overwrite + contents: | + ${{secrets.ENVHARDHAT}} + - name: Write environment + shell: bash run: | echo $envfile > .env.tmp sed 's/ /\n/g' .env.tmp > .env + # - name: Setup tmate session + # if: ${{matrix.os}}==windows-latest + # uses: mxschmitt/action-tmate@v3 + - name: Install dependencies run: pnpm install diff --git a/.prettierignore b/.prettierignore index abcbe544..eac195a7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,4 @@ .next/ pnpm-lock.yaml prisma/generated +hardhat/ \ No newline at end of file From b39a66dbbfe59916f20098a80a120a15bb70a9c0 Mon Sep 17 00:00:00 2001 From: Nasfame Date: Tue, 14 Nov 2023 18:22:14 +0530 Subject: [PATCH 2/3] post-merge: ci fixes Signed-off-by: Nasfame --- .github/workflows/cross[hardhat].yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/cross[hardhat].yml b/.github/workflows/cross[hardhat].yml index 0c36775a..1b15a0c4 100644 --- a/.github/workflows/cross[hardhat].yml +++ b/.github/workflows/cross[hardhat].yml @@ -53,23 +53,12 @@ jobs: architecture: ${{ matrix.architecture }} check-latest: true - - uses: DamianReeves/write-file-action@master - with: - path: ${{github.workspace}}/.env.tmp - write-mode: overwrite - contents: | - ${{secrets.ENVHARDHAT}} - - name: Write environment shell: bash run: | echo $envfile > .env.tmp sed 's/ /\n/g' .env.tmp > .env - # - name: Setup tmate session - # if: ${{matrix.os}}==windows-latest - # uses: mxschmitt/action-tmate@v3 - - name: Install dependencies run: pnpm install From ddd83dcd42b5a1eefdc20bf2a3225c4039567352 Mon Sep 17 00:00:00 2001 From: Chukwunonso Ikeji Date: Wed, 22 Nov 2023 13:22:04 +0100 Subject: [PATCH 3/3] migrate: dummy repositories migrate to svelte store (#150) * repositories migrated to store with some problems * null error fixed --- .../repository/components/repository.tsx | 70 ++++++++++--------- src/app/dashboard/repository/page.tsx | 2 +- src/state/modelStore.ts | 4 +- 3 files changed, 40 insertions(+), 36 deletions(-) diff --git a/src/app/dashboard/repository/components/repository.tsx b/src/app/dashboard/repository/components/repository.tsx index b65a5fff..a02856a7 100644 --- a/src/app/dashboard/repository/components/repository.tsx +++ b/src/app/dashboard/repository/components/repository.tsx @@ -1,47 +1,51 @@ +import useModelStore, { IModel } from '@/state/modelStore' import React from 'react' import { BiLike } from 'react-icons/bi' import { GoDownload } from 'react-icons/go' -export default function Repository({ repository }) { +export default function Repository() { + const { models } = useModelStore() + return (
-
- {repository.map((item) => ( -
-
-
- - {item.label} - -
-
- {item.title} + + {/* extract the values of the object */} + {models && Object.values(models).map(model => ( +
+
+
+ + {'Text Generation'} + +
+
+ {model.name} +
+
+

{model.description}

+
+
+
+ Updated {"12 2023"}
-
-

{item.description}

+
+ + {'12k'}
-
-
- Updated {item.time} -
-
- - {item.dowloaded} -
-
- - {item.likes} -
+
+ + {'50'}
- -
- ))} -
+ +
+
+ ))} +
) } diff --git a/src/app/dashboard/repository/page.tsx b/src/app/dashboard/repository/page.tsx index 72632765..7ebac2ac 100644 --- a/src/app/dashboard/repository/page.tsx +++ b/src/app/dashboard/repository/page.tsx @@ -75,7 +75,7 @@ export default function Page() {
- +
diff --git a/src/state/modelStore.ts b/src/state/modelStore.ts index 0e3c0a4e..06525d18 100644 --- a/src/state/modelStore.ts +++ b/src/state/modelStore.ts @@ -3,9 +3,9 @@ import { devtools, persist } from 'zustand/middleware' import { upsert_user } from '@app/explore/upsert_user' import { Model, TrainingRequest } from '@prisma/client' -type IModel = Omit, 'updatedAt'> +export type IModel = Omit, 'updatedAt'> -interface Models { +export interface Models { [modelId: string]: IModel }