Skip to content

Feat 932 ebrains adpater #963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 22 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b7b0c2e
chore(ebrains): copy over necessary files
sanjayankur31 Apr 29, 2025
235d11b
chore(ebrains): update repository resource
sanjayankur31 Apr 29, 2025
2b338db
feat(ebrains): add openapi entry
sanjayankur31 Apr 29, 2025
748a92d
feat(ebrains): update repository resource
sanjayankur31 Apr 29, 2025
2d7b474
feat(ebrains): update repository resource
sanjayankur31 Apr 29, 2025
9f105ec
wip(ebrains)
sanjayankur31 Apr 29, 2025
32996a6
chore(ebrains): register adapter
sanjayankur31 Apr 30, 2025
f7a72de
feat(ebrains): register adapter in service
sanjayankur31 Apr 30, 2025
e28d361
feat(ebrains): implement getting resources in adapter
sanjayankur31 Apr 30, 2025
3bebe69
feat(ebrains): implement copy task
sanjayankur31 Apr 30, 2025
55687aa
feat: add script for local deployment
sanjayankur31 Apr 30, 2025
1b5fc11
fix: include fairgraph in reqs
sanjayankur31 May 1, 2025
684a714
fix(ebrains): correct and add missing imports
sanjayankur31 May 1, 2025
9954c66
feat(ebrains): add to repo add box dialog
sanjayankur31 May 1, 2025
38dd106
chore: "Ebrains" -> "EBRAINS"
sanjayankur31 May 1, 2025
66971f6
feat(ebrains): complete repo addition
sanjayankur31 May 1, 2025
3f64974
feat(ebrains): complete cscs single file use case
sanjayankur31 May 6, 2025
6094e47
feat(ebrains): complete github file sources use case
sanjayankur31 May 6, 2025
bf0ad06
feat(ebrains): handle plain cscs case
sanjayankur31 May 6, 2025
c9b0a77
feat(ebrains): handle modeldb to github case
sanjayankur31 May 6, 2025
f7eed44
feat(ebrains): complete cscs handling
sanjayankur31 May 6, 2025
a3abd80
feat(ebrains): use cloud harness secret utils
sanjayankur31 May 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
export enum RepositoryType {
Dandi = 'dandi',
Figshare = 'figshare',
Github = 'github'
Github = 'github',
Biomodels = 'biomodels',
EBRAINS = "ebrains"
}

export function RepositoryTypeFromJSON(json: any): RepositoryType {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/* tslint:disable */
/* eslint-disable */
/**
* OSB Workspaces manager API
* Opensource Brain Platform - Reference Workspaces manager API
*
* The version of the OpenAPI document: 0.2.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { exists, mapValues } from '../runtime';
import {
RepositoryResourceBase,
RepositoryResourceBaseFromJSON,
RepositoryResourceBaseFromJSONTyped,
RepositoryResourceBaseToJSON,
} from './';

/**
* figshare repository resource
* @export
* @interface EBRAINSRepositoryResource
*/
export interface EBRAINSRepositoryResource {
/**
* file name
* @type {string}
* @memberof EBRAINSRepositoryResource
*/
name?: string;
/**
* Download URL of the Resource
* @type {string}
* @memberof EBRAINSRepositoryResource
*/
path?: string;
/**
* OSB Repository id
* @type {number}
* @memberof EBRAINSRepositoryResource
*/
osbrepositoryId?: number;
/**
* File size in bytes of the RepositoryResource
* @type {number}
* @memberof EBRAINSRepositoryResource
*/
size?: number;
/**
* Date/time the ReposityResource is last modified
* @type {Date}
* @memberof EBRAINSRepositoryResource
*/
timestampModified?: Date;
}

export function EBRAINSRepositoryResourceFromJSON(json: any): EBRAINSRepositoryResource {
return EBRAINSRepositoryResourceFromJSONTyped(json, false);
}

export function EBRAINSRepositoryResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): EBRAINSRepositoryResource {
if ((json === undefined) || (json === null)) {
return json;
}
return {

'name': !exists(json, 'name') ? undefined : json['name'],
'path': !exists(json, 'path') ? undefined : json['path'],
'osbrepositoryId': !exists(json, 'osbrepository_id') ? undefined : json['osbrepository_id'],
'size': !exists(json, 'size') ? undefined : json['size'],
'timestampModified': !exists(json, 'timestamp_modified') ? undefined : (new Date(json['timestamp_modified'])),
};
}

export function EBRAINSRepositoryResourceToJSON(value?: EBRAINSRepositoryResource | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {

'name': value.name,
'path': value.path,
'osbrepository_id': value.osbrepositoryId,
'size': value.size,
'timestamp_modified': value.timestampModified === undefined ? undefined : (value.timestampModified.toISOString()),
};
}


Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@
* * dandi - DANDI repository
* * figshare - FigShare repository
* * github - Github repository
* * biomodels - Biomodels repository
* * ebrains - EBRAINS repository
* @export
* @enum {string}
*/
export enum RepositoryType {
Dandi = 'dandi',
Figshare = 'figshare',
Github = 'github',
Biomodels = 'biomodels'
Biomodels = 'biomodels',
EBRAINS = 'ebrains'
}

export function RepositoryTypeFromJSON(json: any): RepositoryType {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './BiomodelsRepositoryResource';
export * from './EBRAINSRepositoryResource';
export * from './DandiRepositoryResource';
export * from './DownloadResource';
export * from './FigshareRepositoryResource';
Expand Down
4 changes: 4 additions & 0 deletions applications/osb-portal/src/pages/RepositoryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ export const RepositoryPage = (props: any) => {
"_blank"
);
break;
// For figshare, there does not seem to be a version specific URL
case "ebrains":
window.open(`${repository.uri}`, "_blank");
break;
default:
window.open(`#`, "_blank");
}
Expand Down
16 changes: 11 additions & 5 deletions applications/workspaces/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ components:
- figshare
- github
- biomodels
- ebrains
type: string
RepositoryContentType:
description: |
Expand Down Expand Up @@ -1293,6 +1294,16 @@ components:
sha:
description: The GIT sha of the resource
type: string
BiomodelsRepositoryResource:
description: biomodels repository resource
allOf:
-
$ref: '#/components/schemas/RepositoryResourceBase'
EBRAINSRepositoryResource:
description: EBRAINS repository resource
allOf:
-
$ref: '#/components/schemas/RepositoryResourceBase'
DownloadResource:
description: Download Resource (files/folders)
allOf:
Expand Down Expand Up @@ -1506,11 +1517,6 @@ components:
$ref: '#/components/schemas/Tag'
-
x-secondary: osbrepository_tag
BiomodelsRepositoryResource:
description: figshare repository resource
allOf:
-
$ref: '#/components/schemas/RepositoryResourceBase'
securitySchemes:
bearerAuth:
scheme: bearer
Expand Down
3 changes: 2 additions & 1 deletion applications/workspaces/server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ cryptography==43.0.3
debugpy==1.8.9
deprecation==2.1.0
durationpy==0.9
fairgraph==0.12.2
Flask==2.2.5
Flask-Cors==5.0.0
Flask-SQLAlchemy==3.0.2
Expand Down Expand Up @@ -75,4 +76,4 @@ types-toml==0.10.8.20240310
typing_extensions==4.12.2
urllib3==2.0.7
websocket-client==1.8.0
Werkzeug==2.2.3
Werkzeug==2.2.3
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@
from workspaces.models.workspace_resource_entity_all_of import WorkspaceResourceEntityAllOf
from workspaces.models.repository_info import RepositoryInfo
from workspaces.models.biomodels_repository_resource import BiomodelsRepositoryResource
from workspaces.models.ebrains_repository_resource import EBRAINSRepositoryResource
Loading
Loading