Skip to content

Commit

Permalink
Make black happy
Browse files Browse the repository at this point in the history
  • Loading branch information
trey0 committed Jul 31, 2024
1 parent 765e765 commit 3b3ad97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 7 additions & 2 deletions pano/pano_view/scripts/generate_tour.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,11 @@ def link_source_images(config, tour_scenes, out_folder):
except KeyError:
# generic fallback for pano images
text = "Image %d" % img_num
slug = "%s_%s_Image_%s" % (scene_meta["module"], scene_meta["bay"], img_num)
slug = "%s_%s_Image_%s" % (
scene_meta["module"],
scene_meta["bay"],
img_num,
)
hot_spots.append(
{
"type": "info",
Expand All @@ -359,7 +363,8 @@ def link_source_images(config, tour_scenes, out_folder):
"yaw": img_meta["yaw"] - tour_scene.get("northOffset", 0),
"pitch": img_meta["pitch"],
"task": img_meta["task"],
"URL": "src/#scene=%s&imageId=%s&slug=%s" % (scene_id, img_id, slug),
"URL": "src/#scene=%s&imageId=%s&slug=%s"
% (scene_id, img_id, slug),
"cssClass": f"isaac-source-image isaac-{img_meta['task']} pnlm-hotspot pnlm-sprite",
"attributes": {
"target": "_blank",
Expand Down
8 changes: 6 additions & 2 deletions pano/pano_view/scripts/prep_source_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,16 @@ def get_inspection_results(scene_meta):
infos = scene_meta.get("inspection_results", [])
for info in infos:
info["task"] = "inspection"
return {os.path.splitext(os.path.basename(info["image"]))[0]: info for info in infos}
return {
os.path.splitext(os.path.basename(info["image"]))[0]: info for info in infos
}


def get_scene_q(config, stitch_folder, out_folder, scene_id):
scene_meta = config["scenes"][scene_id]
images_meta = read_scene_source_images_meta(stitch_folder, scene_id, scene_meta["images_dir"])
images_meta = read_scene_source_images_meta(
stitch_folder, scene_id, scene_meta["images_dir"]
)
images_meta.update(get_inspection_results(scene_meta))
scene_out = os.path.join(out_folder, "source_images", scene_id)

Expand Down

0 comments on commit 3b3ad97

Please sign in to comment.