start of cli

This commit is contained in:
Thomas (Tom) C. Gorordo 2026-05-25 18:38:04 -07:00
parent c4b42d2baa
commit b95b2db4a9
Signed by: tgorordo
GPG key ID: 0CBED22BB0D94490

View file

@ -1,10 +1,44 @@
# /// script
# requires-python = ">=3.13"
# dependencies = [
# "click>=8.4.1",
# "rich>=15.0.0",
# "polars>=1.40.1",
# "rustworkx>=0.17.1"
# ]
# ///
import sys, io
import click import click
import carousel
from rich.console import Console
from rich.table import Table
from rich.panel import Panel
import polars as pl
from carousel import match_from_prefs
@click.command() @click.command()
def cli(): @click.argument("preferences", type=click.Path(exists=True, dir_okay=False))
carousel.main() @click.option(
"--show-preferences",
"-b",
is_flag=True,
help="Show relevant preferences (after selections).",
)
@click.option("--pretty", "-p", is_flag=True, help="Pretty-print output.")
def cli(preferences: str, show_ballots=False, pretty=False) -> None:
"""
Compute the Gale-Shapley stable match of some preferences -- .csv or .xls(x).
A stable matching (of the "college admissions" problem) is one in which there is no
pair of, say, TA and course which would prefer each other over their respective
assignment given by the matching.
"""
console = Console()
pass
if __name__ == "__main__": if __name__ == "__main__":