Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factorize base engine run into one function #19

Merged
merged 7 commits into from
Apr 17, 2024

Conversation

norbusan
Copy link
Collaborator

To unify treatment of multiple runs necessary between LatexConverter and PDFLatexConverter, factor the run loop into a separate function that is called from generate_pdf.

To unify treatment of multiple runs necessary between LatexConverter
and PDFLatexConverter, factor the run loop into a separate function
that is called from generate_pdf.
ntai-arxiv
ntai-arxiv previously approved these changes Apr 17, 2024
Copy link
Contributor

@ntai-arxiv ntai-arxiv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH, I dislike the use of function ref. If you need to inject dependency, there should be a better way than using a variable of function ref.

Why not name _latex_run and _pdflatex_run as _base_run?

Anyhow, it is too hard for me to read this in browser, and also want to study with a bit of time so merge this, and I'd like to make some surface level changes.

ntai-arxiv
ntai-arxiv previously approved these changes Apr 17, 2024
Copy link
Contributor

@ntai-arxiv ntai-arxiv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the refactor the ugly part. I dislike the use of _base_runner = _latex_run. It seems more straightforward use it as override functions

@ntai-arxiv ntai-arxiv self-requested a review April 17, 2024 14:59
ntai-arxiv
ntai-arxiv previously approved these changes Apr 17, 2024
Copy link
Contributor

@ntai-arxiv ntai-arxiv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed _base_runner part.

@norbusan
Copy link
Collaborator Author

I changed _base_runner part.

Great, thanks for that!!! I was contemplating a similar change, but again - wasn't sure about the original intention of naming the functions, so I kept them.

The way it is now is much cleaner, thanks!

@norbusan norbusan merged commit 20132f5 into master Apr 17, 2024
2 checks passed
@norbusan norbusan deleted the norb/refactor-latex-runs branch April 17, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants