Exemplo n.º 1
0
def fmt(targets: List[str], ci: bool = False) -> None:
    """
    Autoformat code.
    """
    black_command = ["black", "--py36"]
    if ci:
        black_command.append("--check")
    pipenv.run(black_command + targets)
Exemplo n.º 2
0
def run() -> None:
    """
    Start backend server normally.
    """
    env_variables.set_backend()
    try:
        pipenv.run(["flask", "run"])
    except KeyboardInterrupt:
        pass
Exemplo n.º 3
0
 def run_script() -> None:
     pipenv.run([
         "python",
         "./backend/src/admin/new_semester_scripts/rebuild_rosters.py"
     ])
Exemplo n.º 4
0
 def run_script() -> None:
     pipenv.run([
         "python", "./backend/src/admin/new_semester_scripts/share_drive.py"
     ])
Exemplo n.º 5
0
def test(*, root_directory: str) -> None:
    """
    Run unit tests.
    """
    pipenv.run(["pytest", "--quiet", root_directory])
Exemplo n.º 6
0
def lint(targets: List[str]) -> None:
    """
    Run Pylint.
    """
    pipenv.run(["pylint", "--rcfile=backend/.pylintrc"] + targets)
Exemplo n.º 7
0
def check_types(targets: List[str]) -> None:
    """
    Calls MyPy to check for type errors.
    """
    pipenv.run(["mypy", "--config-file", "backend/mypy.ini"] + targets)