Skip to content

Commit

Permalink
git push reminder
Browse files Browse the repository at this point in the history
  • Loading branch information
rkansal47 committed Mar 5, 2024
1 parent 3bc17e5 commit 624b840
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
18 changes: 16 additions & 2 deletions src/HHbbVV/run_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
from __future__ import annotations

import json
import logging
import os
import time
from pathlib import Path
from string import Template

from colorama import Fore, Style


def add_bool_arg(parser, name, help, default=False, no_name=None):
"""Add a boolean command line argument for argparse"""
Expand All @@ -32,6 +34,10 @@ def write_template(templ_file: str, out_file: Path, templ_args: dict):
f.write(templ.substitute(templ_args))


def print_red(s):
return print(f"{Fore.RED}{s}{Style.RESET_ALL}")


def add_mixins(nanoevents):
# for running on condor
nanoevents.PFNanoAODSchema.nested_index_items["FatJetAK15_pFCandsIdxG"] = (
Expand All @@ -53,7 +59,15 @@ def check_branch_exists(git_branch: str):
)
), f"Branch {git_branch} does not exist"

logging.info(f"{git_branch} branch does exist. Important!! Did you push your change to github?")
print(f"Using the {git_branch} branch.")
print_red("-----------Important!------------")
print_red("-----------Important!------------")
print_red("-----------Important!------------")
print_red("Did you push your changes to github?")
print_red("-----------Important!------------")
print_red("-----------Important!------------")
print_red("-----------Important!------------")
time.sleep(5)


# for Dask executor
Expand Down
6 changes: 1 addition & 5 deletions src/condor/check_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
from pathlib import Path

import numpy as np
from colorama import Fore, Style

from HHbbVV import run_utils
from HHbbVV.run_utils import print_red

parser = argparse.ArgumentParser()
run_utils.parse_common_args(parser)
Expand Down Expand Up @@ -56,10 +56,6 @@
}


def print_red(s):
return print(f"{Fore.RED}{s}{Style.RESET_ALL}")


running_jobs = []
if args.check_running:
os.system("condor_q | awk '{print $9}' > running_jobs.txt")
Expand Down

0 comments on commit 624b840

Please sign in to comment.