ctsit / rcc.billing

Automated, data-driven service billing implemented on REDCap Custodian
https://ctsit.github.io/rcc.billing/
Apache License 2.0
0 stars 3 forks source link

Move revenue report to typst #253

Closed pbchase closed 2 weeks ago

pbchase commented 3 weeks ago

I added typst support to revenue_status_and_projections.qmd. I updated render_report.R, Dockerfile, and build.sh to get it to run in Docker.

Note: this required an update to redcapcustodian (1.26.0) to get the latest Quarto and the latest Typst support. Make sure to pull that and build the redapcustodian image.

ljwoodley commented 3 weeks ago

There are multiple formats specified in the qmd. Ideally, we should set one. If both html and pdf formats are specified render_report will create both formats but return the pdf by default. I'll make that clearer in the documentation.

Also, discovered a bug in render_report. The log and output folders should be created within the function. Otherwise it fails. I'll make a PR for that.

ljwoodley commented 3 weeks ago

It's true that the first format specified in the yaml is the default but that's only when using render interactively.

render_report uses quarto_render and this renders all formats specified in the yaml. The output_format can be passed via command line arg but I'm not sure if that's warranted as the extra formats can be commented out for prod.

pbchase commented 3 weeks ago

Okay, let's comment out the extra formats. It's the kiss solution.

pbchase commented 2 weeks ago

Typist is interesting, but the html format is better now that I adjusted the figure dimensions.

Let's keep all the changes except for typst itself. :-D