Refact: move config and workflow to bopytex

This commit is contained in:
2022-05-04 11:39:28 +02:00
parent 87ebb4c284
commit 69b2e1c82e
3 changed files with 32 additions and 15 deletions

View File

@@ -1,14 +1,7 @@
import os
import jinja2
from pathlib import Path
from bopytex.message import Message
from bopytex.planner.generate_compile_join_planner import planner
from bopytex.service import orcherstrator
from bopytex.worker import Dispatcher
from bopytex.worker.clean import clean
from bopytex.worker.compile import latexmk
from bopytex.worker.generate import generate
from bopytex.worker.join_pdf import pdfjam
from bopytex.bopytex import bopytex
import pytest
@@ -49,13 +42,8 @@ def test_with_default_planner(template_path, jinja2_env, tmp_path):
"environment": jinja2_env,
},
}
dispatcher = Dispatcher(
{"GENERATE": generate, "COMPILE": latexmk, "JOIN": pdfjam, "CLEAN": clean}
)
orcherstre = orcherstrator(options, planner=planner, dispatcher=dispatcher)
messages = []
for message in orcherstre:
assert message.status == 0
bopytex(**options)
assert Path("joined_source.pdf").exists()