Skip to content

Instantly share code, notes, and snippets.

View andrew222651's full-sized avatar

Andrew andrew222651

View GitHub Profile
@andrew222651
andrew222651 / check_submodule_versions.py
Created March 4, 2026 08:55
Check consistency across Python packages found in git submodules
import subprocess
import tomllib
from pathlib import Path
def get_submodule_commit_hash(path: Path) -> str:
result = subprocess.run(
["git", "rev-parse", "HEAD"],
cwd=str(path),
stdout=subprocess.PIPE,
r"""
requires:
pydantic==1.*
numpy==1.*
scipy==1.*
"""
from abc import ABC, abstractmethod
import math