2024-07-29 18:29:54 -04:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
from flupdt.flake_show import get_derivations
|
|
|
|
from flupdt.cli import parse_inputs
|
2024-08-02 09:13:06 -04:00
|
|
|
from flupdt.flake_eval import evaluate_output
|
|
|
|
from flupdt.common import configure_logger
|
|
|
|
import logging
|
2024-07-29 18:29:54 -04:00
|
|
|
|
|
|
|
def main():
|
2024-08-02 09:13:06 -04:00
|
|
|
configure_logger("INFO")
|
2024-07-29 18:29:54 -04:00
|
|
|
args = parse_inputs()
|
2024-08-02 09:13:06 -04:00
|
|
|
flake_path = args.flake_path
|
|
|
|
derivations = get_derivations(flake_path)
|
|
|
|
if not args.keep_hydra and len(list(filter(lambda s: s.startswith("hydraJobs"), derivations))) > 0:
|
|
|
|
logging.info("--keep-hydra flag is not specified, removing Hydra jobs")
|
|
|
|
derivations = filter(lambda s: not s.startswith("hydraJobs"), derivations)
|
|
|
|
logging.info(f"derivations: {list(derivations)}")
|
|
|
|
for d in derivations:
|
|
|
|
evaluate_output(flake_path, d)
|
2024-07-29 18:29:54 -04:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|