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)
Esempio n. 2
0
def run() -> None:
    """
    Start backend server normally.
    """
    env_variables.set_backend()
    try:
        pipenv.run(["flask", "run"])
    except KeyboardInterrupt:
        pass
Esempio n. 3
0
 def run_script() -> None:
     pipenv.run([
         "python",
         "./backend/src/admin/new_semester_scripts/rebuild_rosters.py"
     ])
Esempio n. 4
0
 def run_script() -> None:
     pipenv.run([
         "python", "./backend/src/admin/new_semester_scripts/share_drive.py"
     ])
def test(*, root_directory: str) -> None:
    """
    Run unit tests.
    """
    pipenv.run(["pytest", "--quiet", root_directory])
def lint(targets: List[str]) -> None:
    """
    Run Pylint.
    """
    pipenv.run(["pylint", "--rcfile=backend/.pylintrc"] + targets)
def check_types(targets: List[str]) -> None:
    """
    Calls MyPy to check for type errors.
    """
    pipenv.run(["mypy", "--config-file", "backend/mypy.ini"] + targets)