Skip to content

Commit f7dabda

Browse files
committed
create data asset from cloud workstation session
1 parent e76977b commit f7dabda

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/codeocean/data_asset.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,32 @@ class ComputationSource:
382382
)
383383

384384

385+
@dataclass_json
386+
@dataclass(frozen=True)
387+
class CloudWorkstationSource:
388+
"""Cloud Workstation session source configuration for creating data assets."""
389+
390+
id: str = field(
391+
metadata={"description": "Computation ID of the Cloud Workstation session"},
392+
)
393+
path: str = field(
394+
metadata={
395+
"description": (
396+
"Path within the Cloud Workstation to create the data asset from"
397+
),
398+
},
399+
)
400+
run_script: Optional[str] = field(
401+
default=None,
402+
metadata={
403+
"description": (
404+
"Path to the script that was executed, relative to the capsule folder."
405+
"Existence determines if the data would be of type result"
406+
),
407+
},
408+
)
409+
410+
385411
@dataclass_json
386412
@dataclass(frozen=True)
387413
class Source:
@@ -399,6 +425,10 @@ class Source:
399425
default=None,
400426
metadata={"description": "Computation source configuration"},
401427
)
428+
cloud_workstation: Optional[CloudWorkstationSource] = field(
429+
default=None,
430+
metadata={"description": "Cloud Workstation source configuration"},
431+
)
402432

403433

404434
@dataclass_json

0 commit comments

Comments
 (0)