Skip to content
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

API: Create Projects with Associated Data (Feb.) #1644

Open
8 tasks
elisabettai opened this issue Aug 23, 2024 · 2 comments
Open
8 tasks

API: Create Projects with Associated Data (Feb.) #1644

elisabettai opened this issue Aug 23, 2024 · 2 comments
Assignees
Labels
PO issue Created by Product owners y8 NIH SPARC Y8 (originally in wrike)
Milestone

Comments

@elisabettai
Copy link
Contributor

elisabettai commented Aug 23, 2024

Description

Extend public API to create projects with associated data in the application workspace (particularly valuable for Studies with a single Service)

Deliverable

Extended API functionality, along with documentation

Acceptance criteria:
API functionality that permits to perform the above listed functions

Deadline

Y8Q2 (Feb.)

Wrike link (account/access required)


The Awakening

  • Script-Driven-Development: Implement use case using python osparc client to drive development

Singularity

  • Refactor web-server projects module

Tasks

  • Implement use case using python osparc client to drive development
  • api: create study with one service (limit)
  • api: add file to node's state. Implement as move file resource to study
  • Refactor webserver projects: job-to-project table
  • Refactor webserver-api-server comms using rpc
  • api: connect services?
@elisabettai elisabettai added PO issue Created by Product owners y8 NIH SPARC Y8 (originally in wrike) labels Aug 23, 2024
@elisabettai elisabettai changed the title API: Create Projects with Associated Data API: Create Projects with Associated Data (Feb.) Aug 23, 2024
@elisabettai elisabettai mentioned this issue Aug 23, 2024
32 tasks
@pcrespov pcrespov added this to the Event Horizon milestone Dec 16, 2024
@mguidon mguidon removed this from the Event Horizon milestone Dec 16, 2024
@pcrespov pcrespov added this to the Event Horizon milestone Jan 3, 2025
@pcrespov pcrespov modified the milestones: Event Horizon, Singularity Jan 24, 2025
@bisgaard-itis
Copy link
Contributor

Here's a summary of a discussion me and @pcrespov had about this issue:
The key issue to determine is how much functionality must be exposed in the api server in order to have a valuable framework while keeping the api as minimal as possible. In a first implementation we have decided to go for an approach where we utilize the concept of templates which we have in the following way:

  • Rather than creating a project "piece by piece" via the api-server the user can clone template projects/studies with a desired structure. E.g. a template could be template study with a single service node inside.
  • In order to place the associated data into the newly created project we will add the following endpoint to the api-server
POST /studies/{study_id}/file/{file_id}:move

whose body is

{
  relative_destination_dir: string
}

(potentially this could be a subresource of the files section of the api instead of the study section). As is, this endpoint assumes the project only holds a single node and the api-server will be responsible for figuring out what's the id of that node.

One advantage of using the template approach is that it doesn't open the door for the user to create arbitrary projects. Moreover, with a very general API it will be hard for the user to create a meaningful study/project with e.g. a complicated workbench.

@pcrespov
Copy link
Member

pcrespov commented Feb 19, 2025

Summary for Singularity sprint

Done

Planned for next sprint(s)

  • Script-Driven-Development: Implement use case using python osparc client to drive development
  • Refactor projects domain in the web-server service to enhance comms with api-web gateway service
  • New api entrypoints to create study and move file to study

@sanderegg sanderegg modified the milestones: Singularity, The Awakening Feb 24, 2025
@sanderegg sanderegg removed their assignment Feb 26, 2025
@sanderegg sanderegg self-assigned this Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PO issue Created by Product owners y8 NIH SPARC Y8 (originally in wrike)
Projects
None yet
Development

No branches or pull requests

5 participants