Skip to content

Commit

Permalink
Dev simbuilder fix (#199)
Browse files Browse the repository at this point in the history
* output dir does not need to exist

* fixed pytests
  • Loading branch information
lwiniwar authored Mar 11, 2022
1 parent 1191ee6 commit 79b047a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pyhelios/simulation_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ def setAssetsDir(self, assetsDir):
self.assetsDir = assetsDir

def setOutputDir(self, outputDir):
self.validateDir(outputDir)
# self.validateDir(outputDir) # note: the output dir does not have to exist at this point
# as it can be created by (py)helios when running it
self.outputDir = outputDir

def setNumThreads(self, numThreads):
Expand Down
4 changes: 4 additions & 0 deletions pytests/test_flight_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,25 @@ def test_write_legs_not_always_active():

# expected
expected_legs_xml = f'''
<!-- leg000 -->
<leg>
<platformSettings x="{waypoints[0, 0]}" y="{waypoints[0, 1]}" z="{altitude}" movePerSec_m="{speed}" />
<scannerSettings template="{template_id}" trajectoryTimeInterval_s="0.05" />
</leg>
<!-- leg001 -->
<leg>
<platformSettings x="{waypoints[1, 0]}" y="{waypoints[1, 1]}" z="{altitude}" movePerSec_m="{speed}" />
<scannerSettings template="{template_id}" active="false" trajectoryTimeInterval_s="0.05" />
</leg>
<!-- leg002 -->
<leg>
<platformSettings x="{waypoints[2, 0]}" y="{waypoints[2, 1]}" z="{altitude}" movePerSec_m="{speed}" />
<scannerSettings template="{template_id}" trajectoryTimeInterval_s="0.05" />
</leg>
<!-- leg003 -->
<leg>
<platformSettings x="{waypoints[3, 0]}" y="{waypoints[3, 1]}" z="{altitude}" movePerSec_m="{speed}" />
<scannerSettings template="{template_id}" active="false" trajectoryTimeInterval_s="0.05" />
Expand Down
3 changes: 2 additions & 1 deletion pytests/test_scene_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def test_create_scenepart_obj_efilepath():
obj_filter_expected = f'''
<part>
<filter type="objloader">
<param type="string" key="efilepath" value="{filepath} up="z" />
<param type="string" key="efilepath" value="{filepath}" />
<param type="string" key="up" value="z" />
</filter>
</part>'''
Expand Down

0 comments on commit 79b047a

Please sign in to comment.