Move root experiment scripts into their papers' experiments/ folders

Relocate the standalone Python scripts from the repo root into the
experiments/ folder of the paper each one belongs to:

  plane_depth_sequencing/experiments/
    plane_depth_sequencing.py, draw_quad_sequence.py,
    draw_quad_sequence_diagram.py, extract_sequence.py,
    plane_depth_sequencing_figure.py, quad_sequence_coloring_check.py
  colored_edge_flip_classes/experiments/   colored_edge_flip_class_survey.py
  colored_pentagon_contractions/experiments/ colored_pentagon_contractions.py
  plane_diamond_coloring/experiments/       plane_diamond_coloring.py

Each file that imports lib.* (still in the repo root) or the sibling
plane_depth_sequencing module gets a sys.path shim that prepends the
repo root (computed three levels up) and, where needed, its own dir.
Imports verified to resolve from a neutral working directory.

flip_symmetric_census.py is intentionally left in the root.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-22 10:40:39 -04:00
parent 1a71658349
commit ad3f95fa39
9 changed files with 480 additions and 1 deletions
@@ -1,4 +1,6 @@
"""Plane depth sequencing on maximal planar graphs."""
import os, sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", ".."))) # repo root for `lib`
import random
from typing import Any, TypedDict
from sage.all import Graph, graphs # type: ignore[attr-defined] # pylint: disable=no-name-in-module
@@ -160,9 +162,11 @@ def extended_deep_embedding(
next_vertex += 1
g_prime.add_vertex(x)
g_prime.add_edges([(x, a), (x, b), (x, c)])
depth_labelling[x] = depth_labelling[a] + 1
if frozenset(face_vertices) == outer_vertices:
outer_cap_vertex = x
depth_labelling[x] = -1 # Outer-cap vertex has depth -1
else:
depth_labelling[x] = depth_labelling[a] + 1
g_prime.is_planar(set_embedding=True)
embedding = g_prime.get_embedding()