Skip to content

Commit bd6c177

Browse files
pgettaloris-olivier-obiloris-marug-bartolokoban
authored
Prepare for release 2025.06.02.1 (#401)
* Explore circuits - json and api (#297) * Added the two apis route for both circuit count and data * Ran prettier and linter * Corrected the typo with journal and minifed the json file --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Creation of single circuit page base (#304) * Created the single circuit page based on the key * Corrected typo in the fetching useEffect function * Ran linter and prettier * Copy and paste again the minified version of ALL_CIRCUITS.json * Added public to gitignore and ran prettier --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Added the header content of the detail view with metadata and parameters (#306) Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Circuit detail view hero image preview section (#307) * Added component to MainDetailView * Updated CircuitSchemaProps and corrected subcircuits for plural in the minified json --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Removed currency dropdown (#287) * Removed currency dropdown * Fixed import in price list --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Componisation of circuit table (#308) * Added the component CircuitTable * Added columns and installed react-resizable * Added subcircuit, button and resizable columns * Added utils to filter * Added use-filtered-data * Added the filter for circuits * Style for the circuit table * Corrected the api path with circuits plural * Remove console log * Integrated the CircuitTable component in list view * Ran linter and prettier * Component for circuit page in both free and paid account + fixed some feedbacks from Pavlo --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Circuit detail view fixed the typo in fetching individual circuits (#310) * Added component to MainDetailView * Updated CircuitSchemaProps and corrected subcircuits for plural in the minified json * Fixed the path of the placeholder image * Fixed the typo circuit with an s to fetch correctly the circuit * Resolved conflict with the image placeholder url --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Changed the name of the api circuit for explore-circuits (#312) Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Circuit detail view bottom sections (#311) * Hide side bar and navigation top bar in detail view * Added the four sections * Provenance section - added a conditional rendering to publication link if undefined * Ran prettier and linter * Fixed the component of circuit table to render correctly * First feedback implementation from Pavlo * Changed the parent, derived and subcircuit fetching logic --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Fixed the circuit count (#315) Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Fix circuit layout (#317) * Fix detailed view scroll and top level layout (#318) * Fix detailed view scroll and top level layout * Move detailed page logic to a separate component, use in vlab explore * Added reset search input when closing search bar (#321) * Added reset search input when closing search bar * Ran linter and prettier --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Fix simulate page filter (#323) Sim filter. * Fix all lint issues (#324) All the lint errors have been fixed. We should now prevent Github from merging if the linter has not been successful. * 189/prevent emails not approved by insurance (#326) * Added check on the user profile update form * Added email verification on virtual lab creation * Fix linting issue * PR feedbacks * Removed the component of search bar and filter options (#325) * Removed the component of search bar and filter options * Removed the file filtering-circuits * Fix simulate page filter (#323) Sim filter. * Fix all lint issues (#324) All the lint errors have been fixed. We should now prevent Github from merging if the linter has not been successful. * Removed the component of search bar and filter options * Removed the component of search bar and filter options * Fixed multiples times import issue --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> Co-authored-by: g-bar <gilarturo.barriosdelvillar@openbraininstitute.org> Co-authored-by: Tolokoban <contact@tolokoban.org> * remove redandunt imports * Subcircuit issue with download (#327) * Removed the component of search bar and filter options * Removed the file filtering-circuits * Harmonised Subcircuit component props with the ones of CircuitTable * Added the props to SubcircuitTable imported component --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Fix subcircuit url in two cases (#332) * Removed the component of search bar and filter options * Removed the file filtering-circuits * Fixed typescript error with onHeaderCell --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Fix download for 3rd depth level subcircuits (#333) * Removed the component of search bar and filter options * Removed the file filtering-circuits * Created a function to find circuits everywhere it is in the tree * Ran prettier --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Use both @id and @id.keyword fields for query (#331) * Literature search tool has a new output format now (#337) * Get the searchParams when changing route to a new URL (#320) * Removed the component of search bar and filter options * Get the searchParams when changing route to a new URL * Fixed rebase, lint and prettier * Changed for Bilal solution with nuqs * Removed push and parameter set --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * allow user to accept invites without active paid subscription * remove checking for pro subscription when invite to vlab * Fix type validation with public project artifact table type (#341) * Removed the component of search bar and filter options * Literature search tool has a new output format now (#337) * Get the searchParams when changing route to a new URL (#320) * Removed the component of search bar and filter options * Get the searchParams when changing route to a new URL * Fixed rebase, lint and prettier * Changed for Bilal solution with nuqs * Removed push and parameter set --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * allow user to accept invites without active paid subscription * remove checking for pro subscription when invite to vlab * Fix the type error with different new property in artifact table --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> Co-authored-by: Tolokoban <contact@tolokoban.org> Co-authored-by: bilalesi <b_meddah@esi.dz> * add commit hooks using lefthook * Download options for circuits (#347) * Removed the component of search bar and filter options * Added the Download container and modified the download item schema * Cleaned the CircuitTable file by removing merged columns and resize logic * Added the four different types of filetype * Refine the layout in css * Added the animation for the download modal * Modify style of full circuit download * Added total number of files at top * Added new JSON from Daniela * Added the full circuit data --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Removed deleted and reserved countries. Sort by name (#345) * Removed deleted and reserved countries. Sort by name * fix prettier --------- Co-authored-by: Jean-Denis Courcol <courcol@mac.lan> * Add filter to circuit tables (#349) * Removed the component of search bar and filter options * Added the circuit back and the display when filtered * Removed unused variable dependencies * Correctly rename kebab-case the files --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Circuit detail active link licence parent circuit (#351) * Removed the component of search bar and filter options * Added link for parent region and license --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Search bar for circuits (#350) * Removed the component of search bar and filter options * Reinstate the search function matching the logic of filters --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Circuit table add published in column (#355) * Removed the component of search bar and filter options * Added publishedIn column to circuit table --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Circuit table hierarchical and flat list views (#354) * Removed the component of search bar and filter options * Created the switch component * Added the flatten hierarchical logic --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Circuit detail view greyed out disabled button icon (#356) * Removed the component of search bar and filter options * Lower opacity of disabled element and used a gray for those too --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Circuits format number with comma (#353) * Removed the component of search bar and filter options * Formatted numbers in detail view and table --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Circuit detail view download panel (#352) * Removed the component of search bar and filter options * Hook the download button of circuit detail page to the download side panel * fixed merging conflict --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * 62/ai more suggestions (#359) * Added thread_id for suggestions * merging issues * Prevent suggestions queries to go in parallel * Filter circuits by brain region * Section not set (#362) * fix sanity dataset env * Ciruit table hide non matching filtered circuits (#365) * Removed the component of search bar and filter options * Fixed the changes of views with filter activated --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * rename literature search to AI Assistant (#358) Co-authored-by: Jean-Denis Courcol <courcol@mac.home> * change launch to launch price in the subscription pill (#361) * change launch to launch price in the subscription pill * fix prettier --------- Co-authored-by: Jean-Denis Courcol <courcol@mac.home> * fix user journey order and unwanted reset of current session * limit the number of entries to store in indexdb, less then the default will be deleted * Circuit metada update contributor published in registration date (#367) * Removed the component of search bar and filter options * 62/ai more suggestions (#359) * Added thread_id for suggestions * merging issues * Prevent suggestions queries to go in parallel * Filter circuits by brain region * Section not set (#362) * fix sanity dataset env * Ciruit table hide non matching filtered circuits (#365) * Removed the component of search bar and filter options * Fixed the changes of views with filter activated --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Removed doubled import in main-detail-view-core * Capitalized download files and increase font size for download items * Added published in to the detail view * Added all the metadata in detail view * Remove conditional test * fix user journey order and unwanted reset of current session * limit the number of entries to store in indexdb, less then the default will be deleted * Manually fixed linter and prettier * Ran prettier write --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> Co-authored-by: Tolokoban <contact@tolokoban.org> Co-authored-by: g-bar <gilarturo.barriosdelvillar@openbraininstitute.org> Co-authored-by: bilalesi <b_meddah@esi.dz> * Handle view all for contributors and institutions (#368) * Circuit list remove contributor capitalize published in (#370) * Removed the component of search bar and filter options * Removed contributor columns from table and put an uppercase to Published In --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * replace mailto support by url to support page (#373) Co-authored-by: Jean-Denis Courcol <courcol@mac.lan> * Implement back to list in circuit detail (#372) * Removed the component of search bar and filter options * Added the side bar back to list and fixed some styling * Fixed the linting error --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Reduce the journey size from 10 to 3 (#374) * Reduce the journey size from 10 to 3, ans fix a bug in a hardcoded suggestion * Fix upsidedown title * rename Assistance to Assistant (#375) Co-authored-by: Jean-Denis Courcol <courcol@mac.lan> * Circuits detail text corrections (#378) * Removed the component of search bar and filter options * Fixed spacing problem in contributors name and added s to institution --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Add notebook subtype for accounting * Add button to run a notebook, for now only enabled in staging, and only for the regular (not uploaded by a user) notebooks * All circuits update json and contributors (#386) * Removed the component of search bar and filter options * Replace single string for contributors and organization by a list of items * Added condition for view more if list is bigger than the slicing --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Circuit detail view fix z index position of sections tabs (#382) * Removed the component of search bar and filter options * Removed sticky to the tab to avoid bug with download container * Add button to run a notebook, for now only enabled in staging, and only for the regular (not uploaded by a user) notebooks * All circuits update json and contributors (#386) * Removed the component of search bar and filter options * Replace single string for contributors and organization by a list of items * Added condition for view more if list is bigger than the slicing --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Removed sticky to the tab to avoid bug with download container * Fixed duplication of ContributingInstitution type --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> Co-authored-by: Dries Verachtert <dries.verachtert@dries.eu> * Added carrousel with tutorial videos (#389) * Replace svg icons within notebooks table with svg components, move the icons within the buttons so users can click on them * Adding tutorials on gomepage for non-new users (#391) * Fix back to list button for circuit (#395) * Removed the component of search bar and filter options * Use margin left to make some space with back to list side bar --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * Fixed contributor modal metadata (#396) * Removed the component of search bar and filter options * Init * Fixed the contributor list when trimmed * Replace JSON with correct contributors list - without duplication --------- Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> * pass workspace context to synapses places and simulations (#397) * Address MR conflict resolution issues --------- Co-authored-by: loris-olivier-obi <olivier.loris@openbraininstitute.org> Co-authored-by: Loris Olivier <53363974+loris-maru@users.noreply.github.com> Co-authored-by: g-bar <gilarturo.barriosdelvillar@openbraininstitute.org> Co-authored-by: Tolokoban <contact@tolokoban.org> Co-authored-by: bilalesi <b_meddah@esi.dz> Co-authored-by: jdcourcol <jean-denis.courcol@openbraininstitute.org> Co-authored-by: Jean-Denis Courcol <courcol@mac.lan> Co-authored-by: Jean-Denis Courcol <courcol@mac.home> Co-authored-by: Dries Verachtert <dries.verachtert@dries.eu>
1 parent faba0ce commit bd6c177

File tree

43 files changed

+649
-63
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+649
-63
lines changed

.deployment-envs/.env.staging

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ NEXT_PUBLIC_SANITY_DATASET="staging"
2626
# AI Agent service from Machine Learning team
2727
NEXT_PUBLIC_AI_AGENT_URL="https://staging.openbraininstitute.org/api/agent/"
2828

29-
29+
NEXT_PUBLIC_ENABLE_RUN_NOTEBOOK=True

.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ MAILCHIMP_API_SERVER='dummy'
2222
# AI Agent service from Machine Learning team
2323
NEXT_PUBLIC_AI_AGENT_URL="https://staging.openbraininstitute.org/api/agent/"
2424

25-
25+
NEXT_PUBLIC_ENABLE_RUN_NOTEBOOK=True

public/circuits/ALL_CIRCUITS.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/images/icons/download.svg

Lines changed: 0 additions & 6 deletions
This file was deleted.

public/images/icons/eye-2.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

public/images/icons/eye.svg

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/api/bluenaas/getSynaptomePlacement.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
import { blueNaasUrl } from '@/config';
22
import { SingleSynaptomeConfig } from '@/types/synaptome';
3+
import { VirtualLabInfo } from '@/types/virtual-lab/common';
34
import { createHeaders } from '@/util/utils';
45

56
export default async function getSynapsesPlacement({
7+
context,
68
modelId,
79
seed,
810
config,
911
token,
1012
signal,
1113
}: {
14+
context: VirtualLabInfo;
1215
token: string;
1316
modelId: string;
1417
seed: number;
@@ -19,7 +22,12 @@ export default async function getSynapsesPlacement({
1922
`${blueNaasUrl}/synaptome/generate-placement?model_id=${encodeURIComponent(modelId)}`,
2023
{
2124
method: 'post',
22-
headers: createHeaders(token),
25+
headers: createHeaders(token, {
26+
'Content-Type': 'application/json',
27+
accept: 'application/json',
28+
'virtual-lab-id': context.virtualLabId,
29+
'project-id': context.projectId,
30+
}),
2331
body: JSON.stringify({
2432
seed,
2533
config,

src/api/bluenaas/runSimulation.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ export const runGenericSingleNeuronSimulation = async ({
3737
accept: 'application/octet-stream',
3838
authorization: `bearer ${token}`,
3939
'Content-Type': 'application/json',
40+
'virtual-lab-id': vlabId,
41+
'project-id': projectId,
4042
},
4143
body: JSON.stringify(formattedConfig),
4244
}

src/app/app/virtual-lab/(home)/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { getUserActiveSubscription } from '@/api/virtual-lab-svc/queries/subscri
1414
import { ErrorListing } from '@/components/VirtualLab/labs-listing/elements';
1515
import { getUserStats } from '@/api/virtual-lab-svc/queries/stats';
1616
import { tryCatch } from '@/api/utils';
17+
import { TutorialsCarrousel } from '@/components/tutorials-carrousel';
1718

1819
const tabs = [
1920
{
@@ -98,6 +99,7 @@ export default async function Home({ searchParams }: Props) {
9899
)}
99100
</Suspense>
100101
</ErrorBoundary>
102+
<TutorialsCarrousel />
101103
</div>
102104
);
103105
}

src/app/app/virtual-lab/lab/[virtualLabId]/project/[projectId]/(pages)/notebooks/NotebookTable.tsx

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,26 @@ import { ConfigProvider, DatePicker, Input, Select } from 'antd';
44

55
import { useMemo, useState } from 'react';
66

7-
import { DeleteOutlined, LoadingOutlined, PlusOutlined, UndoOutlined } from '@ant-design/icons';
7+
import {
8+
DeleteOutlined,
9+
LoadingOutlined,
10+
PlusOutlined,
11+
UndoOutlined,
12+
PlayCircleOutlined,
13+
} from '@ant-design/icons';
814
import Table from 'antd/es/table';
915
import { Popover } from 'antd/lib';
1016
import { compareAsc, format } from 'date-fns';
1117
import { saveAs } from 'file-saver';
1218
import dynamic from 'next/dynamic';
13-
import Image from 'next/image';
1419
import dateFnsGenerateConfig from 'rc-picker/lib/generate/dateFns'; // eslint-disable-line import/no-extraneous-dependencies
1520
import { RangeValue } from 'rc-picker/lib/interface'; // eslint-disable-line import/no-extraneous-dependencies
1621
import { getSorter } from './utils';
1722
import ContentModal from './ContentModal';
1823
import NotebookTabs from './NotebookTabs';
24+
import { DownloadIconWhiteWithCorners } from '@/components/icons/DownloadIcon';
25+
import { EyeIconWhite, EyeIconWhiteWithinBox } from '@/components/icons/EyeIcon';
1926
import useSearch from '@/components/VirtualLab/Search';
20-
import { basePath } from '@/config';
2127

2228
import { downloadZippedNotebook, Notebook } from '@/util/virtual-lab/github';
2329

@@ -36,13 +42,15 @@ function NotebookTable({
3642
vlabId,
3743
projectId,
3844
serverError,
45+
enableRunNotebook = false,
3946
}: {
4047
vlabId: string;
4148
projectId: string;
4249
notebooks: Notebook[];
4350
failed?: string[];
4451
onDelete?: (id: string) => void;
4552
serverError?: string;
53+
enableRunNotebook?: boolean;
4654
}) {
4755
const [loadingZip, setLoadingZip] = useState(false);
4856
const [currentNotebook, setCurrentNotebook] = useState<Notebook | null>(null);
@@ -96,6 +104,10 @@ function NotebookTable({
96104
});
97105
}, [notebooks, search]);
98106

107+
const runNotebook = async (notebook: Notebook) => {
108+
notification.info(`Request received to run notebook: ${notebook.name}`);
109+
};
110+
99111
const handleDownloadClick = async (notebook: Notebook) => {
100112
setLoadingZip(true);
101113

@@ -116,65 +128,66 @@ function NotebookTable({
116128
content={
117129
<div className="flex min-w-[120px] flex-col gap-2 text-white">
118130
<div className="flex gap-4">
119-
<Image
120-
src={`${basePath}/images/icons/eye-2.svg`}
121-
width={12}
122-
height={12}
123-
alt="View"
124-
/>
125131
<button
126132
type="button"
127133
onClick={() => {
128134
setDisplay('readme');
129135
setCurrentNotebook(notebook);
130136
}}
137+
className="inline-flex items-center gap-[10px]"
131138
>
139+
<EyeIconWhiteWithinBox className="text-xs" aria-label="Readme" />
132140
Readme
133141
</button>
134142
</div>
135143
<div className="flex gap-4">
136-
<Image
137-
src={`${basePath}/images/icons/eye.svg`}
138-
width={12}
139-
height={12}
140-
alt="Readme"
141-
/>
142144
<a
143145
href={`https://nbviewer.org/github/${notebook.githubUser}/${notebook.githubRepo}/blob/${notebook.defaultBranch}/${notebook.path}`}
144146
target="_blank"
147+
className="inline-flex items-center gap-[10px]"
145148
>
149+
<EyeIconWhite className="text-xs" aria-label="Preview" />
146150
Preview
147151
</a>
148152
</div>
149153
<div className="flex gap-4">
150-
<Image
151-
src={`${basePath}/images/icons/download.svg`}
152-
width={12}
153-
height={12}
154-
alt="download"
155-
/>
156154
<button
157155
type="button"
158-
className="hover:text-primary-4"
156+
className="inline-flex items-center gap-[10px] hover:text-primary-4"
159157
onClick={() => handleDownloadClick(notebook)}
160158
>
159+
<DownloadIconWhiteWithCorners className="text-xs" aria-label="Download" />
161160
Download
162161
</button>
163162
{loadingZip && <LoadingOutlined />}
164163
</div>
165164

166165
{onDelete && (
167166
<div className="flex gap-4 text-error">
168-
<DeleteOutlined className="text-error" />
169167
<button
170168
type="button"
171-
className="hover:text-primary-4"
169+
className="inline-flex items-center gap-[10px] hover:text-primary-4"
172170
onClick={() => onDelete(notebook.id)}
173171
>
172+
<DeleteOutlined className="text-xs text-error" aria-label="Delete" />
174173
Delete
175174
</button>
176175
</div>
177176
)}
177+
{enableRunNotebook && (
178+
<div className="flex gap-4">
179+
<button
180+
type="button"
181+
className="inline-flex items-center gap-[10px]"
182+
onClick={() => {
183+
runNotebook(notebook);
184+
}}
185+
>
186+
<PlayCircleOutlined aria-label="Run" />
187+
Run
188+
</button>
189+
</div>
190+
)}
178191
</div>
179192
}
180193
overlayStyle={{ border: '1px solid #096DD9' }}

0 commit comments

Comments
 (0)