gedih3.doctor.parallel#

Doctor-internal scandir helpers + back-compat re-export of gedih3.parallel.parallel_map().

The general parallelism primitive has been promoted to gedih3.parallel (it is used by the build, download, and manifest-writing paths too, not only by the doctor diagnoses). This module now keeps only the doctor-internal O(1) scandir helpers used by doctor/diagnoses/orphans.py and re-exports parallel_map so any external caller importing from here keeps working.

Functions#

partition_is_empty(→ bool)

O(1) emptiness check via os.scandir() — no recursive glob.

list_year_dirs(→ List[str])

List immediate subdirectories of a partition directory.

year_dir_is_empty(→ bool)

O(1) parquet presence check inside one year=*/ directory.

Module Contents#

gedih3.doctor.parallel.partition_is_empty(partition_dir: str) bool[source]#

O(1) emptiness check via os.scandir() — no recursive glob.

Mirrors the build pipeline’s emptiness check at gh3builder.py:1356-1362. A partition is considered empty when it contains no parquet file at any depth (year subdir or root).

gedih3.doctor.parallel.list_year_dirs(partition_dir: str) List[str][source]#

List immediate subdirectories of a partition directory.

Single os.scandir call instead of glob.glob('*/'); same primitive the build pipeline uses to enumerate per-h3 work units.

gedih3.doctor.parallel.year_dir_is_empty(year_dir: str) bool[source]#

O(1) parquet presence check inside one year=*/ directory.