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

Adding tests but does it require a little refactoring our code? #15

Open
brennanpincardiff opened this issue Oct 16, 2020 · 2 comments
Open

Comments

@brennanpincardiff
Copy link
Contributor

Clearly we need some tests but I wonder if it requires some refactoring.

I wonder if it is possible/worthwhile to separate the creation of the temp_badge_code item from the creation of the Latex and perhaps from the generation of the PDF?

This might facilitate some previewing and facilitate some testing.

Maybe into the following functions:

  • make_badge_code()
  • preview_badge()
  • render_badge_pdf()

Thoughts @dokato, @DaveParr?
P

@dokato
Copy link
Collaborator

dokato commented Oct 16, 2020

+1 to that. The code would definately benefit from some refactoring.

Minor remarks:

make_badge_code() -> make_badge_template()

preview_badge() what would be the preview? Is there an easy way to show a popup with pdf in R?
EDIT: forget the last one, just saw #13 ;)

@brennanpincardiff
Copy link
Contributor Author

One test added :-)

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

No branches or pull requests

2 participants