@@ -147,11 +147,17 @@ fn convert_dataset_entry_to_task(entry: &DatasetEntry) -> Result<SweForgeTask> {
147147 . as_deref ( )
148148 . and_then ( |s| serde_json:: from_str ( s) . ok ( ) ) ;
149149
150+ let install = entry
151+ . install
152+ . as_ref ( )
153+ . filter ( |s| !s. is_empty ( ) )
154+ . map ( |s| vec ! [ s. clone( ) ] ) ;
155+
150156 let workspace = WorkspaceConfig {
151157 repo : repo_url,
152158 version : entry. version . clone ( ) . unwrap_or_default ( ) ,
153159 base_commit : Some ( entry. base_commit . clone ( ) ) ,
154- install : None ,
160+ install,
155161 language : Some ( language) ,
156162 fail_to_pass : f2p,
157163 pass_to_pass : p2p,
@@ -237,6 +243,10 @@ mod tests {
237243 assert_eq ! ( task. workspace. repo, "https://github.com/django/django" ) ;
238244 assert_eq ! ( task. workspace. base_commit. as_deref( ) , Some ( "abc123def456" ) ) ;
239245 assert ! ( task. swe_forge_fields. is_some( ) ) ;
246+ assert_eq ! (
247+ task. workspace. install. as_deref( ) ,
248+ Some ( vec![ "pip install -e ." . to_string( ) ] . as_slice( ) )
249+ ) ;
240250
241251 let fields = task. swe_forge_fields . as_ref ( ) . unwrap ( ) ;
242252 assert_eq ! ( fields. instance_id, "django__django-12345" ) ;
@@ -373,6 +383,7 @@ mod tests {
373383 fail_to_pass : Some ( r#"["tests/test_orm.py::test_query"]"# . to_string ( ) ) ,
374384 pass_to_pass : None ,
375385 environment_setup_commit : None ,
386+ install : Some ( "pip install -e ." . to_string ( ) ) ,
376387 language : Some ( "python" . to_string ( ) ) ,
377388 difficulty : Some ( "medium" . to_string ( ) ) ,
378389 difficulty_score : Some ( 2 ) ,
0 commit comments