11"""Code project container config within IDEs"""
2-
2+ from projspec . artifact import BaseArtifact
33from projspec .proj import ProjectSpec
44
55
@@ -12,15 +12,28 @@ def match(self) -> bool:
1212 return self .proj .fs .exists (f"{ self .proj .url } /.project/spec.yaml" )
1313
1414 def parse (self ) -> None :
15- ...
15+ from projspec .artifact .process import Process
16+
17+ # "opens" the project in the sense that it is set as the current context.
18+ # Editing still happens in jupyter/vscode/etc
19+ self .artifacts ["set_project" ] = Process (
20+ self .proj , cmd = ["nvwb" , "open" , self .proj .url ]
21+ )
22+
23+ # create:
24+ # https://docs.nvidia.com/ai-workbench/user-guide/latest/reference/user-interface/cli.html#create-project
1625
1726
1827class JetbrainsIDE (ProjectSpec ):
1928 def match (self ) -> bool :
2029 return self .proj .fs .exists (f"{ self .proj .url } /.idea" )
2130
2231 def parse (self ) -> None :
23- ...
32+ from projspec .artifact .process import Process
33+
34+ self .artifacts ["launch" ] = Process (
35+ self .proj , cmd = ["pycharm" , self .proj .url , "nosplash" , "dontReopenProjects" ]
36+ )
2437
2538
2639class VSCode (ProjectSpec ):
@@ -32,7 +45,9 @@ def match(self) -> bool:
3245 return self .proj .fs .exists (f"{ self .proj .url } /.vscode/settings.json" )
3346
3447 def parse (self ) -> None :
35- ...
48+ from projspec .artifact .process import Process
49+
50+ self .artifacts ["launch" ] = Process (self .proj , cmd = ["code" , self .proj .url ])
3651
3752
3853class Zed (ProjectSpec ):
@@ -42,4 +57,6 @@ def match(self) -> bool:
4257 return self .proj .fs .exists (f"{ self .proj .url } /.zed/settings.json" )
4358
4459 def parse (self ) -> None :
45- ...
60+ from projspec .artifact .process import Process
61+
62+ self .artifacts ["launch" ] = Process (self .proj , cmd = ["zed" , self .proj .url ])
0 commit comments