refact: rename bopytex to service
This commit is contained in:
parent
963348611a
commit
e52b6eb064
@ -4,9 +4,8 @@
|
||||
|
||||
import click
|
||||
import logging
|
||||
from pathlib import Path
|
||||
|
||||
from bopytex.bopytex import bopytex
|
||||
from bopytex.service import bopytex
|
||||
|
||||
formatter = logging.Formatter("%(name)s :: %(levelname)s :: %(message)s")
|
||||
steam_handler = logging.StreamHandler()
|
||||
@ -38,7 +37,11 @@ logger.addHandler(steam_handler)
|
||||
help="CSV containing list of students names",
|
||||
)
|
||||
@click.option(
|
||||
"-d", "--dirty", is_flag=True, default=False, help="Do not clean after compilation",
|
||||
"-d",
|
||||
"--dirty",
|
||||
is_flag=True,
|
||||
default=False,
|
||||
help="Do not clean after compilation",
|
||||
)
|
||||
@click.option(
|
||||
"-n",
|
||||
|
@ -75,10 +75,12 @@ def bopytex(
|
||||
)
|
||||
tasks = planner(template, subjects, corr, no_join, no_pdf)
|
||||
|
||||
scheduler = Scheduler(actions, [template])
|
||||
|
||||
scheduler = Scheduler([template])
|
||||
scheduler.append(tasks)
|
||||
|
||||
scheduler.run()
|
||||
for _ in scheduler.backlog:
|
||||
pass
|
||||
|
||||
|
||||
# -----------------------------
|
@ -1,4 +1,4 @@
|
||||
from bopytex.bopytex import build_subject_list_from_infos, build_subject_list_from_qty
|
||||
from bopytex.service import build_subject_list_from_infos, build_subject_list_from_qty
|
||||
|
||||
|
||||
def test_build_subject_list_from_qty():
|
||||
@ -28,5 +28,6 @@ def test_build_subject_list_from_infos():
|
||||
{"name": "test2", "date": "tomorow", "number": "2"},
|
||||
]
|
||||
|
||||
|
||||
def test_bopytex():
|
||||
pass
|
Loading…
Reference in New Issue
Block a user